From 486d025809db2d7bb798fb008488ffc1f9e72204 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Wed, 24 Jul 2019 14:23:30 +0800
Subject: [PATCH] =?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 | 3 +-
.../courses/coursesPublic/ShixunModal.js | 1 -
.../tasks/GraduationTasksSubmitnew.js | 1 -
.../topics/GraduateTopicDetailTable.js | 614 +++++++++---------
.../src/modules/courses/new/CoursesNew.js | 3 -
.../react/src/modules/courses/poll/PollNew.js | 1 -
.../shixunHomework/Listofworksstudentone.js | 2 +-
public/react/src/modules/login/LoginDialog.js | 13 +-
.../paths/PathDetail/DetailCardsEditAndAdd.js | 1 -
public/react/src/modules/tpm/NewHeader.js | 3 -
10 files changed, 317 insertions(+), 325 deletions(-)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 0666aadc3..f79041105 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -18,7 +18,8 @@ function locationurl(list){
}
// TODO 开发期多个身份切换
-const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
+const debugType =""
+ window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin'
window._debugType = debugType;
export function initAxiosInterceptors(props) {
diff --git a/public/react/src/modules/courses/coursesPublic/ShixunModal.js b/public/react/src/modules/courses/coursesPublic/ShixunModal.js
index 56cecc51b..de9609d0f 100644
--- a/public/react/src/modules/courses/coursesPublic/ShixunModal.js
+++ b/public/react/src/modules/courses/coursesPublic/ShixunModal.js
@@ -82,7 +82,6 @@ class ShixunModal extends Component{
//勾选实训
shixunhomeworkedit=(list)=>{
-debugger
let newpatheditarry=[];
if (this.props.singleChoose == true) {
if (list.length > 0) {
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js
index 355a514a4..50f2a4fde 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js
@@ -117,7 +117,6 @@ class GraduationTasksSubmitnew extends Component{
}
// 附件相关 START
handleChange = (info) => {
- debugger
if (info.file.status === 'uploading') {
let fileList = info.fileList;
this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) });
diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js
index c9bd3f496..eae3fb43d 100644
--- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js
+++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js
@@ -1,309 +1,307 @@
-import React,{ Component } from "react";
-
-import '../../css/members.css'
-import '../../css/busyWork.css'
-import '../style.css'
-
-import { WordsBtn } from 'educoder'
-import NoneData from '../../coursesPublic/NoneData'
-import Modals from "../../../modals/Modals"
-import axios from 'axios'
-import { Modal,Select,Input } from "antd";
-
-const Option = Select.Option
-class GraduateTopicDetailTable extends Component{
- constructor(props){
- super(props);
- this.state={
- modalsType:false,
- modalsTopval:'',
- operationId:undefined,
- agreeFlag:false,
- classesId:undefined,
- agreeCheck:false,
- visible:false,
- un_addClass:undefined,
- un_addClass_notice:"",
- un_choose_notice:""
- }
- }
- // 拒绝
- aboutTopic=(id)=>{
- this.setState({
- modalsType:true,
- modalsTopval:'是否确认拒绝学生选题?',
- operationId:id
- })
- }
- cancelAboutTopic=()=>{
- this.setState({
- modalsType:false,
- modalsTopval:''
- })
- }
- sureAboutTopic=()=>{
- let{operationId}=this.state
- let courseId=this.props.match.params.course_id;
- let graduation_topic_id=this.props.match.params.graduation_topic_id;
- let url =`/courses/${courseId}/graduation_topics/${graduation_topic_id}/refuse_student_topic.json?student_graduation_topic=`+operationId;
- axios.post(url).then((result)=>{
- if(result.data.status==0){
- this.props.showNotification(`${result.data.message}`);
- this.setState({
- modalsType:false,
- modalsTopval:''
- })
- //成功后调用列表接口,刷新
- this.props.getDetailList(this.props.page);
- }
- }).catch((error)=>{
- console.log(error);
- })
- this.setState({
- modalsType:false,
- modalsTopval:''
- })
- }
-
- //同意
- agreeTopic=(id)=>{
- this.setState({
- agreeFlag:true,
- operationId:id
- })
- }
- hideAgreeTopic=()=>{
- this.setState({
- agreeFlag:false,
- classesId:undefined
- })
- }
- sureAgreeTopic=(count)=>{
- if(count > 0){
- debugger
- let{tableData}=this.props;
- let{operationId,classesId}=this.state
- let courseId=this.props.match.params.course_id;
- let name=tableData.group_list.filter(item=>item.group_id==classesId)[0].group_name;
- this.agreeChoose(courseId,operationId,classesId,name);
- }else{
- this.setState({
- un_choose_notice:"请先添加分班"
- })
- }
- }
-
- agreeChoose=(courseId,operationId,classesId,courseName)=>{
- let graduation_topic_id=this.props.match.params.graduation_topic_id;
- let url =`/courses/${courseId}/graduation_topics/${graduation_topic_id}/accept_student_topic.json`;
- axios.post(url,{
- student_graduation_topic_id:operationId,
- group_id:classesId,
- course_group_name:courseName
- }).then((result)=>{
- if(result.data.status==0){
- this.props.showNotification(`${result.data.message}`);
- this.setState({
- agreeFlag:false,
- agreeCheck:true,
- visible:false
- })
- //成功后调用列表接口,刷新
- this.props.getDetailList(this.props.page);
- }
- }).catch((error)=>{
- console.log(error);
- })
- }
-
- //切换分班
- changeClasses=(value)=>{
- debugger
- this.setState({
- classesId:value
- })
- }
-
- //新增分班
- topicAddClasses=()=>{
- this.setState({
- visible:true,
- agreeFlag:false
- })
- }
- hideClasses=()=>{
- this.setState({
- visible:false,
- classesId:undefined
- })
- }
-
- //新建分班--输入分班
- inputClasses=(e)=>{
- this.setState({
- un_addClass:e.target.value
- })
- }
-
- // 新建分班---确定
- sureAddClass=()=>{
- let {un_addClass}=this.state;
- if(!un_addClass){
- this.setState({
- un_addClass_notice:"请输入分班名称"
- })
- return;
- }
- console.log(this.props)
- let{operationId}=this.state
- let courseId=this.props.match.params.course_id;
- this.agreeChoose(courseId,operationId,-1,un_addClass);
- }
-
- render(){
- let {page,tableData}=this.props
- let { modalsType,modalsTopval,agreeFlag,classesId,visible
- ,un_addClass_notice
- ,un_addClass,
- un_choose_notice
- } = this.state
- const isAdmin =this.props.isAdmin();
- const isStudent =this.props.isStudent();
- const isNotMember=this.props.isNotMember();
- console.log(un_addClass_notice)
- return(
-
-
-
- 序号
- 姓名
- {isNotMember ?"" :学号}
- 分班
- 选题时间
- 操作
- {
- isAdmin &&
- 确认结果
- }
-
-
- {/* 拒绝弹框 */}
-
- {/* 同意弹框 */}
-
-
-
确认同意学生的选题,将学生加入我的分班
-
-
选择:
-
-
-
{un_choose_notice}
-
-
-
-
-
-
-
-
-
分班:
-
-
-
- {un_addClass_notice}
-
-
-
-
-
-
-
- {
- tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{
- return(
-
- {parseInt(key+1)+(parseInt(page-1)*15)}
- {item.student_name}
- {isNotMember ?"" :{item.student_id}}
- {item.class_group_name || "--"}
- {item.selected_time}
- {
- isAdmin &&
-
- {
- item.result == "待确认" ?
-
- this.aboutTopic(`${item.id}`)}>拒绝
- this.agreeTopic(`${item.id}`)}>同意
- :
- (
- item.result === "已拒绝" ? --
- :
- this.aboutTopic(`${item.id}`)}>拒绝
- )
- }
-
- }
- {
- isStudent &&
- {item.result}
- }
- {
- isAdmin &&
- {item.result=== "待确认"?"--":item.result}
- }
- {
- isNotMember && --
- }
-
-
- )
- })
- }
- {
- tableData.users_list && tableData.users_list.length == 0 &&
- }
-
-
-
- )
- }
-}
+import React,{ Component } from "react";
+
+import '../../css/members.css'
+import '../../css/busyWork.css'
+import '../style.css'
+
+import { WordsBtn } from 'educoder'
+import NoneData from '../../coursesPublic/NoneData'
+import Modals from "../../../modals/Modals"
+import axios from 'axios'
+import { Modal,Select,Input } from "antd";
+
+const Option = Select.Option
+class GraduateTopicDetailTable extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ modalsType:false,
+ modalsTopval:'',
+ operationId:undefined,
+ agreeFlag:false,
+ classesId:undefined,
+ agreeCheck:false,
+ visible:false,
+ un_addClass:undefined,
+ un_addClass_notice:"",
+ un_choose_notice:""
+ }
+ }
+ // 拒绝
+ aboutTopic=(id)=>{
+ this.setState({
+ modalsType:true,
+ modalsTopval:'是否确认拒绝学生选题?',
+ operationId:id
+ })
+ }
+ cancelAboutTopic=()=>{
+ this.setState({
+ modalsType:false,
+ modalsTopval:''
+ })
+ }
+ sureAboutTopic=()=>{
+ let{operationId}=this.state
+ let courseId=this.props.match.params.course_id;
+ let graduation_topic_id=this.props.match.params.graduation_topic_id;
+ let url =`/courses/${courseId}/graduation_topics/${graduation_topic_id}/refuse_student_topic.json?student_graduation_topic=`+operationId;
+ axios.post(url).then((result)=>{
+ if(result.data.status==0){
+ this.props.showNotification(`${result.data.message}`);
+ this.setState({
+ modalsType:false,
+ modalsTopval:''
+ })
+ //成功后调用列表接口,刷新
+ this.props.getDetailList(this.props.page);
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ this.setState({
+ modalsType:false,
+ modalsTopval:''
+ })
+ }
+
+ //同意
+ agreeTopic=(id)=>{
+ this.setState({
+ agreeFlag:true,
+ operationId:id
+ })
+ }
+ hideAgreeTopic=()=>{
+ this.setState({
+ agreeFlag:false,
+ classesId:undefined
+ })
+ }
+ sureAgreeTopic=(count)=>{
+ if(count > 0){
+ let{tableData}=this.props;
+ let{operationId,classesId}=this.state
+ let courseId=this.props.match.params.course_id;
+ let name=tableData.group_list.filter(item=>item.group_id==classesId)[0].group_name;
+ this.agreeChoose(courseId,operationId,classesId,name);
+ }else{
+ this.setState({
+ un_choose_notice:"请先添加分班"
+ })
+ }
+ }
+
+ agreeChoose=(courseId,operationId,classesId,courseName)=>{
+ let graduation_topic_id=this.props.match.params.graduation_topic_id;
+ let url =`/courses/${courseId}/graduation_topics/${graduation_topic_id}/accept_student_topic.json`;
+ axios.post(url,{
+ student_graduation_topic_id:operationId,
+ group_id:classesId,
+ course_group_name:courseName
+ }).then((result)=>{
+ if(result.data.status==0){
+ this.props.showNotification(`${result.data.message}`);
+ this.setState({
+ agreeFlag:false,
+ agreeCheck:true,
+ visible:false
+ })
+ //成功后调用列表接口,刷新
+ this.props.getDetailList(this.props.page);
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
+
+ //切换分班
+ changeClasses=(value)=>{
+ this.setState({
+ classesId:value
+ })
+ }
+
+ //新增分班
+ topicAddClasses=()=>{
+ this.setState({
+ visible:true,
+ agreeFlag:false
+ })
+ }
+ hideClasses=()=>{
+ this.setState({
+ visible:false,
+ classesId:undefined
+ })
+ }
+
+ //新建分班--输入分班
+ inputClasses=(e)=>{
+ this.setState({
+ un_addClass:e.target.value
+ })
+ }
+
+ // 新建分班---确定
+ sureAddClass=()=>{
+ let {un_addClass}=this.state;
+ if(!un_addClass){
+ this.setState({
+ un_addClass_notice:"请输入分班名称"
+ })
+ return;
+ }
+ console.log(this.props)
+ let{operationId}=this.state
+ let courseId=this.props.match.params.course_id;
+ this.agreeChoose(courseId,operationId,-1,un_addClass);
+ }
+
+ render(){
+ let {page,tableData}=this.props
+ let { modalsType,modalsTopval,agreeFlag,classesId,visible
+ ,un_addClass_notice
+ ,un_addClass,
+ un_choose_notice
+ } = this.state
+ const isAdmin =this.props.isAdmin();
+ const isStudent =this.props.isStudent();
+ const isNotMember=this.props.isNotMember();
+ console.log(un_addClass_notice)
+ return(
+
+
+
+ 序号
+ 姓名
+ {isNotMember ?"" :学号}
+ 分班
+ 选题时间
+ 操作
+ {
+ isAdmin &&
+ 确认结果
+ }
+
+
+ {/* 拒绝弹框 */}
+
+ {/* 同意弹框 */}
+
+
+
确认同意学生的选题,将学生加入我的分班
+
+
选择:
+
+
+
{un_choose_notice}
+
+
+
+
+
+
+
+
+
分班:
+
+
+
+ {un_addClass_notice}
+
+
+
+
+
+
+
+ {
+ tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{
+ return(
+
+ {parseInt(key+1)+(parseInt(page-1)*15)}
+ {item.student_name}
+ {isNotMember ?"" :{item.student_id}}
+ {item.class_group_name || "--"}
+ {item.selected_time}
+ {
+ isAdmin &&
+
+ {
+ item.result == "待确认" ?
+
+ this.aboutTopic(`${item.id}`)}>拒绝
+ this.agreeTopic(`${item.id}`)}>同意
+ :
+ (
+ item.result === "已拒绝" ? --
+ :
+ this.aboutTopic(`${item.id}`)}>拒绝
+ )
+ }
+
+ }
+ {
+ isStudent &&
+ {item.result}
+ }
+ {
+ isAdmin &&
+ {item.result=== "待确认"?"--":item.result}
+ }
+ {
+ isNotMember && --
+ }
+
+
+ )
+ })
+ }
+ {
+ tableData.users_list && tableData.users_list.length == 0 &&
+ }
+
+
+
+ )
+ }
+}
export default GraduateTopicDetailTable;
\ No newline at end of file
diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index eb52a32f5..e819111c5 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -134,9 +134,6 @@ class CoursesNew extends Component {
let coursesId = this.props.match.params.coursesId;
let {is_public,datatime} = this.state
// console.log(is_public)
-
- debugger
-
if (coursesId != undefined) {
// 编辑
diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js
index 675e355f3..cf415aa28 100644
--- a/public/react/src/modules/courses/poll/PollNew.js
+++ b/public/react/src/modules/courses/poll/PollNew.js
@@ -2074,7 +2074,6 @@ class PollNew extends Component {
//最小值
HandleGradationGroupChangee = (value, index, max, length) => {
- debugger
var minbool = false;
var maxbool = false;
let arr = this.state.adddom;
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index 60a8512d5..db58e95fd 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -993,7 +993,7 @@ class Listofworksstudentone extends Component {
}
axios.post(urll, datasysl).then((result) => {
console.log("980000000____________________");
- debugger
+
if(result === undefined){
return
}
diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js
index 7629eeef2..395f2d9ba 100644
--- a/public/react/src/modules/login/LoginDialog.js
+++ b/public/react/src/modules/login/LoginDialog.js
@@ -337,6 +337,7 @@ class LoginDialog extends Component {
}
loginEDU=()=>{
+
let {loginValue,passValue,regular,isGoingValue}=this.state;
if(regular===1){
return
@@ -372,14 +373,16 @@ class LoginDialog extends Component {
this.setState({
isRender:false
})
+ this.props.Modifyloginvalue();
window.location.reload();
+
}
}
- try {
- this.props.Modifyloginvalue();
- }catch (e) {
-
- }
+ // try {
+ // this.props.Modifyloginvalue();
+ // }catch (e) {
+ //
+ // }
}).catch((error) => {
console.log("356");
console.log(error)
diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
index fc0a0fea9..5534dd415 100644
--- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
+++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
@@ -298,7 +298,6 @@ class DetailCardsEditAndAdd extends Component{
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
// console.log("到达底部");
- debugger
this.setState({
hometypepvisible:true
})
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 37fac626d..d96c59381 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -487,7 +487,6 @@ submittojoinclass=(value)=>{
}
showSearchOpen=(e)=>{
- debugger
this.setState({
showSearchOpentype:true
})
@@ -495,7 +494,6 @@ submittojoinclass=(value)=>{
}
hideshowSearchOpen=(e)=>{
- debugger
let {setevaluatinghides}=this.state;
if(setevaluatinghides===true){
this.setState({
@@ -520,7 +518,6 @@ submittojoinclass=(value)=>{
}
setevaluatinghides=()=>{
- debugger
this.setState(
{
setevaluatinghides:true