From 3163097b22718fbd7a9d01fffdd19a1f58305ad0 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Sat, 20 Jul 2019 15:30:18 +0800
Subject: [PATCH 1/6] memo
---
.../modules/courses/members/modal/CourseGroupChooserModal.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js b/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js
index 3f4f1a0ca..2f08d08a1 100644
--- a/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js
+++ b/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js
@@ -105,4 +105,4 @@ function CourseGroupChooserModal({ course_groups = [], isAdminOrCreator, item, i
)
}
-export default useMemo(CourseGroupChooserModal)
\ No newline at end of file
+export default (CourseGroupChooserModal)
\ No newline at end of file
From 055f000f677fb63b51e6d523a6f843316ef664ae 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, 20 Jul 2019 16:50:48 +0800
Subject: [PATCH 2/6] b
---
public/react/src/modules/user/usersInfo/InfosProject.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js
index 33eac0e6b..06076a3cd 100644
--- a/public/react/src/modules/user/usersInfo/InfosProject.js
+++ b/public/react/src/modules/user/usersInfo/InfosProject.js
@@ -84,7 +84,7 @@ class InfosProject extends Component{
// 进入项目
turnToCourses=(url,flag)=>{
if(flag){
- this.props.history.push(url);
+ window.location.href=url;
}
}
From 376c1f96cd4f4c24c54fafa166b665db295d89ba Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Sat, 20 Jul 2019 16:52:29 +0800
Subject: [PATCH 3/6] search
---
public/react/src/search/SearchPage.js | 81 ++++++++++++++++++++++++++-
1 file changed, 78 insertions(+), 3 deletions(-)
diff --git a/public/react/src/search/SearchPage.js b/public/react/src/search/SearchPage.js
index 990700983..179c4f270 100644
--- a/public/react/src/search/SearchPage.js
+++ b/public/react/src/search/SearchPage.js
@@ -94,6 +94,7 @@ class SearchPage extends Component{
//获取数据
getdata=(pages,type,keywords)=>{
let url = "/search.json";
+ this.setState({ loading: true })
axios.get(url,{params:{
keyword:keywords,
type:type,
@@ -101,6 +102,8 @@ class SearchPage extends Component{
per_page:this.state.perpages,
}
}).then((response) => {
+ this.setState({ loading: false })
+
if(response === undefined){
return
@@ -118,11 +121,19 @@ class SearchPage extends Component{
}
render(){
- let {tab,count,data,page,perpages}=this.state;
+ let {tab,count,data,page,perpages, type }=this.state;
return(
+
{
- JSON.stringify(data) === "[]" ?
+ JSON.stringify(data) === "[]" && this.state.loading != true ?
@@ -227,9 +238,73 @@ class SearchPage extends Component{
}
+
- 主讲:{item.author_name}{item.author_school_name} 任务:{item.challenges_count===undefined?0:item.challenges_count} 学习人数:{item.study_count===undefined?0:item.study_count}
+ {/*
+ 主讲:{item.author_name}
+
+ {item.author_school_name}
+
+
+ 任务:
+ {item.challenges_count===undefined?0:item.challenges_count}
+
+
+
+
+ 学习人数:
+ {item.study_count===undefined?0:item.study_count}
+
+ */}
+
+
+ {/* */}
+ {item.author_name}
+ {item.author_school_name}
+
+ {!!item.challenges_count &&
+
+ 任务:
+ {item.challenges_count}
+
+ }
+ {!!item.study_count &&
+
+ 学习人数:
+ {item.study_count}
+
+ }
+
+ {!!item.stage_shixuns_count &&
+
+ 实训数:
+ {item.stage_shixuns_count}
+
+ }
+ {type == 'subject' && !!item.visits_count &&
+
+ 访问数:
+ {item.visits_count}
+
+ }
+
+ {!!item.members_count &&
+
+ 成员数:
+ {item.members_count}
+
+ }
+
+ {!!item.all_replies_count &&
+
+ 回复数:{item.all_replies_count}
+ }
+
+ {/*
+
+
+ 学习人数:{item.study_count===undefined?0:item.study_count} */}
From cfddbc289994e2047658039a9cd2d27a0048137f Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Sat, 20 Jul 2019 16:52:40 +0800
Subject: [PATCH 4/6] pass
---
public/react/src/context/TPIContextProvider.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js
index 449f79a7a..52aebcf7c 100644
--- a/public/react/src/context/TPIContextProvider.js
+++ b/public/react/src/context/TPIContextProvider.js
@@ -571,6 +571,9 @@ pop_box_new(htmlvalue, 480, 182);
}
closeTaskResultLayer() {
this.setState({
+ game: (this.state.game.status == 2 ? update(this.state.game, {
+ isPassThrough: { $set: true },
+ }) : this.state.game) ,
currentGamePassed: false
})
}
@@ -581,7 +584,7 @@ pop_box_new(htmlvalue, 480, 182);
let currentGamePassed = false
if (challenge_chooses_count === choose_correct_num) {
game.status = 2;
- game.isPassThrough = true
+ // game.isPassThrough = true
game.next_game = next_game;
currentGamePassed = true;
@@ -734,7 +737,7 @@ pop_box_new(htmlvalue, 480, 182);
compileSuccess && this.language_display(response);
if (currentGamePassed) {
game.status = 2;
- game.isPassThrough = true
+ // game.isPassThrough = true
game.next_game = next_game;
} else {
this.showDialog({
From 8d7eb726df759ec3ff7694debc682672155457f2 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Sat, 20 Jul 2019 17:18:18 +0800
Subject: [PATCH 5/6] =?UTF-8?q?(=E7=BC=96=E8=AF=91=E3=80=81=E8=BF=90?=
=?UTF-8?q?=E8=A1=8C=E6=80=BB=E6=97=B6=E9=97=B4)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/page/main/ActionView.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/page/main/ActionView.js b/public/react/src/modules/page/main/ActionView.js
index fff7d416d..d8638efb8 100644
--- a/public/react/src/modules/page/main/ActionView.js
+++ b/public/react/src/modules/page/main/ActionView.js
@@ -64,7 +64,7 @@ class ActionView extends Component {
{!gameBuilding && record ?
-
+
{ record } 秒
: ""}
From 8f02983dce401601b2fb2427315900b532d7c811 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, 20 Jul 2019 17:53:31 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../shixunHomework/Listofworksstudentone.js | 65 ++++++++-----------
.../OfficialAcademicTranscript.js | 14 ++--
.../src/modules/tpm/newshixuns/Newshixuns.js | 38 +++++++----
3 files changed, 64 insertions(+), 53 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index 7f9ab561f..1823f43bb 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -2344,17 +2344,15 @@ class Listofworksstudentone extends Component {
-
计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}
-
- {teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?
- (this.props.isNotMember()===false?
- 计算成绩
-
:""):
- teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
- (this.props.isNotMember()===false?
- 计算成绩
-
:"")
- }
-
+
+ {teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":
+ {teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "":
+ computeTimetype===true&&this.props.isNotMember()===false?
+ 计算成绩
+
:
+ 计算成绩
+
}
+ }
计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":
- {computeTimetype===true?
- (this.props.isNotMember()===false?
-
- 计算成绩
-
- :"")
- :
- (teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
- this.props.isNotMember()===false?
-
- 计算成绩
-
- :"")
- }
- }
+
+ {teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "":
+ computeTimetype===true&&this.props.isNotMember()===false?
+ 计算成绩
+
:
+ 计算成绩
+
}
+ }
+
@@ -2800,17 +2792,16 @@ class Listofworksstudentone extends Component {
计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}
- {teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":
- {computeTimetype===true?
- (this.props.isNotMember()===false?
- 计算成绩
-
:""):
- teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
- (this.props.isNotMember()===false?
- 计算成绩
-
:"")
- }
- }
+ {teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":
+
+ {teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status===0?"":
+ this.props.isNotMember()===false&&computeTimetype===true?
+ 计算成绩
+
:
+ 计算成绩
+
}
+
+ }
{/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/}
diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
index 4e9b22831..f0a7ff941 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
@@ -60,8 +60,9 @@ class OfficialAcademicTranscript extends Component {
className:"TaskForms",
render: (text, record) => (
- this.myjumptopic("id"+record.customs)} title={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} >
+ {record.taskname.name}{record.taskname.complete_status===2?延时:record.taskname.complete_status===3?延时:""}
+
),
}, {
@@ -145,8 +146,11 @@ class OfficialAcademicTranscript extends Component {
}
.tasknameboxs{
- color: #666666 !important;
- background:rgba(237,237,237,1) !important;
+ width: 50px;
+ height: 24px;
+ border: 1px solid rgba(221,23,23,1);
+ color: rgba(221,23,23,1);
+ border-radius: 12px;
}
.ant-table-tbody > tr > td{
@@ -167,7 +171,7 @@ class OfficialAcademicTranscript extends Component {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- width: 500px;
+ width: 450px;
text-align: left !important;
}
.TaskForms{
diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
index 39663e6be..184b6313a 100644
--- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js
+++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
@@ -200,7 +200,8 @@ class Newshixuns extends Component {
languagewritetype:false,
systemenvironmenttype:false,
testcoderunmodetype:false,
- attachmentidstype:false
+ attachmentidstype:false,
+ datalisttype:false
}
}
@@ -369,20 +370,32 @@ class Newshixuns extends Component {
}
shixunScopeInput = (e, id) => {
+ let types=false
let {scope_partment} = this.state;
let datalist = scope_partment;
if (datalist === undefined) {
datalist = []
}
- datalist.push(e)
- // else{
- // datalist[id]=e
- // }
- this.setState({
- scope_partment: datalist,
- onSearchvalue: ""
- });
+ datalist.map((item,key)=>{
+ if(e===item){
+ types=true
+ this.setState({
+ datalisttype:true
+ })
+ return
+ }
+ })
+
+ if(types===false){
+ datalist.push(e)
+ this.setState({
+ scope_partment: datalist,
+ onSearchvalue: ""
+ });
+ }
+
+
}
deleteScopeInput = (key) => {
@@ -495,7 +508,9 @@ class Newshixuns extends Component {
}
shixunHandleSearch = (value) => {
+
this.shixunsfetch(value, departmentslist => this.setState({departmentslist}));
+
this.setState({
onSearchvalue: ""
})
@@ -787,7 +802,7 @@ class Newshixuns extends Component {
render() {
const { getFieldDecorator } = this.props.form;
const thiss=this;
- let {testcoderunmode ,systemenvironment,languagewrite,deleteisnot, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, operss, onSearchvalue} = this.state;
+ let {testcoderunmode ,systemenvironment,languagewrite,deleteisnot, fileList,TimePickervalue, scope_partmenttype, opensmail, newshixunlist, name, scope_partment, departmentslist, postapplyvisible, sendsure_applyvalue, postapplytitle, shixun_nametype, main_types, trainee_types, SelectTheCommandtype, opers, datalisttype, onSearchvalue} = this.state;
let options
if (departmentslist != undefined) {
options = this.state.departmentslist.map((d, k) => {
@@ -1142,6 +1157,7 @@ class Newshixuns extends Component {
(搜索选中添加单位名称)
+ {this.state.datalisttype===true?
请勿选择重复单位:""}
{/*
+ 添加*/}
@@ -1153,7 +1169,7 @@ class Newshixuns extends Component {
return (
{item}
this.deleteScopeInput(key)}>×
+ onClick={() => this.deleteScopeInput(key)}>×
)
})