From ade610d44a4d1e9aed5728126f4ab60561027737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 21 Sep 2019 16:46:28 +0800 Subject: [PATCH 01/52] =?UTF-8?q?=E8=B0=83=E6=95=B4bd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/shixunHomework/shixunHomework.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 55dfac7fc..eb59ce6f1 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -1064,8 +1064,7 @@ class ShixunHomework extends Component{
- {/*{datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name:datas&&datas.category_name+" 作业列表"}*/} - 实训作业 + {datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name:datas&&datas.category_name+" 作业列表"}
关卡名称(需要学生完成的任务请选中)
+ className="color-grey-c font-12 ml10">(需要学生完成的任务请选中)
- {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name}
- >
- {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_name}
- >
-
+ {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name}
+ >
+ {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_name}
+ >
+
{teacherdatapage === undefined ? "" : teacherdatapage.homework_name} diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index f4f8a3f1c..2521a96d2 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -398,15 +398,19 @@ class LoginDialog extends Component { }); } handleDialogClose = () => { - - if(this.props.match===undefined){ - window.location.href="/"; - }else{ + // https://www.trustie.net/issues/24441 + // console.log(JSON.stringify(this.props)); + // console.log("handleDialogClose"); + // console.log(this.props.match); + // if(this.props.match===undefined){ + // window.location.href="/"; + // }else{ + // this.props.history.goBack(); this.setState({ isRender: false - }) + }); this.props.Modifyloginvalue(); - } + // } // this.setState({ // isRender: false // }) From a11da1841a3ddde377b2361189f6e845aa26122a 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, 24 Sep 2019 15:37:58 +0800 Subject: [PATCH 08/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 20 +++---- .../modules/courses/Resource/Fileslistitem.js | 11 ++-- .../graduation/tasks/GraduateTaskItem.js | 19 ++++--- .../graduation/topics/GraduateTopicItem.js | 13 +++-- .../shixunHomework/ShixunHomeworkPage.js | 4 +- .../shixunHomework/ShixunhomeWorkItem.js | 55 +++++++++++++++---- public/react/src/modules/login/LoginDialog.js | 20 +++---- 7 files changed, 93 insertions(+), 49 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 025db7f5c..f6598a3c4 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -21,16 +21,16 @@ let hashTimeout // TODO 开发期多个身份切换 let debugType ="" -if (isDev) { - const _search = window.location.search; - let parsed = {}; - if (_search) { - parsed = queryString.parse(_search); - } - debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : - window.location.search.indexOf('debug=s') != -1 ? 'student' : - window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' -} +// if (isDev) { +// const _search = window.location.search; +// let parsed = {}; +// if (_search) { +// parsed = queryString.parse(_search); +// } +// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : +// window.location.search.indexOf('debug=s') != -1 ? 'student' : +// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' +// } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index 4e8e89567..d5c4725c3 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -194,6 +194,9 @@ class Fileslistitem extends Component{ text-overflow:ellipsis; white-space:nowrap } + .fileslistitemsA{ + + } `}
+
{} : () => this.onItemClick(item)}
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js
index 8ab3c3628..44c9be848 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js
@@ -7,14 +7,15 @@ import axios from 'axios';
import Modals from '../../../modals/Modals';
import Associationmodel from '../../coursesPublic/Associationmodel';
import AccessoryModal from "../../coursesPublic/AccessoryModal";
-
+import LoginDialog from "../../../login/LoginDialog";
class GraduateTaskItem extends Component{
constructor(props){
super(props);
this.state = {
modalname:"关联项目",
- visible:false
+ visible:false,
+ isRender:false,
}
}
@@ -32,6 +33,11 @@ class GraduateTaskItem extends Component{
// isrelate:is_relate
// })
}
+ Modifyloginvalue=()=>{
+ this.setState({
+ isRender:false,
+ })
+ };
cannelAssociation=()=>{
@@ -132,7 +138,24 @@ class GraduateTaskItem extends Component{
setupdate=()=>{
this.props.funlist
- }
+ };
+ showfiles =(url)=>{
+ // console.log("ShixunhomeWorkItemshowfiles");
+ // console.log( this.props.current_user.username);
+ try {
+ if(this.props.current_user.username==="游客"){
+ this.setState({
+ isRender:true,
+ match:"",
+ });
+ return
+ }
+ }catch (e) {
+ }
+ this.props.history.push(url);
+ // this.props.current_user
+
+ };
render(){
let {
Modalstype,
@@ -142,7 +165,8 @@ class GraduateTaskItem extends Component{
cardsModalsavetype,
loadtype,
modalname,
- visible
+ visible,
+ isRender
} = this.state;
const { checkBox,
@@ -165,7 +189,11 @@ class GraduateTaskItem extends Component{
modalSave={cardsModalsavetype}
loadtype={loadtype}
/>
-
+ {isRender===true?
- {order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序
+ {order==="update_time"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序
- {order==="updated_at"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序
-
- {discussMessage.author.name}
-
- { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 }
- { discussMessage.praises_count != 0 && {discussMessage.praises_count} 点赞 }
- { discussMessage.visits != 0 && {discussMessage.visits} 浏览 }
-
- {moment(discussMessage.created_on).fromNow()}
-
-
+
+ {discussMessage.author.name}
+
+ { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 }
+ { discussMessage.praises_count != 0 && {discussMessage.praises_count} 点赞 }
+ { discussMessage.visits != 0 && {discussMessage.visits} 浏览 }
+
+ {moment(discussMessage.created_on).fromNow()}
+
+
- {} : () => this.onItemClick(item)}
- >{item.name}
-
+
- { canNotLink ? {item.polls_name} :
- {item.polls_name}
+ { canNotLink ?
+
- 选择实训
+ 选用实训项目
选择下面实训后,可以通过拖拽进行排序调整
- 选择实训
+ 选用实训项目
选择下面实训后,可以通过拖拽进行排序调整
- 姓名
- 职业
- 单位
-
+ 姓名
+ 职业
+ 单位
+
From 638d76ac27bf91c17c2c9eacc5f57710d71b857e 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, 24 Sep 2019 16:34:09 +0800
Subject: [PATCH 12/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/exercise/ExerciseListItem.js | 47 ++++++++++++++++---
.../graduation/topics/GraduateTopicItem.js | 1 +
.../src/modules/courses/poll/PollListItem.js | 38 ++++++++++++++-
3 files changed, 78 insertions(+), 8 deletions(-)
diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js
index f61a7852b..1585b61ba 100644
--- a/public/react/src/modules/courses/exercise/ExerciseListItem.js
+++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js
@@ -10,14 +10,15 @@ import { formatDuring ,handleDateString} from 'educoder';
import '../css/members.css';
import '../css/busyWork.css';
import CourseLayoutcomponent from "./Exercise";
-
+import LoginDialog from '../../login/LoginDialog';
const dataformat="YYYY-MM-DD HH:mm";
const polls_status={1:"未发布",2:"提交中",3:"已截止",4:"已结束"}
class ExerciseListItem extends Component{
constructor(props){
super(props);
this.state={
- Modalstype:false
+ Modalstype:false,
+ isRender:false,
}
}
@@ -40,7 +41,30 @@ class ExerciseListItem extends Component{
})
}
+ };
+ Modifyloginvalue=()=>{
+ this.setState({
+ isRender:false,
+ })
+ };
+
+ showfiles =(url)=>{
+ // console.log("ShixunhomeWorkItemshowfiles");
+ // console.log( this.props.current_user.username);
+ try {
+ if(this.props.current_user.username==="游客"){
+ this.setState({
+ isRender:true,
+ match:"",
+ });
+ return
+ }
+ }catch (e) {
}
+ this.props.history.push(url);
+ // this.props.current_user
+
+ };
cancelmodel=()=>{
this.setState({
@@ -52,6 +76,7 @@ class ExerciseListItem extends Component{
})
}
render(){
+ let {isRender}=this.state;
let{item,checkBox,index}=this.props;
let {coursesId,Id}=this.props.match.params
const IsAdmin =this.props.isAdmin();
@@ -76,6 +101,11 @@ class ExerciseListItem extends Component{
modalSave={this.state.ModalSave}
antIcon={this.state.Modalstypeloding}
>:""}
+ {isRender===true?
-
-
-
-
- {} : () => this.onTitleClick(discussMessage)}
- title={`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`}
- >{discussMessage.subject}
- { !!discussMessage.sticky && 置顶 }
- {
-
- discussMessage.is_public == false ? (
-
-
-
-
-
- {(isAdmin || discussMessage.author.login == current_user.login) &&
-
+
+
+
+
+
+
+
+
+ {(isAdmin || discussMessage.author.login == current_user.login) &&
+
{
- this.props.isAdmin?this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
title={discussMessage.name}
- className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
+ className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
{
- this.props.isStudent? this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
title={discussMessage.name}
- className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
+ className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
{
this.props.isNotMember===true?this.props.discussMessage.private_icon===true?
- {discussMessage.name}
- :
+ {discussMessage.name}
+
{
isNotMember?
- {discussMessage.name}:""
+
- {Searchadmin.length === 0 ?
- {Searchadmin === undefined ?
-
+ {Searchadmin === undefined ?
+
- 分班情况:
- this.funtaskstatustwos()}>不限
@@ -2714,9 +2709,9 @@ class Studentshavecompletedthelist extends Component {
Teacherliststudentlist === undefined || Teacherliststudentlist.current_answer_user === undefined || Teacherliststudentlist.current_answer_user === null ?