From 86eae252e8936b2de36037bbfee0ed517830a284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 20 Jun 2019 16:39:57 +0800 Subject: [PATCH 001/964] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../busyWork/reply/CommonWorkAppraiseReply.js | 2 +- .../tasks/GraduationTasksappraiseReply.js | 2 +- .../GraduationTasksappraiseReplyChild.js | 2 +- .../shixunHomework/Workquestionandanswer.js | 2 +- .../boards/TopicDetail.js | 0 .../busyWork/CommonWorkAppraise.js | 0 .../busyWork/reply/CommonWorkAppraiseReply.js | 315 +++++++++++ .../common/CommentsHelper.js | 0 .../tasks/GraduationTasksappraiseReply.js | 193 +++++++ .../GraduationTasksappraiseReplyChild.js | 103 ++++ .../modules/{Courses => courses}/poll/Poll.js | 0 .../shixunHomework/Workquestionandanswer.js | 511 ++++++++++++++++++ .../react/src/modules/login/EducoderLogin.js | 342 ++++++------ 13 files changed, 1297 insertions(+), 175 deletions(-) rename public/react/src/modules/{Courses => courses}/boards/TopicDetail.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/CommonWorkAppraise.js (100%) create mode 100644 public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js rename public/react/src/modules/{Courses => courses}/common/CommentsHelper.js (100%) create mode 100644 public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReply.js create mode 100644 public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js rename public/react/src/modules/{Courses => courses}/poll/Poll.js (100%) create mode 100644 public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js diff --git a/public/react/src/modules/Courses/busyWork/reply/CommonWorkAppraiseReply.js b/public/react/src/modules/Courses/busyWork/reply/CommonWorkAppraiseReply.js index 740d1b66b..7e0c267a4 100644 --- a/public/react/src/modules/Courses/busyWork/reply/CommonWorkAppraiseReply.js +++ b/public/react/src/modules/Courses/busyWork/reply/CommonWorkAppraiseReply.js @@ -11,7 +11,7 @@ import GraduationTasksappraiseMainEditor from '../../graduation/tasks/Graduation import CCommentItem from '../../common/comments/CCommentItem'; import '../../../forums/Post.css'; import '../../../comment/Comment.css'; -import '../../../courses/common/courseMessage.css'; +import '../../common/courseMessage.css'; import '../../graduation/tasks/GraduationTasksappraiseReply.css'; import './CommonWorkAppraiseReply.css'; diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReply.js b/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReply.js index 372690d1c..69ab8ba79 100644 --- a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReply.js +++ b/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReply.js @@ -7,7 +7,7 @@ import {ImageLayerOfCommentHOC} from '../../../page/layers/ImageLayerOfCommentHO import GraduationTasksappraiseReplyChild from './GraduationTasksappraiseReplyChild'; import '../../../forums/Post.css' import '../../../comment/Comment.css' -import '../../../courses/common/courseMessage.css' +import '../../common/courseMessage.css' import './GraduationTasksappraiseReply.css' const REPLY_PAGE_COUNT = 10 diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReplyChild.js b/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReplyChild.js index 11139112e..094f8d96f 100644 --- a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReplyChild.js +++ b/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReplyChild.js @@ -5,7 +5,7 @@ import GraduationTasksappraiseMainEditor from './GraduationTasksappraiseMainEdit import Graduationtaskitem from './Graduationtaskitem' import '../../../forums/Post.css' import '../../../comment/Comment.css' -import '../../../courses/common/courseMessage.css' +import '../../common/courseMessage.css' import './GraduationTasksappraiseReply.css' import ModulationModal from "../../coursesPublic/ModulationModal"; import Modals from '../../../modals/Modals'; diff --git a/public/react/src/modules/Courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/Courses/shixunHomework/Workquestionandanswer.js index 06a4924fa..419bca1b5 100644 --- a/public/react/src/modules/Courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/Courses/shixunHomework/Workquestionandanswer.js @@ -1,7 +1,7 @@ import React, {Component} from "react"; import CoursesListType from '../coursesPublic/CoursesListType'; import {WordsBtn,ActionBtn,markdownToHTML} from 'educoder'; -import GraduateTopicReply from '../../courses/graduation/topics/GraduateTopicReply' +import GraduateTopicReply from '../graduation/topics/GraduateTopicReply' import MemoDetailMDEditortwo from '../../forums/MemoDetailMDEditortwo' import { Form, diff --git a/public/react/src/modules/Courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js similarity index 100% rename from public/react/src/modules/Courses/boards/TopicDetail.js rename to public/react/src/modules/courses/boards/TopicDetail.js diff --git a/public/react/src/modules/Courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/CommonWorkAppraise.js rename to public/react/src/modules/courses/busyWork/CommonWorkAppraise.js diff --git a/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js b/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js new file mode 100644 index 000000000..740d1b66b --- /dev/null +++ b/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js @@ -0,0 +1,315 @@ +import React,{ Component } from "react"; +import { Pagination } from "antd"; + +import update from 'immutability-helper'; +import axios from 'axios'; +import moment from 'moment'; +import _ from 'lodash'; + +import {ImageLayerOfCommentHOC} from '../../../page/layers/ImageLayerOfCommentHOC'; +import GraduationTasksappraiseMainEditor from '../../graduation/tasks/GraduationTasksappraiseMainEditor'; +import CCommentItem from '../../common/comments/CCommentItem'; +import '../../../forums/Post.css'; +import '../../../comment/Comment.css'; +import '../../../courses/common/courseMessage.css'; + +import '../../graduation/tasks/GraduationTasksappraiseReply.css'; +import './CommonWorkAppraiseReply.css'; +import ModulationModal from "../../coursesPublic/ModulationModal"; +import Modals from '../../../modals/Modals'; +const REPLY_PAGE_COUNT = 10 +const $ = window.$; + +/* + +*/ +class CommonWorkAppraiseReply extends Component{ + constructor(props){ + super(props); + + this.editorRef = React.createRef(); + + this.state={ + total_count: 0, + comment_scores: [], + } + } + + fetchAllComments = () => { + let category_id= this.props.match.params.category_id; + // const url = `/graduation_works/${category_id}/comment_list.json` + const task_id = this.props.task_id + const url = `/student_works/${task_id}/comment_list.json` + axios.get(url).then((result)=>{ + if(result.data.comment_scores){ + const comment_scores = result.data.comment_scores.map(item => { + return this.transformReply(item) + }) + this.setState({ + ...result.data, + comment_scores + }) + } + }).catch((error)=>{ + console.log(error) + }) + } + replySuccess = () => { + this.fetchAllComments() + } + componentDidMount(){ + this.fetchAllComments() + } + addSuccess = () => { + this.fetchAllComments() + } + + transformReply = (reply, children = []) => { + const isAdmin = this.props.isAdmin() + const isSuperAdmin = this.props.isSuperAdmin() + if (reply.appeal_info && reply.appeal_info.time) { + reply.appeal_info.user_info = { + "user_name": reply.appeal_info.user_name, + "user_login": reply.appeal_info.user_login, + "user_image_url": reply.appeal_info.user_image_url + } + reply.appeal_info.is_appeal_info = true + reply.appeal_info.appeal_status = reply.appeal_status + reply.appeal_info.score_id = reply.score_id + reply.journals.push(reply.appeal_info) + reply.journals = _.orderBy(reply.journals, 'time', 'asc') + } + + return { + isSuperAdmin: isSuperAdmin, + admin: isAdmin, // + journals: reply.journals, + appeal_status: reply.appeal_status, + attachments: reply.attachments, + can_appeal: reply.can_appeal, + can_reply: reply.can_reply, + child_message_count: reply.child_message_count, + id: reply.comment_id, + // time: moment(reply.comment_time).fromNow(), + time: moment(reply.comment_time).format('YYYY-MM-DD HH:mm'), + + image_url: reply.user_image_url, + user_id: reply.user_id, + user_login: reply.user_login, + username: reply.user_name, + content: reply.content, + + score: reply.score, + delete: reply.delete, + is_invalid: reply.is_invalid, + comment_role: reply.comment_role + } + } + onDelete = (item) => { + this.props.confirm({ + content: '确定要删除这个评阅吗?', + okText: '确定', + cancelText: '取消', + onOk: () => { + let category_id= this.props.match.params.category_id; + const url = `/graduation_works/${category_id}/delete_score.json?comment_id=${item.id}` + axios.delete(url).then((result)=>{ + if(result.data.status == 0){ + this.props.showNotification('删除成功') + this.fetchAllComments() + } + }).catch((error)=>{ + console.log(error) + }) + }, + onCancel() { + console.log('Cancel'); + }, + }); + + } + + showModulationtype=(id)=>{ + // console.log(id) + + this.setState({ + Modulationtype:true, + operationId:id + }) + + } + + cancelmodel=()=>{ + + this.setState({ + Modalstype:false, + Loadtype:false, + visible:false, + Modulationtype:false, + Allocationtype:false, + Modalstopval:"", + ModalCancel:"", + ModalSave:"", + }) + + } + + + saveModulationModal=(value,num)=>{ + console.log(value,num) + let {operationId}=this.state; + let studentWorkId =this.props.match.params.studentWorkId; + // console.log(value,num) + let url ="/student_works/"+studentWorkId+"/adjust_score.json"; + axios.post(url,{ + score:num, + comment:value + }).then((result)=>{ + // console.log(result) + if(result.data.status===0){ + // this.setState({ + // Modalstype:true, + // Allocationtype:false, + // Modalstopval:result.data.message, + // ModalSave:this.cancelmodel, + // }) + this.cancelmodel() + this.props.showNotification('调分成功') + this.props.onReplySuccess && this.props.onReplySuccess() + this.fetchAllComments(); + + } + + }).catch((error)=>{ + console.log(error) + }) + + } + onReply = (params) => { + const { task_id } = this.props; + const replyUrl = `/student_works/${task_id}/add_score.json` + axios.post(replyUrl, params).then((response)=>{ + if(response.data.status == 0) { + this.editorRef.current.clearInputs() + this.fetchAllComments(); + this.props.onReplySuccess && this.props.onReplySuccess() + } + + }).catch((error)=>{ + console.log(error) + }) + } + render(){ + let { total_count, comments, pageCount, comment_scores, allow_score } = this.state + const { current_user, memo, homework_status } = this.props + const isAdmin = this.props.isAdmin() + + const isNiPing = homework_status && homework_status.indexOf('匿评中') != -1 + /** + isAdmin || 评阅入口:超级管理员、老师和助教显示; -》 改成admin也不显示 + 匿评人:匿评期间显示 + */ + const needNiPingEditor = (allow_score && isNiPing); + if (!needNiPingEditor && comment_scores.length == 0) { + return '' + } + return( + +
+
+ + + + + {this.state.Modulationtype===true?this.saveModulationModal(value,num)} + closable={false} + footer={null} + destroyOnClose={true} + centered={true} + />:""} + + {/*
*/} + {/*

{datalist&&datalist.task_name}

*/} + {/*返回*/} + {/*{this.props.isStudent()?补交附件:""}*/} + {/*
*/} + + + + {/* { + (!!comment_scores.length && +
+ 全部评阅 + ({comment_scores.length}) +
)} */} +
+ {!!comment_scores.length &&
+ 全部评阅{comment_scores.length===0?"":`(${comment_scores.length})`} + + {/*
*/} + + {/* true: 老师身份显示“调分”入口,false: 不显示调分入口 */} + {isAdmin && !allow_score && + this.showModulationtype(this.props.task_id)}>调分 + } +
} + + {needNiPingEditor && } +
+ +
+ {/* + .course-message .panel-comment_item { + margin-top: ${needNiPingEditor ? 56 : 28}px; + } + */} + + {!!comment_scores.length &&
+ { comment_scores.map((item, index) => { + return + }) } +
} +
+ + +
+
+
+ ) + } +} +export default ImageLayerOfCommentHOC() (CommonWorkAppraiseReply); \ No newline at end of file diff --git a/public/react/src/modules/Courses/common/CommentsHelper.js b/public/react/src/modules/courses/common/CommentsHelper.js similarity index 100% rename from public/react/src/modules/Courses/common/CommentsHelper.js rename to public/react/src/modules/courses/common/CommentsHelper.js diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReply.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReply.js new file mode 100644 index 000000000..372690d1c --- /dev/null +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReply.js @@ -0,0 +1,193 @@ +import React,{ Component } from "react"; +import { Pagination } from "antd"; +import axios from 'axios' +import moment from 'moment' +import { getImageUrl,WordsBtn } from 'educoder'; +import {ImageLayerOfCommentHOC} from '../../../page/layers/ImageLayerOfCommentHOC'; +import GraduationTasksappraiseReplyChild from './GraduationTasksappraiseReplyChild'; +import '../../../forums/Post.css' +import '../../../comment/Comment.css' +import '../../../courses/common/courseMessage.css' +import './GraduationTasksappraiseReply.css' + +const REPLY_PAGE_COUNT = 10 +const $ = window.$; + +/* + +*/ +class GraduationTasksappraiseReply extends Component{ + constructor(props){ + super(props); + this.state={ + total_count: 0, + comment_scores: [] + } + } + + fetchAllComments = () => { + let category_id= this.props.match.params.category_id; + const url = `/graduation_works/${category_id}/comment_list.json` + axios.get(url).then((result)=>{ + if(result.data.comment_scores){ + const comment_scores = result.data.comment_scores.map(item => { + return this.transformReply(item) + }) + this.setState({ + ...result.data, + comment_scores + }) + } + }).catch((error)=>{ + console.log(error) + }) + } + componentDidMount(){ + this.fetchAllComments() + } + addSuccess = () => { + this.fetchAllComments() + } + + transformReply = (reply, children = []) => { + const isAdmin = this.props.isAdmin() + const isSuperAdmin = this.props.isSuperAdmin() + return { + isSuperAdmin: isSuperAdmin, + admin: isAdmin, // + children: children, + child_message_count: reply.child_message_count, + id: reply.comment_id, + image_url: reply.user_image_url, + // time: moment(reply.comment_time).fromNow(), + time: moment(reply.comment_time).format('YYYY-MM-DD HH:mm'), + user_login: reply.user_login, + username: reply.user_name, + content: reply.content, + + score: reply.score, + delete: reply.delete, + is_invalid: reply.is_invalid, + comment_role: reply.comment_role + } + } + onDelete = (item) => { + this.props.confirm({ + content: '确定要删除这个评阅吗?', + okText: '确定', + cancelText: '取消', + onOk: () => { + let category_id= this.props.match.params.category_id; + const url = `/graduation_works/${category_id}/delete_score.json?comment_id=${item.id}` + axios.delete(url).then((result)=>{ + if(result.data.status == 0){ + this.props.showNotification('删除成功') + this.fetchAllComments() + } + }).catch((error)=>{ + console.log(error) + }) + }, + onCancel() { + console.log('Cancel'); + }, + }); + + } + + showModulationtype=(id)=>{ + // console.log(id) + + this.setState({ + Modulationtype:true, + operationId:id + }) + + } + + cancelmodel=()=>{ + + this.setState({ + Modalstype:false, + Loadtype:false, + visible:false, + Modulationtype:false, + Allocationtype:false, + Modalstopval:"", + ModalCancel:"", + ModalSave:"", + }) + + } + + + saveModulationModal=(value,num)=>{ + console.log(value,num) + let {operationId}=this.state; + // console.log(value,num) + let url ="/graduation_works/"+operationId+"/adjust_score.json"; + axios.post(url,{ + score:num, + comment:value + }).then((result)=>{ + // console.log(result) + if(result.data.status===0){ + this.setState({ + Modalstype:true, + Allocationtype:false, + Modalstopval:result.data.message, + ModalSave:this.cancelmodel, + }) + } + + }).catch((error)=>{ + console.log(error) + }) + + } + + render(){ + let { total_count, comments, pageCount, comment_scores } = this.state + const { current_user, memo } = this.props + const isAdmin = this.props.isAdmin(); + const isStudent=this.props.isStudent(); + + + return( + +
+ {isStudent===true?comment_scores.length===0? +
+
+
+ +

没有数据可以显示!

+
+
+
: + this.showModulationtype(id)} + saveModulationModal={(value,num)=>this.saveModulationModal(value,num)} + addSuccess={this.addSuccess} + onDelete={this.onDelete} + /> + : + this.showModulationtype(id)} + saveModulationModal={(value,num)=>this.saveModulationModal(value,num)} + addSuccess={this.addSuccess} + onDelete={this.onDelete} + /> + } +
+
+ ) + } +} +export default ImageLayerOfCommentHOC() (GraduationTasksappraiseReply); \ No newline at end of file diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js new file mode 100644 index 000000000..11139112e --- /dev/null +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js @@ -0,0 +1,103 @@ +import React,{ Component } from "react"; +import { Pagination } from "antd"; +import {ImageLayerOfCommentHOC} from '../../../page/layers/ImageLayerOfCommentHOC' +import GraduationTasksappraiseMainEditor from './GraduationTasksappraiseMainEditor' +import Graduationtaskitem from './Graduationtaskitem' +import '../../../forums/Post.css' +import '../../../comment/Comment.css' +import '../../../courses/common/courseMessage.css' +import './GraduationTasksappraiseReply.css' +import ModulationModal from "../../coursesPublic/ModulationModal"; +import Modals from '../../../modals/Modals'; +const REPLY_PAGE_COUNT = 10 +const $ = window.$; + +class GraduationTasksappraiseReplyChild extends Component{ + constructor(props){ + super(props); + this.state={ + + } + } + + render(){ + let { total_count, comments, pageCount, comment_scores} = this.props; + + const isAdmin = this.props.isAdmin(); + const isStudent=this.props.isStudent(); + + + return( + + +
+ + + + + {this.props.Modulationtype===true?this.props.saveModulationModal(value,num)} + closable={false} + footer={null} + destroyOnClose={true} + centered={true} + />:""} + + {/*
*/} + {/*

{datalist&&datalist.task_name}

*/} + {/*返回*/} + {/*{this.props.isStudent()?补交附件:""}*/} + {/*
*/} + {this.props.ultimate===true? isAdmin && +
+ this.props.showModulationtype(this.props.task_id)}>调分 +
+ :""} + {this.props.ultimate===true?"":
+ 全部评阅 + { !!comment_scores.length && + {comment_scores.length===0?"":(comment_scores.length)} + } +
} + +
+ {/* style={{ display: (comments && !!comments.length) ? 'block' : 'none' }} */} + {/*
+ +
*/} + + {this.props.ultimate===true?"": isAdmin && } + +
+ { comment_scores.map(item => { + return + }) } +
+
+
+
+ ) + } +} +export default ImageLayerOfCommentHOC() (GraduationTasksappraiseReplyChild); \ No newline at end of file diff --git a/public/react/src/modules/Courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js similarity index 100% rename from public/react/src/modules/Courses/poll/Poll.js rename to public/react/src/modules/courses/poll/Poll.js diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js new file mode 100644 index 000000000..06a4924fa --- /dev/null +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -0,0 +1,511 @@ +import React, {Component} from "react"; +import CoursesListType from '../coursesPublic/CoursesListType'; +import {WordsBtn,ActionBtn,markdownToHTML} from 'educoder'; +import GraduateTopicReply from '../../courses/graduation/topics/GraduateTopicReply' +import MemoDetailMDEditortwo from '../../forums/MemoDetailMDEditortwo' +import { + Form, + Select, + Input, + Button, + Checkbox, + Upload, + Icon, + message, + Modal, + Table, + Divider, + InputNumber, + Tag, + DatePicker, + Radio, + Tooltip, + notification +} from "antd"; +import {Link, Switch, Route, Redirect} from 'react-router-dom'; +import axios from 'axios'; +import '../css/members.css' +import "../common/formCommon.css" +import '../css/Courses.css' +import './style.css' +import 'antd/lib/pagination/style/index.css'; +import './Challenges.css' +import CommonReply from "../common/comments/CommonReply"; +import Homeworddescription from "../shixunHomework/Homeworddescription"; +import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; +import HomeworkModal from "../coursesPublic/HomeworkModal"; +// import Homeworddescription from "../shixunHomework/Homeworddescription"; + +const TextArea = Input.TextArea + +//GraduationTaskssetting.js + + +//作业问答页面 +class Workquestionandanswer extends Component { + //unifiedsetting 统一设置 + //allowreplenishment 允许补交 + //completionefficiencyscore 完成效率评分占比 + //level级别 + //proportion 比例 + constructor(props) { + super(props); + // this.props.form.setFieldsValue({ + // radiogroup:1, + // + // }); + this.state ={ + // namestring:"JFinal是基于Java语言的极速web开发框架,其核心设计目标是开发迅速、代码量少、学习简单、功能强大、轻量级、易扩展、`Restful`。在拥有Java语言所有优势的同时再拥有`ruby`、`python`等动态语言的开发效率。\r\n\r\n在本实训中,我们将基于JFinal框架搭建一个在线商城。我们会学习到如何合理设计`Model`来进行数据表映射和数据操作、如何设计`Controller`对请求进行合理的处理…… 通过本实训,您不仅能收获到具体框架和技术的使用经验,也能对项目架构设计等知识有所了解或巩固。\r\n\r\n
\r\n\t\r\n
\r\n\r\n本实训聚焦一个在线商城项目的核心业务逻辑实现。你将在这一过程中收获Java Web项目设计的基本思想,也能得到编程能力的一次跃升。", + props: props, + starttimetype: false, + endtimetype: false, + latetimetype: false, + allowlate: 1, + latepenaltytype: false, + unifiedsetting: false, + allowreplenishment: undefined, + completionefficiencyscore: false, + proportion: undefined, + level: undefined, + ealuation: false, + latededuction: undefined, + latedeductiontwo: undefined, + Showupdateinstructions:false, + database: false, + datasheet: false, + databasetwo: undefined, + datasheettwo: undefined, + publicwork: undefined, + memo: {id: "94", user_id: 1}, + polls_descriptiontest: "作业说明...", + jobdescriptiondisplay:"none", + score_open:false, + code_review:false + } + } + + componentDidMount() { + var homeworkid = this.props.match.params.homeworkid; + // console.log(homeworkid) + this.Gettitleinformation(homeworkid) + let query = this.props.location.pathname; + const type = query.split('/'); + this.setState({ + shixuntypes:type[3] + }) + } + + isupdatas=()=>{ + var homeworkid = this.props.match.params.homeworkid; + this.Gettitleinformation(homeworkid) + } + //获取题目信息 + Gettitleinformation = (homeworkid) => { + // console.log("获取题目信息"); + let url = `/homework_commons/${homeworkid}.json`; + axios.get(url).then((result) => { + if (result.status === 200) { + // console.log(url) + // console.log("设置页") + // console.log(JSON.stringify(result)) + this.setState({ + jobsettingsdata:result, + ...result.data + }) + } + }).catch((error) => { + console.log(error) + }) + } + jobdescriptiondisplaybj =()=>{ + this.setState({ + Showupdateinstructions:true, + }) + } + + //统一设置 + onChange = (e) => { + this.setState({ + unifiedsetting: e.target.checked, + }) + // console.log(e.target.checked); + } + + //立即发布 + homeworkstart = () => { + let homeworkid=this.props.match.params.homeworkid; + let url="/homework_commons/"+homeworkid+"/publish_groups.json"; + + axios.get(url).then((response) => { + + if (response.status === 200) { + let starttime = this.props.getNowFormatDates(1); + let endtime = this.props.getNowFormatDates(2); + this.setState({ + modalname: "立即发布", + modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, + visible: true, + Topval: "本操作只对“未发布”的对象生效", + Botvalleft: "暂不发布", + Botval: "则通过后续手动设置,定时发布", + starttime: "发布时间:" + starttime, + endtime: "截止时间:" + endtime, + Cancelname: "暂不发布", + Savesname: "立即发布", + Cancel: this.homeworkhide, + Saves: this.homeworkstartend, + course_groups: response.data.course_groups, + starttimes:starttime, + typs:"start", + }) + } + }).catch((error) => { + console.log(error) + }); + + } + //立即截止 + homeworkends = () => { + let homeworkid=this.props.match.params.homeworkid; + let url="/homework_commons/"+homeworkid+"/end_groups.json"; + + axios.get(url).then((response) => { + + if (response.status === 200) { + this.setState({}) + this.setState({ + modalname: "立即截止", + modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, + visible: true, + Topval: "本操作只对“提交中”的对象生效", + Botvalleft: "暂不截止", + Botval: "则将根据已设置的截止时间,定时截止", + Cancelname: "暂不截止", + Savesname: "立即截止", + Cancel: this.homeworkhide, + Saves: this.coursetaskend, + starttime: undefined, + endtime: undefined, + course_groups: response.data.course_groups, + typs:"end", + }) + } + }).catch((error) => { + console.log(error) + }); + + + } +// 立即发布 + homeworkstartend = (ds,endtime) => { + var homeworkid = this.props.match.params.homeworkid; + let {course_groupslist} = this.state; + + let coursesId = this.props.match.params.coursesId; + let url = "/courses/" + coursesId + "/homework_commons/publish_homework.json"; + axios.post(url, { + homework_ids: [homeworkid], + group_ids: course_groupslist, + end_time:endtime, + }).then((result) => { + if (result.status === 200) { + if (result.data.status === 0) { + notification.open({ + message:"提示", + description:result.data.message + }); + this.homeworkhide(); + } + + } + }).catch((error) => { + console.log(error); + }) + } + + //立即截止确定按钮 + coursetaskend = () => { + var homeworkid = this.props.match.params.homeworkid; + let {course_groupslist} = this.state; + + + const cid = this.props.match.params.coursesId; + let url = "/courses/" + cid + "/homework_commons/end_homework.json"; + axios.post(url, { + group_ids: course_groupslist, + homework_ids: [homeworkid], + }) + .then((response) => { + if (response.data.status == 0) { + notification.open({ + message:"提示", + description:response.data.message + }); + this.homeworkhide() + } + }) + .catch(function (error) { + console.log(error); + }); + } + ReleaseNotes=(explanations)=>{ + var homeworkid = this.props.match.params.homeworkid; + let url=`/homework_commons/${homeworkid}/update_explanation.json`; + axios.post((url), { + explanation: explanations + }) + .then((result)=>{ + if(result){ + this.props.showNotification(`${result.data.message}`); + this.setState({ + Showupdateinstructions:false + }) + var homeworkid = this.props.match.params.homeworkid; + // console.log(homeworkid) + this.Gettitleinformation(homeworkid) + } + }).catch((error)=>{ + console.log(error); + }) + } + + NOReleaseNotes=()=>{ + this.setState({ + Showupdateinstructions:false, + }) + } + workshowmodel=()=>{ + this.setState({ + showmodel:true + }) + } + + hideshowmodel=()=>{ + this.setState({ + showmodel:false + }) + } + + homeworkhide=()=>{ + this.isupdatas() + this.setState({ + modalname:undefined, + modaltype:undefined, + visible:false, + Topval:undefined, + Topvalright:undefined, + Botvalleft:undefined, + Botval:undefined, + starttime:undefined, + endtime:undefined, + Cancelname:undefined, + Savesname:undefined, + Cancel:undefined, + Saves:undefined, + StudentList_value:undefined, + addname:undefined, + addnametype:false, + addnametab:undefined, + typs:undefined, + starttimes:undefined, + }) + } + getcourse_groupslist=(id)=>{ + this.setState({ + course_groupslist:id + }) + } + render() { + const dateFormat = 'YYYY-MM-DD HH:mm:ss'; + let {starttimetype, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata,score_open,Showupdateinstructions + , homework_id} = this.state; + const radioStyle = { + display: 'block', + height: '30px', + lineHeight: '30px', + }; + const formItemLayout = { + labelCol: {span: 6}, + wrapperCol: {span: 14}, + }; + let coursesId = this.props.match.params.coursesId; + + + return ( +
+ {this.state.showmodel===true?this.hideshowmodel()} + updatas={()=>this.isupdatas()} + />:""} + {/*立即发布*/} + this.getcourse_groupslist(id)} + starttimes={this.state.starttimes} + typs={this.state.typs} + /> +
+
+

+ {jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name} + > + {jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name} + > + 作业详情 +

+
+
+

+ {jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name} +

+ + 返回 + 实训详情 + + +
+
+
+
+ {this.props.isAdmin() === true? 作品列表: + 作品列表 + // :作品列表(学生完成) + } + + 作业问答 + {this.props.isAdmin()? + this.state.code_review===false?"": + 代码查重:""} + + 设置 + {/*导出成绩*/} + {this.props.isAdmin() ? 导出 : ""} + {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? + 立即截止:"" : ""} + {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true? + 立即发布 :"": ""} + + + {this.props.isAdmin()? + this.state.code_review===true? + 代码查重 + :"":""} + +
+
+ + {jobsettingsdata === undefined|| jobsettingsdata.data.description===null? "" :
+ +
+
+ {/* /!*{}}>
+ {/* /!*{jobsettingsdata.data.description}*!/*/} + {/* */} +
+ {/*
*/} + {/*

*/} + {/* /!*{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?""*!/*/} + {/* */} + {/* /!*}*!/*/} + {/*

*/} + + {/*
*/} + +
} + +
+
作业说明:
+ { + this.props.isAdmin()&&this.props.isAdmin()===true ? + this.jobdescriptiondisplaybj()} > + :"" + } + +
+ + +
+ {jobsettingsdata === undefined ? "" : jobsettingsdata === null ? "" : jobsettingsdata === "null" ? "" : +
+ } +
+
+
+{/* */} + {/*
*/} + {/**/} + {/*
*/} + { Showupdateinstructions&& Showupdateinstructions === true? +
+ +
+ :"" + } + { homework_id && + } + + +
+ + + + ) + } +} + +export default Workquestionandanswer; \ No newline at end of file diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index 46c953f32..94341d7e2 100644 --- a/public/react/src/modules/login/EducoderLogin.js +++ b/public/react/src/modules/login/EducoderLogin.js @@ -1,172 +1,172 @@ -import React, {Component} from "react"; -import { - Form, - Select, - Input, - Button, - Checkbox, - Upload, - Icon, - message, - Modal, - Table, - Divider, - InputNumber, - Tag, - DatePicker, - Radio, - Tooltip, - notification -} from "antd"; -import {Link, Switch, Route, Redirect} from 'react-router-dom'; -import '../../modules/courses/css/members.css'; -import "../../modules/courses/common/formCommon.css" -import '../../modules/courses/css/Courses.css'; -import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png'; -import educodernet from '../../../src/images/login/educodernet.png'; -import LoginRegisterComponent from '../user/LoginRegisterComponent'; -import FindPasswordComponent from '../user/FindPasswordComponent'; -import passopen from "../../images/login/passopen.png"; -//educoder登入页面 -var sectionStyle = { - "height": "100%", - "width": "100%", - "min-width": "1000px", -// makesure here is String确保这里是一个字符串,以下是es6写法 - - -}; -var imgback = { - " background-size":"cover", -"background-repeat":"no-repeat", - backgroundImage: `url(${beijintulogontwo})`, -} -var imgmian ={ - "width": "100%", - "background": `url(${beijintulogontwo})`, - "height": "100%", - "position": "relative", -} - -var newContainer={ - "min-height": "100%", - "background": `url(${beijintulogontwo})`, - "height": "auto !important", - "position": "relative", -} -class EducoderLogin extends Component { - constructor(props) { - super(props); - if( props.match.url === "/changepassword" ){ - this.state = { - showbool: false, - } - }else { - if(props.match.url === "/login"){ - this.state = { - showbool: true, - loginstatus:true - } - }else if(props.match.url === "/register"){ - this.state = { - showbool: true, - loginstatus:false, - } - }else{ - this.state = { - showbool: true, - } - } - - } - - } - - componentDidMount() { - - } - - Setshowbool = () => { - - if (this.state.showbool === true) { - this.setState({ - showbool: false - }) - - } else { - this.setState({ - showbool: true - }) - } - } - - - render() { - let {showbool} = this.state; - return ( -
- -
-
-
- -
- - -
- { - showbool === true ? -
-
- -
- - -
-
-
- : -
-
- -
- - -
-
-
- - } -
-
- ) - } - -} - +import React, {Component} from "react"; +import { + Form, + Select, + Input, + Button, + Checkbox, + Upload, + Icon, + message, + Modal, + Table, + Divider, + InputNumber, + Tag, + DatePicker, + Radio, + Tooltip, + notification +} from "antd"; +import {Link, Switch, Route, Redirect} from 'react-router-dom'; +import '../courses/css/members.css'; +import "../courses/common/formCommon.css" +import '../courses/css/Courses.css'; +import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png'; +import educodernet from '../../../src/images/login/educodernet.png'; +import LoginRegisterComponent from '../user/LoginRegisterComponent'; +import FindPasswordComponent from '../user/FindPasswordComponent'; +import passopen from "../../images/login/passopen.png"; +//educoder登入页面 +var sectionStyle = { + "height": "100%", + "width": "100%", + "min-width": "1000px", +// makesure here is String确保这里是一个字符串,以下是es6写法 + + +}; +var imgback = { + " background-size":"cover", +"background-repeat":"no-repeat", + backgroundImage: `url(${beijintulogontwo})`, +} +var imgmian ={ + "width": "100%", + "background": `url(${beijintulogontwo})`, + "height": "100%", + "position": "relative", +} + +var newContainer={ + "min-height": "100%", + "background": `url(${beijintulogontwo})`, + "height": "auto !important", + "position": "relative", +} +class EducoderLogin extends Component { + constructor(props) { + super(props); + if( props.match.url === "/changepassword" ){ + this.state = { + showbool: false, + } + }else { + if(props.match.url === "/login"){ + this.state = { + showbool: true, + loginstatus:true + } + }else if(props.match.url === "/register"){ + this.state = { + showbool: true, + loginstatus:false, + } + }else{ + this.state = { + showbool: true, + } + } + + } + + } + + componentDidMount() { + + } + + Setshowbool = () => { + + if (this.state.showbool === true) { + this.setState({ + showbool: false + }) + + } else { + this.setState({ + showbool: true + }) + } + } + + + render() { + let {showbool} = this.state; + return ( +
+ +
+
+
+ +
+ + +
+ { + showbool === true ? +
+
+ +
+ + +
+
+
+ : +
+
+ +
+ + +
+
+
+ + } +
+
+ ) + } + +} + export default EducoderLogin; \ No newline at end of file From 47ba7cb3331bfbfa2ba86a38b691d3142f519464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 20 Jun 2019 16:42:19 +0800 Subject: [PATCH 002/964] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../busyWork/reply/CommonWorkAppraiseReply.js | 315 ----------- .../tasks/GraduationTasksappraiseReply.js | 193 ------- .../GraduationTasksappraiseReplyChild.js | 103 ---- .../shixunHomework/Workquestionandanswer.js | 511 ------------------ .../{Courses => courses}/BoardIndex.js | 0 .../src/modules/{Courses => courses}/Index.js | 0 .../{Courses => courses}/ListPageIndex.js | 0 .../Resource/Fileslistitem.js | 0 .../{Courses => courses}/Resource/index.js | 0 .../{Courses => courses}/Resource/style.css | 0 .../boards/BoardsListItem.js | 0 .../{Courses => courses}/boards/BoardsNew.js | 0 .../boards/BoardsNewTemp.js | 0 .../boards/TopicDetail.css | 0 .../{Courses => courses}/boards/board.css | 0 .../{Courses => courses}/boards/common.js | 0 .../{Courses => courses}/boards/index.js | 0 .../busyWork/CommonWorkAnswer.js | 0 .../busyWork/CommonWorkDetail.js | 0 .../busyWork/CommonWorkDetailIndex.js | 0 .../busyWork/CommonWorkItem.js | 0 .../busyWork/CommonWorkList.js | 0 .../busyWork/CommonWorkListTemplate.js | 0 .../busyWork/CommonWorkPost.js | 0 .../busyWork/CommonWorkQuestion.js | 0 .../busyWork/CommonWorkSetting.js | 0 .../busyWork/ConnectProject.js | 0 .../{Courses => courses}/busyWork/Index.js | 0 .../busyWork/IndexGroup.js | 0 .../{Courses => courses}/busyWork/NewWork.js | 0 .../busyWork/PublishRightnow.js | 0 .../{Courses => courses}/busyWork/UseBank.js | 0 .../{Courses => courses}/busyWork/common.js | 0 .../busyWork/common/TabRightComponents.js | 0 .../busyWork/common/WorkDetailPageHeader.js | 0 .../busyWork/commonWork.js | 0 .../reply/CommonWorkAppraiseReply.css | 0 .../busyWork/reply/CommonWorkAppraiseReply.js | 2 +- .../common/CBreadcrumb.js | 0 .../{Courses => courses}/common/CDropdown.js | 0 .../common/CNotificationHOC.js | 0 .../common/CourseLayoutComponent.js | 0 .../common/ModalWrapper.js | 0 .../common/button/CheckAllGroup.js | 0 .../common/comments/CCommentItem.js | 0 .../common/comments/CommonReply.js | 0 .../common/courseMessage.css | 0 .../common/formCommon.css | 0 .../common/titleSearch/ColorCountText.js | 0 .../common/titleSearch/TitleSearchSection.js | 0 .../coursesDetail/CoursesBanner.js | 0 .../coursesDetail/CoursesDetail.js | 0 .../coursesDetail/CoursesLeftNav.js | 0 .../coursesDetail/MainLeftNav.css | 0 .../coursesHome}/coursesHome.js | 0 .../coursesHome}/coursesHomeCard.js | 0 .../coursesHome}/css/CoursesHome.css | 0 .../coursesHome}/css/courses.jpg | Bin .../coursesPublic/AccessoryModal.js | 0 .../coursesPublic/AccessoryModal2.js | 0 .../coursesPublic/Addcourses.js | 0 .../coursesPublic/AddcoursesNav.js | 0 .../coursesPublic/AllocationModal.js | 0 .../coursesPublic/Associationmodel.js | 0 .../coursesPublic/CourseTag.css | 0 .../coursesPublic/CourseTag.js | 0 .../coursesPublic/CoursesListType.js | 0 .../coursesPublic/CoursesMarkdown.js | 0 .../coursesPublic/HomeworkModal.js | 0 .../coursesPublic/ModalsRename.js | 0 .../coursesPublic/ModulationModal.js | 0 .../coursesPublic/NoneData.js | 0 .../coursesPublic/PathModal.js | 0 .../coursesPublic/PublishModals.js | 0 .../coursesPublic/SelectResource.js | 0 .../coursesPublic/SelectSetting.js | 0 .../coursesPublic/SendToFilesModal.js | 0 .../coursesPublic/ShixunChooseModal.js | 0 .../coursesPublic/ShixunModal.js | 0 .../coursesPublic/Showoldfiles.js | 0 .../coursesPublic/Startshixuntask.js | 0 .../coursesPublic/form/SchoolSelect.js | 0 .../coursesPublic/makedown.css | 0 .../coursesPublic/modal/CheckCodeModal.js | 0 .../coursesPublic/modal/SendToCourseModal.js | 0 .../coursesPublic/modal/ShixunModal2.js | 0 .../coursesPublic/sendResource.js | 0 .../{Courses => courses}/css/Courses.css | 0 .../{Courses => courses}/css/busyWork.css | 0 .../{Courses => courses}/css/members.css | 0 .../exercise/Ecerciseallbackagain.js | 0 .../exercise/Ecercisemount.js | 0 .../{Courses => courses}/exercise/Exercise.js | 0 .../exercise/ExerciseDisplay.js | 0 .../exercise/ExerciseListItem.js | 0 .../exercise/ExerciseNew.js | 0 .../exercise/ExerciseReviewAndAnswer.js | 0 .../exercise/Exercisesetting.js | 0 .../exercise/Exercisestatisticalresult.js | 0 .../Exercisestatisticalresulttabel.js | 0 .../exercise/Exercisetablesmubu.js | 0 .../exercise/Studentshavecompletedthelist.js | 0 .../exercise/Testpapersettinghomepage.js | 0 .../exercise/new/JudgeDisplay.js | 0 .../exercise/new/JudgeEditor.js | 0 .../exercise/new/MainDisplay.js | 0 .../exercise/new/MainEditor.js | 0 .../exercise/new/NullChildEditor.js | 0 .../exercise/new/NullDisplay.js | 0 .../exercise/new/NullEditor.js | 0 .../exercise/new/NullMDEditor.js | 0 .../exercise/new/QestionDisplayHeader.js | 0 .../exercise/new/ShixunDisplay.js | 0 .../exercise/new/ShixunEditor.js | 0 .../exercise/new/SingleDisplay.js | 0 .../exercise/new/SingleEditor.js | 0 .../exercise/new/common.css | 0 .../exercise/new/common.js | 0 .../exercise/new/editorCommon.css | 0 .../exercise/question/fillEmpty.js | 0 .../exercise/question/multiple.js | 0 .../exercise/question/shixunAnswer.js | 0 .../exercise/question/shixunAnswerDetail.js | 0 .../exercise/question/simpleAnswer.js | 0 .../exercise/question/single.js | 0 .../{Courses => courses}/graduation/style.css | 0 .../graduation/tasks/GraduateTaskItem.js | 0 .../tasks/GraduationTasksSubmitedit.js | 0 .../tasks/GraduationTasksSubmitnew.js | 0 .../tasks/GraduationTasksappraise.js | 0 .../GraduationTasksappraiseMainEditor.js | 0 .../tasks/GraduationTasksappraiseReply.css | 0 .../tasks/GraduationTasksappraiseReply.js | 2 +- .../GraduationTasksappraiseReplyChild.js | 2 +- .../graduation/tasks/GraduationTasksedit.js | 0 .../graduation/tasks/GraduationTasksnew.js | 0 .../tasks/GraduationTaskssetting.js | 0 .../tasks/GraduationTaskssettingReply.js | 0 .../tasks/GraduationTaskssettinglist.js | 0 .../tasks/GraduationTaskssettingquestions.js | 0 .../graduation/tasks/Graduationtaskitem.js | 0 .../graduation/tasks/TaskPublishModal.js | 0 .../graduation/tasks/index.js | 0 .../topics/ChooseGraduateTopicModal.js | 0 .../graduation/topics/GraduateTopicDetail.js | 0 .../topics/GraduateTopicDetailInfo.js | 0 .../topics/GraduateTopicDetailTable.js | 0 .../graduation/topics/GraduateTopicItem.js | 0 .../graduation/topics/GraduateTopicNew.js | 0 .../topics/GraduateTopicPostWorksNew.js | 0 .../graduation/topics/GraduateTopicReply.css | 0 .../graduation/topics/GraduateTopicReply.js | 0 .../graduation/topics/index.js | 0 .../{Courses => courses}/members/common.js | 0 .../members/modal/AddAdminModal.js | 0 .../members/modal/AddGraduationGroupModal.js | 0 .../members/modal/AddStudentModal.js | 0 .../members/modal/AddTeacherModal.js | 0 .../members/studentsList.js | 0 .../members/teacherList.js | 0 .../{Courses => courses}/new/CoursesNew.js | 0 .../poll/PollDetailIndex.js | 0 .../poll/PollDetailTabFirst.js | 0 .../poll/PollDetailTabForth.js | 0 .../poll/PollDetailTabForthRules.js | 0 .../poll/PollDetailTabSecond.js | 0 .../poll/PollDetailTabThird.js | 0 .../{Courses => courses}/poll/PollInfo.js | 0 .../{Courses => courses}/poll/PollListItem.js | 0 .../{Courses => courses}/poll/PollNew.js | 0 .../poll/pollPublicBtn/CancelPublish.js | 0 .../poll/pollPublicBtn/ImmediatelyEnd.js | 0 .../poll/pollPublicBtn/ImmediatelyPublish.js | 0 .../{Courses => courses}/poll/pollStyle.css | 0 .../{Courses => courses}/polldepoly/Index.js | 0 .../polldepoly/pollmount.js | 0 .../{Courses => courses}/publicNav/listNav.js | 0 .../{Courses => courses}/publicNav/nav.css | 0 .../shixunHomework/Challenges.css | 0 .../shixunHomework/CommitSummary.js | 0 .../shixunHomework/Homeworddescription.js | 0 .../shixunHomework/Listofworks.js | 0 .../shixunHomework/Listofworksstudentone.js | 0 .../shixunHomework/ShixunStudentWork.js | 0 .../shixunHomework/ShixunWorkDetails.js | 0 .../shixunHomework/ShixunWorkReport.js | 0 .../shixunHomework/ShixunhomeWorkItem.js | 0 .../Shixunworkdetails/ShixunCustomsPass.js | 0 .../Shixunworkdetails/ShixunWorkModal.js | 0 .../TraineetraininginformationModal.js | 0 .../shixunHomework/Trainingjobsetting.js | 0 .../shixunHomework/Workquestionandanswer.js | 2 +- .../shixunHomework/shixunHomework.js | 0 .../shixunreport/ConclusionEvaluation.js | 0 .../shixunreport/Coursesshixundetails.js | 0 .../OfficialAcademicTranscript.js | 0 .../shixunreport/Shixunechart.js | 0 .../shixunHomework/style.css | 0 .../studentWork/CommitSummaryIndex.js | 0 .../studentWork/StudentHomework.js | 0 .../{Courses => courses}/user’s_manual.txt | 0 201 files changed, 4 insertions(+), 1126 deletions(-) delete mode 100644 public/react/src/modules/Courses/busyWork/reply/CommonWorkAppraiseReply.js delete mode 100644 public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReply.js delete mode 100644 public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReplyChild.js delete mode 100644 public/react/src/modules/Courses/shixunHomework/Workquestionandanswer.js rename public/react/src/modules/{Courses => courses}/BoardIndex.js (100%) rename public/react/src/modules/{Courses => courses}/Index.js (100%) rename public/react/src/modules/{Courses => courses}/ListPageIndex.js (100%) rename public/react/src/modules/{Courses => courses}/Resource/Fileslistitem.js (100%) rename public/react/src/modules/{Courses => courses}/Resource/index.js (100%) rename public/react/src/modules/{Courses => courses}/Resource/style.css (100%) rename public/react/src/modules/{Courses => courses}/boards/BoardsListItem.js (100%) rename public/react/src/modules/{Courses => courses}/boards/BoardsNew.js (100%) rename public/react/src/modules/{Courses => courses}/boards/BoardsNewTemp.js (100%) rename public/react/src/modules/{Courses => courses}/boards/TopicDetail.css (100%) rename public/react/src/modules/{Courses => courses}/boards/board.css (100%) rename public/react/src/modules/{Courses => courses}/boards/common.js (100%) rename public/react/src/modules/{Courses => courses}/boards/index.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/CommonWorkAnswer.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/CommonWorkDetail.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/CommonWorkDetailIndex.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/CommonWorkItem.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/CommonWorkList.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/CommonWorkListTemplate.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/CommonWorkPost.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/CommonWorkQuestion.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/CommonWorkSetting.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/ConnectProject.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/Index.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/IndexGroup.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/NewWork.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/PublishRightnow.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/UseBank.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/common.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/common/TabRightComponents.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/common/WorkDetailPageHeader.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/commonWork.js (100%) rename public/react/src/modules/{Courses => courses}/busyWork/reply/CommonWorkAppraiseReply.css (100%) rename public/react/src/modules/{Courses => courses}/common/CBreadcrumb.js (100%) rename public/react/src/modules/{Courses => courses}/common/CDropdown.js (100%) rename public/react/src/modules/{Courses => courses}/common/CNotificationHOC.js (100%) rename public/react/src/modules/{Courses => courses}/common/CourseLayoutComponent.js (100%) rename public/react/src/modules/{Courses => courses}/common/ModalWrapper.js (100%) rename public/react/src/modules/{Courses => courses}/common/button/CheckAllGroup.js (100%) rename public/react/src/modules/{Courses => courses}/common/comments/CCommentItem.js (100%) rename public/react/src/modules/{Courses => courses}/common/comments/CommonReply.js (100%) rename public/react/src/modules/{Courses => courses}/common/courseMessage.css (100%) rename public/react/src/modules/{Courses => courses}/common/formCommon.css (100%) rename public/react/src/modules/{Courses => courses}/common/titleSearch/ColorCountText.js (100%) rename public/react/src/modules/{Courses => courses}/common/titleSearch/TitleSearchSection.js (100%) rename public/react/src/modules/{Courses => courses}/coursesDetail/CoursesBanner.js (100%) rename public/react/src/modules/{Courses => courses}/coursesDetail/CoursesDetail.js (100%) rename public/react/src/modules/{Courses => courses}/coursesDetail/CoursesLeftNav.js (100%) rename public/react/src/modules/{Courses => courses}/coursesDetail/MainLeftNav.css (100%) rename public/react/src/modules/{Courses/CoursesHome => courses/coursesHome}/coursesHome.js (100%) rename public/react/src/modules/{Courses/CoursesHome => courses/coursesHome}/coursesHomeCard.js (100%) rename public/react/src/modules/{Courses/CoursesHome => courses/coursesHome}/css/CoursesHome.css (100%) rename public/react/src/modules/{Courses/CoursesHome => courses/coursesHome}/css/courses.jpg (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/AccessoryModal.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/AccessoryModal2.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/Addcourses.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/AddcoursesNav.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/AllocationModal.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/Associationmodel.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/CourseTag.css (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/CourseTag.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/CoursesListType.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/CoursesMarkdown.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/HomeworkModal.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/ModalsRename.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/ModulationModal.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/NoneData.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/PathModal.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/PublishModals.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/SelectResource.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/SelectSetting.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/SendToFilesModal.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/ShixunChooseModal.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/ShixunModal.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/Showoldfiles.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/Startshixuntask.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/form/SchoolSelect.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/makedown.css (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/modal/CheckCodeModal.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/modal/SendToCourseModal.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/modal/ShixunModal2.js (100%) rename public/react/src/modules/{Courses => courses}/coursesPublic/sendResource.js (100%) rename public/react/src/modules/{Courses => courses}/css/Courses.css (100%) rename public/react/src/modules/{Courses => courses}/css/busyWork.css (100%) rename public/react/src/modules/{Courses => courses}/css/members.css (100%) rename public/react/src/modules/{Courses => courses}/exercise/Ecerciseallbackagain.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/Ecercisemount.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/Exercise.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/ExerciseDisplay.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/ExerciseListItem.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/ExerciseNew.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/ExerciseReviewAndAnswer.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/Exercisesetting.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/Exercisestatisticalresult.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/Exercisestatisticalresulttabel.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/Exercisetablesmubu.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/Studentshavecompletedthelist.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/Testpapersettinghomepage.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/JudgeDisplay.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/JudgeEditor.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/MainDisplay.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/MainEditor.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/NullChildEditor.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/NullDisplay.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/NullEditor.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/NullMDEditor.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/QestionDisplayHeader.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/ShixunDisplay.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/ShixunEditor.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/SingleDisplay.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/SingleEditor.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/common.css (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/common.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/new/editorCommon.css (100%) rename public/react/src/modules/{Courses => courses}/exercise/question/fillEmpty.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/question/multiple.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/question/shixunAnswer.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/question/shixunAnswerDetail.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/question/simpleAnswer.js (100%) rename public/react/src/modules/{Courses => courses}/exercise/question/single.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/style.css (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/GraduateTaskItem.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/GraduationTasksSubmitedit.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/GraduationTasksSubmitnew.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/GraduationTasksappraise.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/GraduationTasksappraiseMainEditor.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/GraduationTasksappraiseReply.css (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/GraduationTasksedit.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/GraduationTasksnew.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/GraduationTaskssetting.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/GraduationTaskssettingReply.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/GraduationTaskssettinglist.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/GraduationTaskssettingquestions.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/Graduationtaskitem.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/TaskPublishModal.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/tasks/index.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/topics/ChooseGraduateTopicModal.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/topics/GraduateTopicDetail.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/topics/GraduateTopicDetailInfo.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/topics/GraduateTopicDetailTable.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/topics/GraduateTopicItem.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/topics/GraduateTopicNew.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/topics/GraduateTopicPostWorksNew.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/topics/GraduateTopicReply.css (100%) rename public/react/src/modules/{Courses => courses}/graduation/topics/GraduateTopicReply.js (100%) rename public/react/src/modules/{Courses => courses}/graduation/topics/index.js (100%) rename public/react/src/modules/{Courses => courses}/members/common.js (100%) rename public/react/src/modules/{Courses => courses}/members/modal/AddAdminModal.js (100%) rename public/react/src/modules/{Courses => courses}/members/modal/AddGraduationGroupModal.js (100%) rename public/react/src/modules/{Courses => courses}/members/modal/AddStudentModal.js (100%) rename public/react/src/modules/{Courses => courses}/members/modal/AddTeacherModal.js (100%) rename public/react/src/modules/{Courses => courses}/members/studentsList.js (100%) rename public/react/src/modules/{Courses => courses}/members/teacherList.js (100%) rename public/react/src/modules/{Courses => courses}/new/CoursesNew.js (100%) rename public/react/src/modules/{Courses => courses}/poll/PollDetailIndex.js (100%) rename public/react/src/modules/{Courses => courses}/poll/PollDetailTabFirst.js (100%) rename public/react/src/modules/{Courses => courses}/poll/PollDetailTabForth.js (100%) rename public/react/src/modules/{Courses => courses}/poll/PollDetailTabForthRules.js (100%) rename public/react/src/modules/{Courses => courses}/poll/PollDetailTabSecond.js (100%) rename public/react/src/modules/{Courses => courses}/poll/PollDetailTabThird.js (100%) rename public/react/src/modules/{Courses => courses}/poll/PollInfo.js (100%) rename public/react/src/modules/{Courses => courses}/poll/PollListItem.js (100%) rename public/react/src/modules/{Courses => courses}/poll/PollNew.js (100%) rename public/react/src/modules/{Courses => courses}/poll/pollPublicBtn/CancelPublish.js (100%) rename public/react/src/modules/{Courses => courses}/poll/pollPublicBtn/ImmediatelyEnd.js (100%) rename public/react/src/modules/{Courses => courses}/poll/pollPublicBtn/ImmediatelyPublish.js (100%) rename public/react/src/modules/{Courses => courses}/poll/pollStyle.css (100%) rename public/react/src/modules/{Courses => courses}/polldepoly/Index.js (100%) rename public/react/src/modules/{Courses => courses}/polldepoly/pollmount.js (100%) rename public/react/src/modules/{Courses => courses}/publicNav/listNav.js (100%) rename public/react/src/modules/{Courses => courses}/publicNav/nav.css (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/Challenges.css (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/CommitSummary.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/Homeworddescription.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/Listofworks.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/Listofworksstudentone.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/ShixunStudentWork.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/ShixunWorkDetails.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/ShixunWorkReport.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/ShixunhomeWorkItem.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/Shixunworkdetails/ShixunWorkModal.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/TraineetraininginformationModal.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/Trainingjobsetting.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/shixunHomework.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/shixunreport/ConclusionEvaluation.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/shixunreport/Coursesshixundetails.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/shixunreport/OfficialAcademicTranscript.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/shixunreport/Shixunechart.js (100%) rename public/react/src/modules/{Courses => courses}/shixunHomework/style.css (100%) rename public/react/src/modules/{Courses => courses}/studentWork/CommitSummaryIndex.js (100%) rename public/react/src/modules/{Courses => courses}/studentWork/StudentHomework.js (100%) rename public/react/src/modules/{Courses => courses}/user’s_manual.txt (100%) diff --git a/public/react/src/modules/Courses/busyWork/reply/CommonWorkAppraiseReply.js b/public/react/src/modules/Courses/busyWork/reply/CommonWorkAppraiseReply.js deleted file mode 100644 index 7e0c267a4..000000000 --- a/public/react/src/modules/Courses/busyWork/reply/CommonWorkAppraiseReply.js +++ /dev/null @@ -1,315 +0,0 @@ -import React,{ Component } from "react"; -import { Pagination } from "antd"; - -import update from 'immutability-helper'; -import axios from 'axios'; -import moment from 'moment'; -import _ from 'lodash'; - -import {ImageLayerOfCommentHOC} from '../../../page/layers/ImageLayerOfCommentHOC'; -import GraduationTasksappraiseMainEditor from '../../graduation/tasks/GraduationTasksappraiseMainEditor'; -import CCommentItem from '../../common/comments/CCommentItem'; -import '../../../forums/Post.css'; -import '../../../comment/Comment.css'; -import '../../common/courseMessage.css'; - -import '../../graduation/tasks/GraduationTasksappraiseReply.css'; -import './CommonWorkAppraiseReply.css'; -import ModulationModal from "../../coursesPublic/ModulationModal"; -import Modals from '../../../modals/Modals'; -const REPLY_PAGE_COUNT = 10 -const $ = window.$; - -/* - -*/ -class CommonWorkAppraiseReply extends Component{ - constructor(props){ - super(props); - - this.editorRef = React.createRef(); - - this.state={ - total_count: 0, - comment_scores: [], - } - } - - fetchAllComments = () => { - let category_id= this.props.match.params.category_id; - // const url = `/graduation_works/${category_id}/comment_list.json` - const task_id = this.props.task_id - const url = `/student_works/${task_id}/comment_list.json` - axios.get(url).then((result)=>{ - if(result.data.comment_scores){ - const comment_scores = result.data.comment_scores.map(item => { - return this.transformReply(item) - }) - this.setState({ - ...result.data, - comment_scores - }) - } - }).catch((error)=>{ - console.log(error) - }) - } - replySuccess = () => { - this.fetchAllComments() - } - componentDidMount(){ - this.fetchAllComments() - } - addSuccess = () => { - this.fetchAllComments() - } - - transformReply = (reply, children = []) => { - const isAdmin = this.props.isAdmin() - const isSuperAdmin = this.props.isSuperAdmin() - if (reply.appeal_info && reply.appeal_info.time) { - reply.appeal_info.user_info = { - "user_name": reply.appeal_info.user_name, - "user_login": reply.appeal_info.user_login, - "user_image_url": reply.appeal_info.user_image_url - } - reply.appeal_info.is_appeal_info = true - reply.appeal_info.appeal_status = reply.appeal_status - reply.appeal_info.score_id = reply.score_id - reply.journals.push(reply.appeal_info) - reply.journals = _.orderBy(reply.journals, 'time', 'asc') - } - - return { - isSuperAdmin: isSuperAdmin, - admin: isAdmin, // - journals: reply.journals, - appeal_status: reply.appeal_status, - attachments: reply.attachments, - can_appeal: reply.can_appeal, - can_reply: reply.can_reply, - child_message_count: reply.child_message_count, - id: reply.comment_id, - // time: moment(reply.comment_time).fromNow(), - time: moment(reply.comment_time).format('YYYY-MM-DD HH:mm'), - - image_url: reply.user_image_url, - user_id: reply.user_id, - user_login: reply.user_login, - username: reply.user_name, - content: reply.content, - - score: reply.score, - delete: reply.delete, - is_invalid: reply.is_invalid, - comment_role: reply.comment_role - } - } - onDelete = (item) => { - this.props.confirm({ - content: '确定要删除这个评阅吗?', - okText: '确定', - cancelText: '取消', - onOk: () => { - let category_id= this.props.match.params.category_id; - const url = `/graduation_works/${category_id}/delete_score.json?comment_id=${item.id}` - axios.delete(url).then((result)=>{ - if(result.data.status == 0){ - this.props.showNotification('删除成功') - this.fetchAllComments() - } - }).catch((error)=>{ - console.log(error) - }) - }, - onCancel() { - console.log('Cancel'); - }, - }); - - } - - showModulationtype=(id)=>{ - // console.log(id) - - this.setState({ - Modulationtype:true, - operationId:id - }) - - } - - cancelmodel=()=>{ - - this.setState({ - Modalstype:false, - Loadtype:false, - visible:false, - Modulationtype:false, - Allocationtype:false, - Modalstopval:"", - ModalCancel:"", - ModalSave:"", - }) - - } - - - saveModulationModal=(value,num)=>{ - console.log(value,num) - let {operationId}=this.state; - let studentWorkId =this.props.match.params.studentWorkId; - // console.log(value,num) - let url ="/student_works/"+studentWorkId+"/adjust_score.json"; - axios.post(url,{ - score:num, - comment:value - }).then((result)=>{ - // console.log(result) - if(result.data.status===0){ - // this.setState({ - // Modalstype:true, - // Allocationtype:false, - // Modalstopval:result.data.message, - // ModalSave:this.cancelmodel, - // }) - this.cancelmodel() - this.props.showNotification('调分成功') - this.props.onReplySuccess && this.props.onReplySuccess() - this.fetchAllComments(); - - } - - }).catch((error)=>{ - console.log(error) - }) - - } - onReply = (params) => { - const { task_id } = this.props; - const replyUrl = `/student_works/${task_id}/add_score.json` - axios.post(replyUrl, params).then((response)=>{ - if(response.data.status == 0) { - this.editorRef.current.clearInputs() - this.fetchAllComments(); - this.props.onReplySuccess && this.props.onReplySuccess() - } - - }).catch((error)=>{ - console.log(error) - }) - } - render(){ - let { total_count, comments, pageCount, comment_scores, allow_score } = this.state - const { current_user, memo, homework_status } = this.props - const isAdmin = this.props.isAdmin() - - const isNiPing = homework_status && homework_status.indexOf('匿评中') != -1 - /** - isAdmin || 评阅入口:超级管理员、老师和助教显示; -》 改成admin也不显示 - 匿评人:匿评期间显示 - */ - const needNiPingEditor = (allow_score && isNiPing); - if (!needNiPingEditor && comment_scores.length == 0) { - return '' - } - return( - -
-
- - - - - {this.state.Modulationtype===true?this.saveModulationModal(value,num)} - closable={false} - footer={null} - destroyOnClose={true} - centered={true} - />:""} - - {/*
*/} - {/*

{datalist&&datalist.task_name}

*/} - {/*返回*/} - {/*{this.props.isStudent()?补交附件:""}*/} - {/*
*/} - - - - {/* { - (!!comment_scores.length && -
- 全部评阅 - ({comment_scores.length}) -
)} */} -
- {!!comment_scores.length &&
- 全部评阅{comment_scores.length===0?"":`(${comment_scores.length})`} - - {/*
*/} - - {/* true: 老师身份显示“调分”入口,false: 不显示调分入口 */} - {isAdmin && !allow_score && - this.showModulationtype(this.props.task_id)}>调分 - } -
} - - {needNiPingEditor && } -
- -
- {/* - .course-message .panel-comment_item { - margin-top: ${needNiPingEditor ? 56 : 28}px; - } - */} - - {!!comment_scores.length &&
- { comment_scores.map((item, index) => { - return - }) } -
} -
- - -
-
-
- ) - } -} -export default ImageLayerOfCommentHOC() (CommonWorkAppraiseReply); \ No newline at end of file diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReply.js b/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReply.js deleted file mode 100644 index 69ab8ba79..000000000 --- a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReply.js +++ /dev/null @@ -1,193 +0,0 @@ -import React,{ Component } from "react"; -import { Pagination } from "antd"; -import axios from 'axios' -import moment from 'moment' -import { getImageUrl,WordsBtn } from 'educoder'; -import {ImageLayerOfCommentHOC} from '../../../page/layers/ImageLayerOfCommentHOC'; -import GraduationTasksappraiseReplyChild from './GraduationTasksappraiseReplyChild'; -import '../../../forums/Post.css' -import '../../../comment/Comment.css' -import '../../common/courseMessage.css' -import './GraduationTasksappraiseReply.css' - -const REPLY_PAGE_COUNT = 10 -const $ = window.$; - -/* - -*/ -class GraduationTasksappraiseReply extends Component{ - constructor(props){ - super(props); - this.state={ - total_count: 0, - comment_scores: [] - } - } - - fetchAllComments = () => { - let category_id= this.props.match.params.category_id; - const url = `/graduation_works/${category_id}/comment_list.json` - axios.get(url).then((result)=>{ - if(result.data.comment_scores){ - const comment_scores = result.data.comment_scores.map(item => { - return this.transformReply(item) - }) - this.setState({ - ...result.data, - comment_scores - }) - } - }).catch((error)=>{ - console.log(error) - }) - } - componentDidMount(){ - this.fetchAllComments() - } - addSuccess = () => { - this.fetchAllComments() - } - - transformReply = (reply, children = []) => { - const isAdmin = this.props.isAdmin() - const isSuperAdmin = this.props.isSuperAdmin() - return { - isSuperAdmin: isSuperAdmin, - admin: isAdmin, // - children: children, - child_message_count: reply.child_message_count, - id: reply.comment_id, - image_url: reply.user_image_url, - // time: moment(reply.comment_time).fromNow(), - time: moment(reply.comment_time).format('YYYY-MM-DD HH:mm'), - user_login: reply.user_login, - username: reply.user_name, - content: reply.content, - - score: reply.score, - delete: reply.delete, - is_invalid: reply.is_invalid, - comment_role: reply.comment_role - } - } - onDelete = (item) => { - this.props.confirm({ - content: '确定要删除这个评阅吗?', - okText: '确定', - cancelText: '取消', - onOk: () => { - let category_id= this.props.match.params.category_id; - const url = `/graduation_works/${category_id}/delete_score.json?comment_id=${item.id}` - axios.delete(url).then((result)=>{ - if(result.data.status == 0){ - this.props.showNotification('删除成功') - this.fetchAllComments() - } - }).catch((error)=>{ - console.log(error) - }) - }, - onCancel() { - console.log('Cancel'); - }, - }); - - } - - showModulationtype=(id)=>{ - // console.log(id) - - this.setState({ - Modulationtype:true, - operationId:id - }) - - } - - cancelmodel=()=>{ - - this.setState({ - Modalstype:false, - Loadtype:false, - visible:false, - Modulationtype:false, - Allocationtype:false, - Modalstopval:"", - ModalCancel:"", - ModalSave:"", - }) - - } - - - saveModulationModal=(value,num)=>{ - console.log(value,num) - let {operationId}=this.state; - // console.log(value,num) - let url ="/graduation_works/"+operationId+"/adjust_score.json"; - axios.post(url,{ - score:num, - comment:value - }).then((result)=>{ - // console.log(result) - if(result.data.status===0){ - this.setState({ - Modalstype:true, - Allocationtype:false, - Modalstopval:result.data.message, - ModalSave:this.cancelmodel, - }) - } - - }).catch((error)=>{ - console.log(error) - }) - - } - - render(){ - let { total_count, comments, pageCount, comment_scores } = this.state - const { current_user, memo } = this.props - const isAdmin = this.props.isAdmin(); - const isStudent=this.props.isStudent(); - - - return( - -
- {isStudent===true?comment_scores.length===0? -
-
-
- -

没有数据可以显示!

-
-
-
: - this.showModulationtype(id)} - saveModulationModal={(value,num)=>this.saveModulationModal(value,num)} - addSuccess={this.addSuccess} - onDelete={this.onDelete} - /> - : - this.showModulationtype(id)} - saveModulationModal={(value,num)=>this.saveModulationModal(value,num)} - addSuccess={this.addSuccess} - onDelete={this.onDelete} - /> - } -
-
- ) - } -} -export default ImageLayerOfCommentHOC() (GraduationTasksappraiseReply); \ No newline at end of file diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReplyChild.js b/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReplyChild.js deleted file mode 100644 index 094f8d96f..000000000 --- a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReplyChild.js +++ /dev/null @@ -1,103 +0,0 @@ -import React,{ Component } from "react"; -import { Pagination } from "antd"; -import {ImageLayerOfCommentHOC} from '../../../page/layers/ImageLayerOfCommentHOC' -import GraduationTasksappraiseMainEditor from './GraduationTasksappraiseMainEditor' -import Graduationtaskitem from './Graduationtaskitem' -import '../../../forums/Post.css' -import '../../../comment/Comment.css' -import '../../common/courseMessage.css' -import './GraduationTasksappraiseReply.css' -import ModulationModal from "../../coursesPublic/ModulationModal"; -import Modals from '../../../modals/Modals'; -const REPLY_PAGE_COUNT = 10 -const $ = window.$; - -class GraduationTasksappraiseReplyChild extends Component{ - constructor(props){ - super(props); - this.state={ - - } - } - - render(){ - let { total_count, comments, pageCount, comment_scores} = this.props; - - const isAdmin = this.props.isAdmin(); - const isStudent=this.props.isStudent(); - - - return( - - -
- - - - - {this.props.Modulationtype===true?this.props.saveModulationModal(value,num)} - closable={false} - footer={null} - destroyOnClose={true} - centered={true} - />:""} - - {/*
*/} - {/*

{datalist&&datalist.task_name}

*/} - {/*返回*/} - {/*{this.props.isStudent()?补交附件:""}*/} - {/*
*/} - {this.props.ultimate===true? isAdmin && -
- this.props.showModulationtype(this.props.task_id)}>调分 -
- :""} - {this.props.ultimate===true?"":
- 全部评阅 - { !!comment_scores.length && - {comment_scores.length===0?"":(comment_scores.length)} - } -
} - -
- {/* style={{ display: (comments && !!comments.length) ? 'block' : 'none' }} */} - {/*
- -
*/} - - {this.props.ultimate===true?"": isAdmin && } - -
- { comment_scores.map(item => { - return - }) } -
-
-
-
- ) - } -} -export default ImageLayerOfCommentHOC() (GraduationTasksappraiseReplyChild); \ No newline at end of file diff --git a/public/react/src/modules/Courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/Courses/shixunHomework/Workquestionandanswer.js deleted file mode 100644 index 419bca1b5..000000000 --- a/public/react/src/modules/Courses/shixunHomework/Workquestionandanswer.js +++ /dev/null @@ -1,511 +0,0 @@ -import React, {Component} from "react"; -import CoursesListType from '../coursesPublic/CoursesListType'; -import {WordsBtn,ActionBtn,markdownToHTML} from 'educoder'; -import GraduateTopicReply from '../graduation/topics/GraduateTopicReply' -import MemoDetailMDEditortwo from '../../forums/MemoDetailMDEditortwo' -import { - Form, - Select, - Input, - Button, - Checkbox, - Upload, - Icon, - message, - Modal, - Table, - Divider, - InputNumber, - Tag, - DatePicker, - Radio, - Tooltip, - notification -} from "antd"; -import {Link, Switch, Route, Redirect} from 'react-router-dom'; -import axios from 'axios'; -import '../css/members.css' -import "../common/formCommon.css" -import '../css/Courses.css' -import './style.css' -import 'antd/lib/pagination/style/index.css'; -import './Challenges.css' -import CommonReply from "../common/comments/CommonReply"; -import Homeworddescription from "../shixunHomework/Homeworddescription"; -import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; -import HomeworkModal from "../coursesPublic/HomeworkModal"; -// import Homeworddescription from "../shixunHomework/Homeworddescription"; - -const TextArea = Input.TextArea - -//GraduationTaskssetting.js - - -//作业问答页面 -class Workquestionandanswer extends Component { - //unifiedsetting 统一设置 - //allowreplenishment 允许补交 - //completionefficiencyscore 完成效率评分占比 - //level级别 - //proportion 比例 - constructor(props) { - super(props); - // this.props.form.setFieldsValue({ - // radiogroup:1, - // - // }); - this.state ={ - // namestring:"JFinal是基于Java语言的极速web开发框架,其核心设计目标是开发迅速、代码量少、学习简单、功能强大、轻量级、易扩展、`Restful`。在拥有Java语言所有优势的同时再拥有`ruby`、`python`等动态语言的开发效率。\r\n\r\n在本实训中,我们将基于JFinal框架搭建一个在线商城。我们会学习到如何合理设计`Model`来进行数据表映射和数据操作、如何设计`Controller`对请求进行合理的处理…… 通过本实训,您不仅能收获到具体框架和技术的使用经验,也能对项目架构设计等知识有所了解或巩固。\r\n\r\n
\r\n\t\r\n
\r\n\r\n本实训聚焦一个在线商城项目的核心业务逻辑实现。你将在这一过程中收获Java Web项目设计的基本思想,也能得到编程能力的一次跃升。", - props: props, - starttimetype: false, - endtimetype: false, - latetimetype: false, - allowlate: 1, - latepenaltytype: false, - unifiedsetting: false, - allowreplenishment: undefined, - completionefficiencyscore: false, - proportion: undefined, - level: undefined, - ealuation: false, - latededuction: undefined, - latedeductiontwo: undefined, - Showupdateinstructions:false, - database: false, - datasheet: false, - databasetwo: undefined, - datasheettwo: undefined, - publicwork: undefined, - memo: {id: "94", user_id: 1}, - polls_descriptiontest: "作业说明...", - jobdescriptiondisplay:"none", - score_open:false, - code_review:false - } - } - - componentDidMount() { - var homeworkid = this.props.match.params.homeworkid; - // console.log(homeworkid) - this.Gettitleinformation(homeworkid) - let query = this.props.location.pathname; - const type = query.split('/'); - this.setState({ - shixuntypes:type[3] - }) - } - - isupdatas=()=>{ - var homeworkid = this.props.match.params.homeworkid; - this.Gettitleinformation(homeworkid) - } - //获取题目信息 - Gettitleinformation = (homeworkid) => { - // console.log("获取题目信息"); - let url = `/homework_commons/${homeworkid}.json`; - axios.get(url).then((result) => { - if (result.status === 200) { - // console.log(url) - // console.log("设置页") - // console.log(JSON.stringify(result)) - this.setState({ - jobsettingsdata:result, - ...result.data - }) - } - }).catch((error) => { - console.log(error) - }) - } - jobdescriptiondisplaybj =()=>{ - this.setState({ - Showupdateinstructions:true, - }) - } - - //统一设置 - onChange = (e) => { - this.setState({ - unifiedsetting: e.target.checked, - }) - // console.log(e.target.checked); - } - - //立即发布 - homeworkstart = () => { - let homeworkid=this.props.match.params.homeworkid; - let url="/homework_commons/"+homeworkid+"/publish_groups.json"; - - axios.get(url).then((response) => { - - if (response.status === 200) { - let starttime = this.props.getNowFormatDates(1); - let endtime = this.props.getNowFormatDates(2); - this.setState({ - modalname: "立即发布", - modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, - visible: true, - Topval: "本操作只对“未发布”的对象生效", - Botvalleft: "暂不发布", - Botval: "则通过后续手动设置,定时发布", - starttime: "发布时间:" + starttime, - endtime: "截止时间:" + endtime, - Cancelname: "暂不发布", - Savesname: "立即发布", - Cancel: this.homeworkhide, - Saves: this.homeworkstartend, - course_groups: response.data.course_groups, - starttimes:starttime, - typs:"start", - }) - } - }).catch((error) => { - console.log(error) - }); - - } - //立即截止 - homeworkends = () => { - let homeworkid=this.props.match.params.homeworkid; - let url="/homework_commons/"+homeworkid+"/end_groups.json"; - - axios.get(url).then((response) => { - - if (response.status === 200) { - this.setState({}) - this.setState({ - modalname: "立即截止", - modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, - visible: true, - Topval: "本操作只对“提交中”的对象生效", - Botvalleft: "暂不截止", - Botval: "则将根据已设置的截止时间,定时截止", - Cancelname: "暂不截止", - Savesname: "立即截止", - Cancel: this.homeworkhide, - Saves: this.coursetaskend, - starttime: undefined, - endtime: undefined, - course_groups: response.data.course_groups, - typs:"end", - }) - } - }).catch((error) => { - console.log(error) - }); - - - } -// 立即发布 - homeworkstartend = (ds,endtime) => { - var homeworkid = this.props.match.params.homeworkid; - let {course_groupslist} = this.state; - - let coursesId = this.props.match.params.coursesId; - let url = "/courses/" + coursesId + "/homework_commons/publish_homework.json"; - axios.post(url, { - homework_ids: [homeworkid], - group_ids: course_groupslist, - end_time:endtime, - }).then((result) => { - if (result.status === 200) { - if (result.data.status === 0) { - notification.open({ - message:"提示", - description:result.data.message - }); - this.homeworkhide(); - } - - } - }).catch((error) => { - console.log(error); - }) - } - - //立即截止确定按钮 - coursetaskend = () => { - var homeworkid = this.props.match.params.homeworkid; - let {course_groupslist} = this.state; - - - const cid = this.props.match.params.coursesId; - let url = "/courses/" + cid + "/homework_commons/end_homework.json"; - axios.post(url, { - group_ids: course_groupslist, - homework_ids: [homeworkid], - }) - .then((response) => { - if (response.data.status == 0) { - notification.open({ - message:"提示", - description:response.data.message - }); - this.homeworkhide() - } - }) - .catch(function (error) { - console.log(error); - }); - } - ReleaseNotes=(explanations)=>{ - var homeworkid = this.props.match.params.homeworkid; - let url=`/homework_commons/${homeworkid}/update_explanation.json`; - axios.post((url), { - explanation: explanations - }) - .then((result)=>{ - if(result){ - this.props.showNotification(`${result.data.message}`); - this.setState({ - Showupdateinstructions:false - }) - var homeworkid = this.props.match.params.homeworkid; - // console.log(homeworkid) - this.Gettitleinformation(homeworkid) - } - }).catch((error)=>{ - console.log(error); - }) - } - - NOReleaseNotes=()=>{ - this.setState({ - Showupdateinstructions:false, - }) - } - workshowmodel=()=>{ - this.setState({ - showmodel:true - }) - } - - hideshowmodel=()=>{ - this.setState({ - showmodel:false - }) - } - - homeworkhide=()=>{ - this.isupdatas() - this.setState({ - modalname:undefined, - modaltype:undefined, - visible:false, - Topval:undefined, - Topvalright:undefined, - Botvalleft:undefined, - Botval:undefined, - starttime:undefined, - endtime:undefined, - Cancelname:undefined, - Savesname:undefined, - Cancel:undefined, - Saves:undefined, - StudentList_value:undefined, - addname:undefined, - addnametype:false, - addnametab:undefined, - typs:undefined, - starttimes:undefined, - }) - } - getcourse_groupslist=(id)=>{ - this.setState({ - course_groupslist:id - }) - } - render() { - const dateFormat = 'YYYY-MM-DD HH:mm:ss'; - let {starttimetype, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata,score_open,Showupdateinstructions - , homework_id} = this.state; - const radioStyle = { - display: 'block', - height: '30px', - lineHeight: '30px', - }; - const formItemLayout = { - labelCol: {span: 6}, - wrapperCol: {span: 14}, - }; - let coursesId = this.props.match.params.coursesId; - - - return ( -
- {this.state.showmodel===true?this.hideshowmodel()} - updatas={()=>this.isupdatas()} - />:""} - {/*立即发布*/} - this.getcourse_groupslist(id)} - starttimes={this.state.starttimes} - typs={this.state.typs} - /> -
-
-

- {jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name} - > - {jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name} - > - 作业详情 -

-
-
-

- {jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name} -

- - 返回 - 实训详情 - - -
-
-
-
- {this.props.isAdmin() === true? 作品列表: - 作品列表 - // :作品列表(学生完成) - } - - 作业问答 - {this.props.isAdmin()? - this.state.code_review===false?"": - 代码查重:""} - - 设置 - {/*导出成绩*/} - {this.props.isAdmin() ? 导出 : ""} - {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? - 立即截止:"" : ""} - {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true? - 立即发布 :"": ""} - - - {this.props.isAdmin()? - this.state.code_review===true? - 代码查重 - :"":""} - -
-
- - {jobsettingsdata === undefined|| jobsettingsdata.data.description===null? "" :
- -
-
- {/* /!*{}}>
- {/* /!*{jobsettingsdata.data.description}*!/*/} - {/* */} -
- {/*
*/} - {/*

*/} - {/* /!*{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?""*!/*/} - {/* */} - {/* /!*}*!/*/} - {/*

*/} - - {/*
*/} - -
} - -
-
作业说明:
- { - this.props.isAdmin()&&this.props.isAdmin()===true ? - this.jobdescriptiondisplaybj()} > - :"" - } - -
- - -
- {jobsettingsdata === undefined ? "" : jobsettingsdata === null ? "" : jobsettingsdata === "null" ? "" : -
- } -
-
-
-{/* */} - {/*
*/} - {/**/} - {/*
*/} - { Showupdateinstructions&& Showupdateinstructions === true? -
- -
- :"" - } - { homework_id && - } - - -
- - - - ) - } -} - -export default Workquestionandanswer; \ No newline at end of file diff --git a/public/react/src/modules/Courses/BoardIndex.js b/public/react/src/modules/courses/BoardIndex.js similarity index 100% rename from public/react/src/modules/Courses/BoardIndex.js rename to public/react/src/modules/courses/BoardIndex.js diff --git a/public/react/src/modules/Courses/Index.js b/public/react/src/modules/courses/Index.js similarity index 100% rename from public/react/src/modules/Courses/Index.js rename to public/react/src/modules/courses/Index.js diff --git a/public/react/src/modules/Courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js similarity index 100% rename from public/react/src/modules/Courses/ListPageIndex.js rename to public/react/src/modules/courses/ListPageIndex.js diff --git a/public/react/src/modules/Courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js similarity index 100% rename from public/react/src/modules/Courses/Resource/Fileslistitem.js rename to public/react/src/modules/courses/Resource/Fileslistitem.js diff --git a/public/react/src/modules/Courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js similarity index 100% rename from public/react/src/modules/Courses/Resource/index.js rename to public/react/src/modules/courses/Resource/index.js diff --git a/public/react/src/modules/Courses/Resource/style.css b/public/react/src/modules/courses/Resource/style.css similarity index 100% rename from public/react/src/modules/Courses/Resource/style.css rename to public/react/src/modules/courses/Resource/style.css diff --git a/public/react/src/modules/Courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js similarity index 100% rename from public/react/src/modules/Courses/boards/BoardsListItem.js rename to public/react/src/modules/courses/boards/BoardsListItem.js diff --git a/public/react/src/modules/Courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js similarity index 100% rename from public/react/src/modules/Courses/boards/BoardsNew.js rename to public/react/src/modules/courses/boards/BoardsNew.js diff --git a/public/react/src/modules/Courses/boards/BoardsNewTemp.js b/public/react/src/modules/courses/boards/BoardsNewTemp.js similarity index 100% rename from public/react/src/modules/Courses/boards/BoardsNewTemp.js rename to public/react/src/modules/courses/boards/BoardsNewTemp.js diff --git a/public/react/src/modules/Courses/boards/TopicDetail.css b/public/react/src/modules/courses/boards/TopicDetail.css similarity index 100% rename from public/react/src/modules/Courses/boards/TopicDetail.css rename to public/react/src/modules/courses/boards/TopicDetail.css diff --git a/public/react/src/modules/Courses/boards/board.css b/public/react/src/modules/courses/boards/board.css similarity index 100% rename from public/react/src/modules/Courses/boards/board.css rename to public/react/src/modules/courses/boards/board.css diff --git a/public/react/src/modules/Courses/boards/common.js b/public/react/src/modules/courses/boards/common.js similarity index 100% rename from public/react/src/modules/Courses/boards/common.js rename to public/react/src/modules/courses/boards/common.js diff --git a/public/react/src/modules/Courses/boards/index.js b/public/react/src/modules/courses/boards/index.js similarity index 100% rename from public/react/src/modules/Courses/boards/index.js rename to public/react/src/modules/courses/boards/index.js diff --git a/public/react/src/modules/Courses/busyWork/CommonWorkAnswer.js b/public/react/src/modules/courses/busyWork/CommonWorkAnswer.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/CommonWorkAnswer.js rename to public/react/src/modules/courses/busyWork/CommonWorkAnswer.js diff --git a/public/react/src/modules/Courses/busyWork/CommonWorkDetail.js b/public/react/src/modules/courses/busyWork/CommonWorkDetail.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/CommonWorkDetail.js rename to public/react/src/modules/courses/busyWork/CommonWorkDetail.js diff --git a/public/react/src/modules/Courses/busyWork/CommonWorkDetailIndex.js b/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/CommonWorkDetailIndex.js rename to public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js diff --git a/public/react/src/modules/Courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/CommonWorkItem.js rename to public/react/src/modules/courses/busyWork/CommonWorkItem.js diff --git a/public/react/src/modules/Courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/CommonWorkList.js rename to public/react/src/modules/courses/busyWork/CommonWorkList.js diff --git a/public/react/src/modules/Courses/busyWork/CommonWorkListTemplate.js b/public/react/src/modules/courses/busyWork/CommonWorkListTemplate.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/CommonWorkListTemplate.js rename to public/react/src/modules/courses/busyWork/CommonWorkListTemplate.js diff --git a/public/react/src/modules/Courses/busyWork/CommonWorkPost.js b/public/react/src/modules/courses/busyWork/CommonWorkPost.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/CommonWorkPost.js rename to public/react/src/modules/courses/busyWork/CommonWorkPost.js diff --git a/public/react/src/modules/Courses/busyWork/CommonWorkQuestion.js b/public/react/src/modules/courses/busyWork/CommonWorkQuestion.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/CommonWorkQuestion.js rename to public/react/src/modules/courses/busyWork/CommonWorkQuestion.js diff --git a/public/react/src/modules/Courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/CommonWorkSetting.js rename to public/react/src/modules/courses/busyWork/CommonWorkSetting.js diff --git a/public/react/src/modules/Courses/busyWork/ConnectProject.js b/public/react/src/modules/courses/busyWork/ConnectProject.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/ConnectProject.js rename to public/react/src/modules/courses/busyWork/ConnectProject.js diff --git a/public/react/src/modules/Courses/busyWork/Index.js b/public/react/src/modules/courses/busyWork/Index.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/Index.js rename to public/react/src/modules/courses/busyWork/Index.js diff --git a/public/react/src/modules/Courses/busyWork/IndexGroup.js b/public/react/src/modules/courses/busyWork/IndexGroup.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/IndexGroup.js rename to public/react/src/modules/courses/busyWork/IndexGroup.js diff --git a/public/react/src/modules/Courses/busyWork/NewWork.js b/public/react/src/modules/courses/busyWork/NewWork.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/NewWork.js rename to public/react/src/modules/courses/busyWork/NewWork.js diff --git a/public/react/src/modules/Courses/busyWork/PublishRightnow.js b/public/react/src/modules/courses/busyWork/PublishRightnow.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/PublishRightnow.js rename to public/react/src/modules/courses/busyWork/PublishRightnow.js diff --git a/public/react/src/modules/Courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/UseBank.js rename to public/react/src/modules/courses/busyWork/UseBank.js diff --git a/public/react/src/modules/Courses/busyWork/common.js b/public/react/src/modules/courses/busyWork/common.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/common.js rename to public/react/src/modules/courses/busyWork/common.js diff --git a/public/react/src/modules/Courses/busyWork/common/TabRightComponents.js b/public/react/src/modules/courses/busyWork/common/TabRightComponents.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/common/TabRightComponents.js rename to public/react/src/modules/courses/busyWork/common/TabRightComponents.js diff --git a/public/react/src/modules/Courses/busyWork/common/WorkDetailPageHeader.js b/public/react/src/modules/courses/busyWork/common/WorkDetailPageHeader.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/common/WorkDetailPageHeader.js rename to public/react/src/modules/courses/busyWork/common/WorkDetailPageHeader.js diff --git a/public/react/src/modules/Courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js similarity index 100% rename from public/react/src/modules/Courses/busyWork/commonWork.js rename to public/react/src/modules/courses/busyWork/commonWork.js diff --git a/public/react/src/modules/Courses/busyWork/reply/CommonWorkAppraiseReply.css b/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.css similarity index 100% rename from public/react/src/modules/Courses/busyWork/reply/CommonWorkAppraiseReply.css rename to public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.css diff --git a/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js b/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js index 740d1b66b..7e0c267a4 100644 --- a/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js +++ b/public/react/src/modules/courses/busyWork/reply/CommonWorkAppraiseReply.js @@ -11,7 +11,7 @@ import GraduationTasksappraiseMainEditor from '../../graduation/tasks/Graduation import CCommentItem from '../../common/comments/CCommentItem'; import '../../../forums/Post.css'; import '../../../comment/Comment.css'; -import '../../../courses/common/courseMessage.css'; +import '../../common/courseMessage.css'; import '../../graduation/tasks/GraduationTasksappraiseReply.css'; import './CommonWorkAppraiseReply.css'; diff --git a/public/react/src/modules/Courses/common/CBreadcrumb.js b/public/react/src/modules/courses/common/CBreadcrumb.js similarity index 100% rename from public/react/src/modules/Courses/common/CBreadcrumb.js rename to public/react/src/modules/courses/common/CBreadcrumb.js diff --git a/public/react/src/modules/Courses/common/CDropdown.js b/public/react/src/modules/courses/common/CDropdown.js similarity index 100% rename from public/react/src/modules/Courses/common/CDropdown.js rename to public/react/src/modules/courses/common/CDropdown.js diff --git a/public/react/src/modules/Courses/common/CNotificationHOC.js b/public/react/src/modules/courses/common/CNotificationHOC.js similarity index 100% rename from public/react/src/modules/Courses/common/CNotificationHOC.js rename to public/react/src/modules/courses/common/CNotificationHOC.js diff --git a/public/react/src/modules/Courses/common/CourseLayoutComponent.js b/public/react/src/modules/courses/common/CourseLayoutComponent.js similarity index 100% rename from public/react/src/modules/Courses/common/CourseLayoutComponent.js rename to public/react/src/modules/courses/common/CourseLayoutComponent.js diff --git a/public/react/src/modules/Courses/common/ModalWrapper.js b/public/react/src/modules/courses/common/ModalWrapper.js similarity index 100% rename from public/react/src/modules/Courses/common/ModalWrapper.js rename to public/react/src/modules/courses/common/ModalWrapper.js diff --git a/public/react/src/modules/Courses/common/button/CheckAllGroup.js b/public/react/src/modules/courses/common/button/CheckAllGroup.js similarity index 100% rename from public/react/src/modules/Courses/common/button/CheckAllGroup.js rename to public/react/src/modules/courses/common/button/CheckAllGroup.js diff --git a/public/react/src/modules/Courses/common/comments/CCommentItem.js b/public/react/src/modules/courses/common/comments/CCommentItem.js similarity index 100% rename from public/react/src/modules/Courses/common/comments/CCommentItem.js rename to public/react/src/modules/courses/common/comments/CCommentItem.js diff --git a/public/react/src/modules/Courses/common/comments/CommonReply.js b/public/react/src/modules/courses/common/comments/CommonReply.js similarity index 100% rename from public/react/src/modules/Courses/common/comments/CommonReply.js rename to public/react/src/modules/courses/common/comments/CommonReply.js diff --git a/public/react/src/modules/Courses/common/courseMessage.css b/public/react/src/modules/courses/common/courseMessage.css similarity index 100% rename from public/react/src/modules/Courses/common/courseMessage.css rename to public/react/src/modules/courses/common/courseMessage.css diff --git a/public/react/src/modules/Courses/common/formCommon.css b/public/react/src/modules/courses/common/formCommon.css similarity index 100% rename from public/react/src/modules/Courses/common/formCommon.css rename to public/react/src/modules/courses/common/formCommon.css diff --git a/public/react/src/modules/Courses/common/titleSearch/ColorCountText.js b/public/react/src/modules/courses/common/titleSearch/ColorCountText.js similarity index 100% rename from public/react/src/modules/Courses/common/titleSearch/ColorCountText.js rename to public/react/src/modules/courses/common/titleSearch/ColorCountText.js diff --git a/public/react/src/modules/Courses/common/titleSearch/TitleSearchSection.js b/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js similarity index 100% rename from public/react/src/modules/Courses/common/titleSearch/TitleSearchSection.js rename to public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js diff --git a/public/react/src/modules/Courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js similarity index 100% rename from public/react/src/modules/Courses/coursesDetail/CoursesBanner.js rename to public/react/src/modules/courses/coursesDetail/CoursesBanner.js diff --git a/public/react/src/modules/Courses/coursesDetail/CoursesDetail.js b/public/react/src/modules/courses/coursesDetail/CoursesDetail.js similarity index 100% rename from public/react/src/modules/Courses/coursesDetail/CoursesDetail.js rename to public/react/src/modules/courses/coursesDetail/CoursesDetail.js diff --git a/public/react/src/modules/Courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js similarity index 100% rename from public/react/src/modules/Courses/coursesDetail/CoursesLeftNav.js rename to public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js diff --git a/public/react/src/modules/Courses/coursesDetail/MainLeftNav.css b/public/react/src/modules/courses/coursesDetail/MainLeftNav.css similarity index 100% rename from public/react/src/modules/Courses/coursesDetail/MainLeftNav.css rename to public/react/src/modules/courses/coursesDetail/MainLeftNav.css diff --git a/public/react/src/modules/Courses/CoursesHome/coursesHome.js b/public/react/src/modules/courses/coursesHome/coursesHome.js similarity index 100% rename from public/react/src/modules/Courses/CoursesHome/coursesHome.js rename to public/react/src/modules/courses/coursesHome/coursesHome.js diff --git a/public/react/src/modules/Courses/CoursesHome/coursesHomeCard.js b/public/react/src/modules/courses/coursesHome/coursesHomeCard.js similarity index 100% rename from public/react/src/modules/Courses/CoursesHome/coursesHomeCard.js rename to public/react/src/modules/courses/coursesHome/coursesHomeCard.js diff --git a/public/react/src/modules/Courses/CoursesHome/css/CoursesHome.css b/public/react/src/modules/courses/coursesHome/css/CoursesHome.css similarity index 100% rename from public/react/src/modules/Courses/CoursesHome/css/CoursesHome.css rename to public/react/src/modules/courses/coursesHome/css/CoursesHome.css diff --git a/public/react/src/modules/Courses/CoursesHome/css/courses.jpg b/public/react/src/modules/courses/coursesHome/css/courses.jpg similarity index 100% rename from public/react/src/modules/Courses/CoursesHome/css/courses.jpg rename to public/react/src/modules/courses/coursesHome/css/courses.jpg diff --git a/public/react/src/modules/Courses/coursesPublic/AccessoryModal.js b/public/react/src/modules/courses/coursesPublic/AccessoryModal.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/AccessoryModal.js rename to public/react/src/modules/courses/coursesPublic/AccessoryModal.js diff --git a/public/react/src/modules/Courses/coursesPublic/AccessoryModal2.js b/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/AccessoryModal2.js rename to public/react/src/modules/courses/coursesPublic/AccessoryModal2.js diff --git a/public/react/src/modules/Courses/coursesPublic/Addcourses.js b/public/react/src/modules/courses/coursesPublic/Addcourses.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/Addcourses.js rename to public/react/src/modules/courses/coursesPublic/Addcourses.js diff --git a/public/react/src/modules/Courses/coursesPublic/AddcoursesNav.js b/public/react/src/modules/courses/coursesPublic/AddcoursesNav.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/AddcoursesNav.js rename to public/react/src/modules/courses/coursesPublic/AddcoursesNav.js diff --git a/public/react/src/modules/Courses/coursesPublic/AllocationModal.js b/public/react/src/modules/courses/coursesPublic/AllocationModal.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/AllocationModal.js rename to public/react/src/modules/courses/coursesPublic/AllocationModal.js diff --git a/public/react/src/modules/Courses/coursesPublic/Associationmodel.js b/public/react/src/modules/courses/coursesPublic/Associationmodel.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/Associationmodel.js rename to public/react/src/modules/courses/coursesPublic/Associationmodel.js diff --git a/public/react/src/modules/Courses/coursesPublic/CourseTag.css b/public/react/src/modules/courses/coursesPublic/CourseTag.css similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/CourseTag.css rename to public/react/src/modules/courses/coursesPublic/CourseTag.css diff --git a/public/react/src/modules/Courses/coursesPublic/CourseTag.js b/public/react/src/modules/courses/coursesPublic/CourseTag.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/CourseTag.js rename to public/react/src/modules/courses/coursesPublic/CourseTag.js diff --git a/public/react/src/modules/Courses/coursesPublic/CoursesListType.js b/public/react/src/modules/courses/coursesPublic/CoursesListType.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/CoursesListType.js rename to public/react/src/modules/courses/coursesPublic/CoursesListType.js diff --git a/public/react/src/modules/Courses/coursesPublic/CoursesMarkdown.js b/public/react/src/modules/courses/coursesPublic/CoursesMarkdown.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/CoursesMarkdown.js rename to public/react/src/modules/courses/coursesPublic/CoursesMarkdown.js diff --git a/public/react/src/modules/Courses/coursesPublic/HomeworkModal.js b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/HomeworkModal.js rename to public/react/src/modules/courses/coursesPublic/HomeworkModal.js diff --git a/public/react/src/modules/Courses/coursesPublic/ModalsRename.js b/public/react/src/modules/courses/coursesPublic/ModalsRename.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/ModalsRename.js rename to public/react/src/modules/courses/coursesPublic/ModalsRename.js diff --git a/public/react/src/modules/Courses/coursesPublic/ModulationModal.js b/public/react/src/modules/courses/coursesPublic/ModulationModal.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/ModulationModal.js rename to public/react/src/modules/courses/coursesPublic/ModulationModal.js diff --git a/public/react/src/modules/Courses/coursesPublic/NoneData.js b/public/react/src/modules/courses/coursesPublic/NoneData.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/NoneData.js rename to public/react/src/modules/courses/coursesPublic/NoneData.js diff --git a/public/react/src/modules/Courses/coursesPublic/PathModal.js b/public/react/src/modules/courses/coursesPublic/PathModal.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/PathModal.js rename to public/react/src/modules/courses/coursesPublic/PathModal.js diff --git a/public/react/src/modules/Courses/coursesPublic/PublishModals.js b/public/react/src/modules/courses/coursesPublic/PublishModals.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/PublishModals.js rename to public/react/src/modules/courses/coursesPublic/PublishModals.js diff --git a/public/react/src/modules/Courses/coursesPublic/SelectResource.js b/public/react/src/modules/courses/coursesPublic/SelectResource.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/SelectResource.js rename to public/react/src/modules/courses/coursesPublic/SelectResource.js diff --git a/public/react/src/modules/Courses/coursesPublic/SelectSetting.js b/public/react/src/modules/courses/coursesPublic/SelectSetting.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/SelectSetting.js rename to public/react/src/modules/courses/coursesPublic/SelectSetting.js diff --git a/public/react/src/modules/Courses/coursesPublic/SendToFilesModal.js b/public/react/src/modules/courses/coursesPublic/SendToFilesModal.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/SendToFilesModal.js rename to public/react/src/modules/courses/coursesPublic/SendToFilesModal.js diff --git a/public/react/src/modules/Courses/coursesPublic/ShixunChooseModal.js b/public/react/src/modules/courses/coursesPublic/ShixunChooseModal.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/ShixunChooseModal.js rename to public/react/src/modules/courses/coursesPublic/ShixunChooseModal.js diff --git a/public/react/src/modules/Courses/coursesPublic/ShixunModal.js b/public/react/src/modules/courses/coursesPublic/ShixunModal.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/ShixunModal.js rename to public/react/src/modules/courses/coursesPublic/ShixunModal.js diff --git a/public/react/src/modules/Courses/coursesPublic/Showoldfiles.js b/public/react/src/modules/courses/coursesPublic/Showoldfiles.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/Showoldfiles.js rename to public/react/src/modules/courses/coursesPublic/Showoldfiles.js diff --git a/public/react/src/modules/Courses/coursesPublic/Startshixuntask.js b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/Startshixuntask.js rename to public/react/src/modules/courses/coursesPublic/Startshixuntask.js diff --git a/public/react/src/modules/Courses/coursesPublic/form/SchoolSelect.js b/public/react/src/modules/courses/coursesPublic/form/SchoolSelect.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/form/SchoolSelect.js rename to public/react/src/modules/courses/coursesPublic/form/SchoolSelect.js diff --git a/public/react/src/modules/Courses/coursesPublic/makedown.css b/public/react/src/modules/courses/coursesPublic/makedown.css similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/makedown.css rename to public/react/src/modules/courses/coursesPublic/makedown.css diff --git a/public/react/src/modules/Courses/coursesPublic/modal/CheckCodeModal.js b/public/react/src/modules/courses/coursesPublic/modal/CheckCodeModal.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/modal/CheckCodeModal.js rename to public/react/src/modules/courses/coursesPublic/modal/CheckCodeModal.js diff --git a/public/react/src/modules/Courses/coursesPublic/modal/SendToCourseModal.js b/public/react/src/modules/courses/coursesPublic/modal/SendToCourseModal.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/modal/SendToCourseModal.js rename to public/react/src/modules/courses/coursesPublic/modal/SendToCourseModal.js diff --git a/public/react/src/modules/Courses/coursesPublic/modal/ShixunModal2.js b/public/react/src/modules/courses/coursesPublic/modal/ShixunModal2.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/modal/ShixunModal2.js rename to public/react/src/modules/courses/coursesPublic/modal/ShixunModal2.js diff --git a/public/react/src/modules/Courses/coursesPublic/sendResource.js b/public/react/src/modules/courses/coursesPublic/sendResource.js similarity index 100% rename from public/react/src/modules/Courses/coursesPublic/sendResource.js rename to public/react/src/modules/courses/coursesPublic/sendResource.js diff --git a/public/react/src/modules/Courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css similarity index 100% rename from public/react/src/modules/Courses/css/Courses.css rename to public/react/src/modules/courses/css/Courses.css diff --git a/public/react/src/modules/Courses/css/busyWork.css b/public/react/src/modules/courses/css/busyWork.css similarity index 100% rename from public/react/src/modules/Courses/css/busyWork.css rename to public/react/src/modules/courses/css/busyWork.css diff --git a/public/react/src/modules/Courses/css/members.css b/public/react/src/modules/courses/css/members.css similarity index 100% rename from public/react/src/modules/Courses/css/members.css rename to public/react/src/modules/courses/css/members.css diff --git a/public/react/src/modules/Courses/exercise/Ecerciseallbackagain.js b/public/react/src/modules/courses/exercise/Ecerciseallbackagain.js similarity index 100% rename from public/react/src/modules/Courses/exercise/Ecerciseallbackagain.js rename to public/react/src/modules/courses/exercise/Ecerciseallbackagain.js diff --git a/public/react/src/modules/Courses/exercise/Ecercisemount.js b/public/react/src/modules/courses/exercise/Ecercisemount.js similarity index 100% rename from public/react/src/modules/Courses/exercise/Ecercisemount.js rename to public/react/src/modules/courses/exercise/Ecercisemount.js diff --git a/public/react/src/modules/Courses/exercise/Exercise.js b/public/react/src/modules/courses/exercise/Exercise.js similarity index 100% rename from public/react/src/modules/Courses/exercise/Exercise.js rename to public/react/src/modules/courses/exercise/Exercise.js diff --git a/public/react/src/modules/Courses/exercise/ExerciseDisplay.js b/public/react/src/modules/courses/exercise/ExerciseDisplay.js similarity index 100% rename from public/react/src/modules/Courses/exercise/ExerciseDisplay.js rename to public/react/src/modules/courses/exercise/ExerciseDisplay.js diff --git a/public/react/src/modules/Courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js similarity index 100% rename from public/react/src/modules/Courses/exercise/ExerciseListItem.js rename to public/react/src/modules/courses/exercise/ExerciseListItem.js diff --git a/public/react/src/modules/Courses/exercise/ExerciseNew.js b/public/react/src/modules/courses/exercise/ExerciseNew.js similarity index 100% rename from public/react/src/modules/Courses/exercise/ExerciseNew.js rename to public/react/src/modules/courses/exercise/ExerciseNew.js diff --git a/public/react/src/modules/Courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js similarity index 100% rename from public/react/src/modules/Courses/exercise/ExerciseReviewAndAnswer.js rename to public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js diff --git a/public/react/src/modules/Courses/exercise/Exercisesetting.js b/public/react/src/modules/courses/exercise/Exercisesetting.js similarity index 100% rename from public/react/src/modules/Courses/exercise/Exercisesetting.js rename to public/react/src/modules/courses/exercise/Exercisesetting.js diff --git a/public/react/src/modules/Courses/exercise/Exercisestatisticalresult.js b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js similarity index 100% rename from public/react/src/modules/Courses/exercise/Exercisestatisticalresult.js rename to public/react/src/modules/courses/exercise/Exercisestatisticalresult.js diff --git a/public/react/src/modules/Courses/exercise/Exercisestatisticalresulttabel.js b/public/react/src/modules/courses/exercise/Exercisestatisticalresulttabel.js similarity index 100% rename from public/react/src/modules/Courses/exercise/Exercisestatisticalresulttabel.js rename to public/react/src/modules/courses/exercise/Exercisestatisticalresulttabel.js diff --git a/public/react/src/modules/Courses/exercise/Exercisetablesmubu.js b/public/react/src/modules/courses/exercise/Exercisetablesmubu.js similarity index 100% rename from public/react/src/modules/Courses/exercise/Exercisetablesmubu.js rename to public/react/src/modules/courses/exercise/Exercisetablesmubu.js diff --git a/public/react/src/modules/Courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js similarity index 100% rename from public/react/src/modules/Courses/exercise/Studentshavecompletedthelist.js rename to public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js diff --git a/public/react/src/modules/Courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js similarity index 100% rename from public/react/src/modules/Courses/exercise/Testpapersettinghomepage.js rename to public/react/src/modules/courses/exercise/Testpapersettinghomepage.js diff --git a/public/react/src/modules/Courses/exercise/new/JudgeDisplay.js b/public/react/src/modules/courses/exercise/new/JudgeDisplay.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/JudgeDisplay.js rename to public/react/src/modules/courses/exercise/new/JudgeDisplay.js diff --git a/public/react/src/modules/Courses/exercise/new/JudgeEditor.js b/public/react/src/modules/courses/exercise/new/JudgeEditor.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/JudgeEditor.js rename to public/react/src/modules/courses/exercise/new/JudgeEditor.js diff --git a/public/react/src/modules/Courses/exercise/new/MainDisplay.js b/public/react/src/modules/courses/exercise/new/MainDisplay.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/MainDisplay.js rename to public/react/src/modules/courses/exercise/new/MainDisplay.js diff --git a/public/react/src/modules/Courses/exercise/new/MainEditor.js b/public/react/src/modules/courses/exercise/new/MainEditor.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/MainEditor.js rename to public/react/src/modules/courses/exercise/new/MainEditor.js diff --git a/public/react/src/modules/Courses/exercise/new/NullChildEditor.js b/public/react/src/modules/courses/exercise/new/NullChildEditor.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/NullChildEditor.js rename to public/react/src/modules/courses/exercise/new/NullChildEditor.js diff --git a/public/react/src/modules/Courses/exercise/new/NullDisplay.js b/public/react/src/modules/courses/exercise/new/NullDisplay.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/NullDisplay.js rename to public/react/src/modules/courses/exercise/new/NullDisplay.js diff --git a/public/react/src/modules/Courses/exercise/new/NullEditor.js b/public/react/src/modules/courses/exercise/new/NullEditor.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/NullEditor.js rename to public/react/src/modules/courses/exercise/new/NullEditor.js diff --git a/public/react/src/modules/Courses/exercise/new/NullMDEditor.js b/public/react/src/modules/courses/exercise/new/NullMDEditor.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/NullMDEditor.js rename to public/react/src/modules/courses/exercise/new/NullMDEditor.js diff --git a/public/react/src/modules/Courses/exercise/new/QestionDisplayHeader.js b/public/react/src/modules/courses/exercise/new/QestionDisplayHeader.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/QestionDisplayHeader.js rename to public/react/src/modules/courses/exercise/new/QestionDisplayHeader.js diff --git a/public/react/src/modules/Courses/exercise/new/ShixunDisplay.js b/public/react/src/modules/courses/exercise/new/ShixunDisplay.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/ShixunDisplay.js rename to public/react/src/modules/courses/exercise/new/ShixunDisplay.js diff --git a/public/react/src/modules/Courses/exercise/new/ShixunEditor.js b/public/react/src/modules/courses/exercise/new/ShixunEditor.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/ShixunEditor.js rename to public/react/src/modules/courses/exercise/new/ShixunEditor.js diff --git a/public/react/src/modules/Courses/exercise/new/SingleDisplay.js b/public/react/src/modules/courses/exercise/new/SingleDisplay.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/SingleDisplay.js rename to public/react/src/modules/courses/exercise/new/SingleDisplay.js diff --git a/public/react/src/modules/Courses/exercise/new/SingleEditor.js b/public/react/src/modules/courses/exercise/new/SingleEditor.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/SingleEditor.js rename to public/react/src/modules/courses/exercise/new/SingleEditor.js diff --git a/public/react/src/modules/Courses/exercise/new/common.css b/public/react/src/modules/courses/exercise/new/common.css similarity index 100% rename from public/react/src/modules/Courses/exercise/new/common.css rename to public/react/src/modules/courses/exercise/new/common.css diff --git a/public/react/src/modules/Courses/exercise/new/common.js b/public/react/src/modules/courses/exercise/new/common.js similarity index 100% rename from public/react/src/modules/Courses/exercise/new/common.js rename to public/react/src/modules/courses/exercise/new/common.js diff --git a/public/react/src/modules/Courses/exercise/new/editorCommon.css b/public/react/src/modules/courses/exercise/new/editorCommon.css similarity index 100% rename from public/react/src/modules/Courses/exercise/new/editorCommon.css rename to public/react/src/modules/courses/exercise/new/editorCommon.css diff --git a/public/react/src/modules/Courses/exercise/question/fillEmpty.js b/public/react/src/modules/courses/exercise/question/fillEmpty.js similarity index 100% rename from public/react/src/modules/Courses/exercise/question/fillEmpty.js rename to public/react/src/modules/courses/exercise/question/fillEmpty.js diff --git a/public/react/src/modules/Courses/exercise/question/multiple.js b/public/react/src/modules/courses/exercise/question/multiple.js similarity index 100% rename from public/react/src/modules/Courses/exercise/question/multiple.js rename to public/react/src/modules/courses/exercise/question/multiple.js diff --git a/public/react/src/modules/Courses/exercise/question/shixunAnswer.js b/public/react/src/modules/courses/exercise/question/shixunAnswer.js similarity index 100% rename from public/react/src/modules/Courses/exercise/question/shixunAnswer.js rename to public/react/src/modules/courses/exercise/question/shixunAnswer.js diff --git a/public/react/src/modules/Courses/exercise/question/shixunAnswerDetail.js b/public/react/src/modules/courses/exercise/question/shixunAnswerDetail.js similarity index 100% rename from public/react/src/modules/Courses/exercise/question/shixunAnswerDetail.js rename to public/react/src/modules/courses/exercise/question/shixunAnswerDetail.js diff --git a/public/react/src/modules/Courses/exercise/question/simpleAnswer.js b/public/react/src/modules/courses/exercise/question/simpleAnswer.js similarity index 100% rename from public/react/src/modules/Courses/exercise/question/simpleAnswer.js rename to public/react/src/modules/courses/exercise/question/simpleAnswer.js diff --git a/public/react/src/modules/Courses/exercise/question/single.js b/public/react/src/modules/courses/exercise/question/single.js similarity index 100% rename from public/react/src/modules/Courses/exercise/question/single.js rename to public/react/src/modules/courses/exercise/question/single.js diff --git a/public/react/src/modules/Courses/graduation/style.css b/public/react/src/modules/courses/graduation/style.css similarity index 100% rename from public/react/src/modules/Courses/graduation/style.css rename to public/react/src/modules/courses/graduation/style.css diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/GraduateTaskItem.js rename to public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/GraduationTasksSubmitedit.js rename to public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/GraduationTasksSubmitnew.js rename to public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraise.js rename to public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseMainEditor.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseMainEditor.js rename to public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReply.css b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReply.css similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/GraduationTasksappraiseReply.css rename to public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReply.css diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReply.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReply.js index 372690d1c..69ab8ba79 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReply.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReply.js @@ -7,7 +7,7 @@ import {ImageLayerOfCommentHOC} from '../../../page/layers/ImageLayerOfCommentHO import GraduationTasksappraiseReplyChild from './GraduationTasksappraiseReplyChild'; import '../../../forums/Post.css' import '../../../comment/Comment.css' -import '../../../courses/common/courseMessage.css' +import '../../common/courseMessage.css' import './GraduationTasksappraiseReply.css' const REPLY_PAGE_COUNT = 10 diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js index 11139112e..094f8d96f 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js @@ -5,7 +5,7 @@ import GraduationTasksappraiseMainEditor from './GraduationTasksappraiseMainEdit import Graduationtaskitem from './Graduationtaskitem' import '../../../forums/Post.css' import '../../../comment/Comment.css' -import '../../../courses/common/courseMessage.css' +import '../../common/courseMessage.css' import './GraduationTasksappraiseReply.css' import ModulationModal from "../../coursesPublic/ModulationModal"; import Modals from '../../../modals/Modals'; diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/GraduationTasksedit.js rename to public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/GraduationTasksnew.js rename to public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/GraduationTaskssetting.js rename to public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTaskssettingReply.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingReply.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/GraduationTaskssettingReply.js rename to public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingReply.js diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/GraduationTaskssettinglist.js rename to public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js diff --git a/public/react/src/modules/Courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/GraduationTaskssettingquestions.js rename to public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js diff --git a/public/react/src/modules/Courses/graduation/tasks/Graduationtaskitem.js b/public/react/src/modules/courses/graduation/tasks/Graduationtaskitem.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/Graduationtaskitem.js rename to public/react/src/modules/courses/graduation/tasks/Graduationtaskitem.js diff --git a/public/react/src/modules/Courses/graduation/tasks/TaskPublishModal.js b/public/react/src/modules/courses/graduation/tasks/TaskPublishModal.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/TaskPublishModal.js rename to public/react/src/modules/courses/graduation/tasks/TaskPublishModal.js diff --git a/public/react/src/modules/Courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js similarity index 100% rename from public/react/src/modules/Courses/graduation/tasks/index.js rename to public/react/src/modules/courses/graduation/tasks/index.js diff --git a/public/react/src/modules/Courses/graduation/topics/ChooseGraduateTopicModal.js b/public/react/src/modules/courses/graduation/topics/ChooseGraduateTopicModal.js similarity index 100% rename from public/react/src/modules/Courses/graduation/topics/ChooseGraduateTopicModal.js rename to public/react/src/modules/courses/graduation/topics/ChooseGraduateTopicModal.js diff --git a/public/react/src/modules/Courses/graduation/topics/GraduateTopicDetail.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js similarity index 100% rename from public/react/src/modules/Courses/graduation/topics/GraduateTopicDetail.js rename to public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js diff --git a/public/react/src/modules/Courses/graduation/topics/GraduateTopicDetailInfo.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js similarity index 100% rename from public/react/src/modules/Courses/graduation/topics/GraduateTopicDetailInfo.js rename to public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js diff --git a/public/react/src/modules/Courses/graduation/topics/GraduateTopicDetailTable.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js similarity index 100% rename from public/react/src/modules/Courses/graduation/topics/GraduateTopicDetailTable.js rename to public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js diff --git a/public/react/src/modules/Courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js similarity index 100% rename from public/react/src/modules/Courses/graduation/topics/GraduateTopicItem.js rename to public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js diff --git a/public/react/src/modules/Courses/graduation/topics/GraduateTopicNew.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js similarity index 100% rename from public/react/src/modules/Courses/graduation/topics/GraduateTopicNew.js rename to public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js diff --git a/public/react/src/modules/Courses/graduation/topics/GraduateTopicPostWorksNew.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicPostWorksNew.js similarity index 100% rename from public/react/src/modules/Courses/graduation/topics/GraduateTopicPostWorksNew.js rename to public/react/src/modules/courses/graduation/topics/GraduateTopicPostWorksNew.js diff --git a/public/react/src/modules/Courses/graduation/topics/GraduateTopicReply.css b/public/react/src/modules/courses/graduation/topics/GraduateTopicReply.css similarity index 100% rename from public/react/src/modules/Courses/graduation/topics/GraduateTopicReply.css rename to public/react/src/modules/courses/graduation/topics/GraduateTopicReply.css diff --git a/public/react/src/modules/Courses/graduation/topics/GraduateTopicReply.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicReply.js similarity index 100% rename from public/react/src/modules/Courses/graduation/topics/GraduateTopicReply.js rename to public/react/src/modules/courses/graduation/topics/GraduateTopicReply.js diff --git a/public/react/src/modules/Courses/graduation/topics/index.js b/public/react/src/modules/courses/graduation/topics/index.js similarity index 100% rename from public/react/src/modules/Courses/graduation/topics/index.js rename to public/react/src/modules/courses/graduation/topics/index.js diff --git a/public/react/src/modules/Courses/members/common.js b/public/react/src/modules/courses/members/common.js similarity index 100% rename from public/react/src/modules/Courses/members/common.js rename to public/react/src/modules/courses/members/common.js diff --git a/public/react/src/modules/Courses/members/modal/AddAdminModal.js b/public/react/src/modules/courses/members/modal/AddAdminModal.js similarity index 100% rename from public/react/src/modules/Courses/members/modal/AddAdminModal.js rename to public/react/src/modules/courses/members/modal/AddAdminModal.js diff --git a/public/react/src/modules/Courses/members/modal/AddGraduationGroupModal.js b/public/react/src/modules/courses/members/modal/AddGraduationGroupModal.js similarity index 100% rename from public/react/src/modules/Courses/members/modal/AddGraduationGroupModal.js rename to public/react/src/modules/courses/members/modal/AddGraduationGroupModal.js diff --git a/public/react/src/modules/Courses/members/modal/AddStudentModal.js b/public/react/src/modules/courses/members/modal/AddStudentModal.js similarity index 100% rename from public/react/src/modules/Courses/members/modal/AddStudentModal.js rename to public/react/src/modules/courses/members/modal/AddStudentModal.js diff --git a/public/react/src/modules/Courses/members/modal/AddTeacherModal.js b/public/react/src/modules/courses/members/modal/AddTeacherModal.js similarity index 100% rename from public/react/src/modules/Courses/members/modal/AddTeacherModal.js rename to public/react/src/modules/courses/members/modal/AddTeacherModal.js diff --git a/public/react/src/modules/Courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js similarity index 100% rename from public/react/src/modules/Courses/members/studentsList.js rename to public/react/src/modules/courses/members/studentsList.js diff --git a/public/react/src/modules/Courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js similarity index 100% rename from public/react/src/modules/Courses/members/teacherList.js rename to public/react/src/modules/courses/members/teacherList.js diff --git a/public/react/src/modules/Courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js similarity index 100% rename from public/react/src/modules/Courses/new/CoursesNew.js rename to public/react/src/modules/courses/new/CoursesNew.js diff --git a/public/react/src/modules/Courses/poll/PollDetailIndex.js b/public/react/src/modules/courses/poll/PollDetailIndex.js similarity index 100% rename from public/react/src/modules/Courses/poll/PollDetailIndex.js rename to public/react/src/modules/courses/poll/PollDetailIndex.js diff --git a/public/react/src/modules/Courses/poll/PollDetailTabFirst.js b/public/react/src/modules/courses/poll/PollDetailTabFirst.js similarity index 100% rename from public/react/src/modules/Courses/poll/PollDetailTabFirst.js rename to public/react/src/modules/courses/poll/PollDetailTabFirst.js diff --git a/public/react/src/modules/Courses/poll/PollDetailTabForth.js b/public/react/src/modules/courses/poll/PollDetailTabForth.js similarity index 100% rename from public/react/src/modules/Courses/poll/PollDetailTabForth.js rename to public/react/src/modules/courses/poll/PollDetailTabForth.js diff --git a/public/react/src/modules/Courses/poll/PollDetailTabForthRules.js b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js similarity index 100% rename from public/react/src/modules/Courses/poll/PollDetailTabForthRules.js rename to public/react/src/modules/courses/poll/PollDetailTabForthRules.js diff --git a/public/react/src/modules/Courses/poll/PollDetailTabSecond.js b/public/react/src/modules/courses/poll/PollDetailTabSecond.js similarity index 100% rename from public/react/src/modules/Courses/poll/PollDetailTabSecond.js rename to public/react/src/modules/courses/poll/PollDetailTabSecond.js diff --git a/public/react/src/modules/Courses/poll/PollDetailTabThird.js b/public/react/src/modules/courses/poll/PollDetailTabThird.js similarity index 100% rename from public/react/src/modules/Courses/poll/PollDetailTabThird.js rename to public/react/src/modules/courses/poll/PollDetailTabThird.js diff --git a/public/react/src/modules/Courses/poll/PollInfo.js b/public/react/src/modules/courses/poll/PollInfo.js similarity index 100% rename from public/react/src/modules/Courses/poll/PollInfo.js rename to public/react/src/modules/courses/poll/PollInfo.js diff --git a/public/react/src/modules/Courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js similarity index 100% rename from public/react/src/modules/Courses/poll/PollListItem.js rename to public/react/src/modules/courses/poll/PollListItem.js diff --git a/public/react/src/modules/Courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js similarity index 100% rename from public/react/src/modules/Courses/poll/PollNew.js rename to public/react/src/modules/courses/poll/PollNew.js diff --git a/public/react/src/modules/Courses/poll/pollPublicBtn/CancelPublish.js b/public/react/src/modules/courses/poll/pollPublicBtn/CancelPublish.js similarity index 100% rename from public/react/src/modules/Courses/poll/pollPublicBtn/CancelPublish.js rename to public/react/src/modules/courses/poll/pollPublicBtn/CancelPublish.js diff --git a/public/react/src/modules/Courses/poll/pollPublicBtn/ImmediatelyEnd.js b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js similarity index 100% rename from public/react/src/modules/Courses/poll/pollPublicBtn/ImmediatelyEnd.js rename to public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js diff --git a/public/react/src/modules/Courses/poll/pollPublicBtn/ImmediatelyPublish.js b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js similarity index 100% rename from public/react/src/modules/Courses/poll/pollPublicBtn/ImmediatelyPublish.js rename to public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js diff --git a/public/react/src/modules/Courses/poll/pollStyle.css b/public/react/src/modules/courses/poll/pollStyle.css similarity index 100% rename from public/react/src/modules/Courses/poll/pollStyle.css rename to public/react/src/modules/courses/poll/pollStyle.css diff --git a/public/react/src/modules/Courses/polldepoly/Index.js b/public/react/src/modules/courses/polldepoly/Index.js similarity index 100% rename from public/react/src/modules/Courses/polldepoly/Index.js rename to public/react/src/modules/courses/polldepoly/Index.js diff --git a/public/react/src/modules/Courses/polldepoly/pollmount.js b/public/react/src/modules/courses/polldepoly/pollmount.js similarity index 100% rename from public/react/src/modules/Courses/polldepoly/pollmount.js rename to public/react/src/modules/courses/polldepoly/pollmount.js diff --git a/public/react/src/modules/Courses/publicNav/listNav.js b/public/react/src/modules/courses/publicNav/listNav.js similarity index 100% rename from public/react/src/modules/Courses/publicNav/listNav.js rename to public/react/src/modules/courses/publicNav/listNav.js diff --git a/public/react/src/modules/Courses/publicNav/nav.css b/public/react/src/modules/courses/publicNav/nav.css similarity index 100% rename from public/react/src/modules/Courses/publicNav/nav.css rename to public/react/src/modules/courses/publicNav/nav.css diff --git a/public/react/src/modules/Courses/shixunHomework/Challenges.css b/public/react/src/modules/courses/shixunHomework/Challenges.css similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/Challenges.css rename to public/react/src/modules/courses/shixunHomework/Challenges.css diff --git a/public/react/src/modules/Courses/shixunHomework/CommitSummary.js b/public/react/src/modules/courses/shixunHomework/CommitSummary.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/CommitSummary.js rename to public/react/src/modules/courses/shixunHomework/CommitSummary.js diff --git a/public/react/src/modules/Courses/shixunHomework/Homeworddescription.js b/public/react/src/modules/courses/shixunHomework/Homeworddescription.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/Homeworddescription.js rename to public/react/src/modules/courses/shixunHomework/Homeworddescription.js diff --git a/public/react/src/modules/Courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/Listofworks.js rename to public/react/src/modules/courses/shixunHomework/Listofworks.js diff --git a/public/react/src/modules/Courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/Listofworksstudentone.js rename to public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js diff --git a/public/react/src/modules/Courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/ShixunStudentWork.js rename to public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js diff --git a/public/react/src/modules/Courses/shixunHomework/ShixunWorkDetails.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkDetails.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/ShixunWorkDetails.js rename to public/react/src/modules/courses/shixunHomework/ShixunWorkDetails.js diff --git a/public/react/src/modules/Courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/ShixunWorkReport.js rename to public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js diff --git a/public/react/src/modules/Courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/ShixunhomeWorkItem.js rename to public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js diff --git a/public/react/src/modules/Courses/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js rename to public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js diff --git a/public/react/src/modules/Courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js rename to public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js diff --git a/public/react/src/modules/Courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/TraineetraininginformationModal.js rename to public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js diff --git a/public/react/src/modules/Courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/Trainingjobsetting.js rename to public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 06a4924fa..419bca1b5 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -1,7 +1,7 @@ import React, {Component} from "react"; import CoursesListType from '../coursesPublic/CoursesListType'; import {WordsBtn,ActionBtn,markdownToHTML} from 'educoder'; -import GraduateTopicReply from '../../courses/graduation/topics/GraduateTopicReply' +import GraduateTopicReply from '../graduation/topics/GraduateTopicReply' import MemoDetailMDEditortwo from '../../forums/MemoDetailMDEditortwo' import { Form, diff --git a/public/react/src/modules/Courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/shixunHomework.js rename to public/react/src/modules/courses/shixunHomework/shixunHomework.js diff --git a/public/react/src/modules/Courses/shixunHomework/shixunreport/ConclusionEvaluation.js b/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/shixunreport/ConclusionEvaluation.js rename to public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js diff --git a/public/react/src/modules/Courses/shixunHomework/shixunreport/Coursesshixundetails.js b/public/react/src/modules/courses/shixunHomework/shixunreport/Coursesshixundetails.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/shixunreport/Coursesshixundetails.js rename to public/react/src/modules/courses/shixunHomework/shixunreport/Coursesshixundetails.js diff --git a/public/react/src/modules/Courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js rename to public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js diff --git a/public/react/src/modules/Courses/shixunHomework/shixunreport/Shixunechart.js b/public/react/src/modules/courses/shixunHomework/shixunreport/Shixunechart.js similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/shixunreport/Shixunechart.js rename to public/react/src/modules/courses/shixunHomework/shixunreport/Shixunechart.js diff --git a/public/react/src/modules/Courses/shixunHomework/style.css b/public/react/src/modules/courses/shixunHomework/style.css similarity index 100% rename from public/react/src/modules/Courses/shixunHomework/style.css rename to public/react/src/modules/courses/shixunHomework/style.css diff --git a/public/react/src/modules/Courses/studentWork/CommitSummaryIndex.js b/public/react/src/modules/courses/studentWork/CommitSummaryIndex.js similarity index 100% rename from public/react/src/modules/Courses/studentWork/CommitSummaryIndex.js rename to public/react/src/modules/courses/studentWork/CommitSummaryIndex.js diff --git a/public/react/src/modules/Courses/studentWork/StudentHomework.js b/public/react/src/modules/courses/studentWork/StudentHomework.js similarity index 100% rename from public/react/src/modules/Courses/studentWork/StudentHomework.js rename to public/react/src/modules/courses/studentWork/StudentHomework.js diff --git a/public/react/src/modules/Courses/user’s_manual.txt b/public/react/src/modules/courses/user’s_manual.txt similarity index 100% rename from public/react/src/modules/Courses/user’s_manual.txt rename to public/react/src/modules/courses/user’s_manual.txt From f142c7339d082e1406cc3ccb9029cbcb1972489c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 20 Jun 2019 16:58:04 +0800 Subject: [PATCH 003/964] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Resource/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index ec0f4c280..ac168d880 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -254,6 +254,7 @@ class Fileslists extends Component{ checkBoxValues:[], checkAllValue:false }) + this.props.updataleftNavfun() this.props.showNotification("删除成功"); } }) @@ -518,6 +519,7 @@ class Fileslists extends Component{ checkBoxValues:[], // checkAllValue:false }) + this.props.updataleftNavfun() this.props.showNotification('资源移动成功') } }) From ee6d0ee4aef0c5f690d748e4c1c7fee5e844b5dd Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 20 Jun 2019 17:06:27 +0800 Subject: [PATCH 004/964] =?UTF-8?q?=E9=80=89=E9=A2=98=E6=96=B0=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/graduation/topics/GraduateTopicNew.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js index 876f2e4d0..7c0811615 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js @@ -38,7 +38,7 @@ class GraduateTopicNew extends Component{ topic_source:[], topic_type:[], attachments:undefined, - addonAfter:20, + addonAfter:60, left_banner_id:undefined, course_name:undefined } @@ -257,7 +257,7 @@ class GraduateTopicNew extends Component{ // 附件相关 ------------ END changeTopicName=(e)=>{ - let num= 20 - parseInt(e.target.value.length); + let num= 60 - parseInt(e.target.value.length); this.setState({ addonAfter:num < 0 ? 0 : num }) @@ -357,10 +357,10 @@ class GraduateTopicNew extends Component{ rules: [{ required: true, message: '请输入选题名称', }, { - max: 20, message: '最大限制为20个字符', + max: 60, message: '最大限制为60个字符', }], })( - + )} @@ -381,6 +381,9 @@ class GraduateTopicNew extends Component{ width: 350px; margin-bottom:10px; } + .ant-upload-list-item{ + margin-top:0px!important; + } `} From 6787d59ec17161fb8b3cdff304265f6c162b26e5 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 20 Jun 2019 17:17:04 +0800 Subject: [PATCH 005/964] font-16 --- .../modules/courses/common/titleSearch/TitleSearchSection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js b/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js index c6530e855..4cb69a8d7 100644 --- a/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js +++ b/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js @@ -62,7 +62,7 @@ class Titlesearchsection extends Component{

{title} -

  • +
  • { firstRowRight }
  • From 01fd748038d54aa709630d9e48b0445dad287fcf Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 20 Jun 2019 17:19:48 +0800 Subject: [PATCH 006/964] =?UTF-8?q?=E5=85=88=E6=B3=A8=E9=87=8A=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E5=BD=B1=E5=93=8D=E5=88=B0=E4=BA=86md=E7=9A=84?= =?UTF-8?q?=E6=8B=96=E6=8B=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/forums/MemoDetailMDEditor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/forums/MemoDetailMDEditor.js b/public/react/src/modules/forums/MemoDetailMDEditor.js index 17bc11212..caf8e5743 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditor.js +++ b/public/react/src/modules/forums/MemoDetailMDEditor.js @@ -158,13 +158,15 @@ class MemoDetailMDEditor extends Component {
    From 268baa136d26846078621846f06f97498c732b67 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 20 Jun 2019 19:03:00 +0800 Subject: [PATCH 007/964] canNotLink --- .../src/modules/courses/busyWork/CommonWorkItem.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 41b873bac..258a06332 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -104,6 +104,7 @@ class CommonWorkItem extends Component{ let coursesId = this.props.match.params.coursesId; const isStudent = this.props.isStudent() + const isAdmin = this.props.isAdmin() const isAdminOrStudent = this.props.isAdminOrStudent() return(
    @@ -128,19 +129,20 @@ class CommonWorkItem extends Component{ { mainList && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{ + let canNotLink = !isAdminOrStudent && item.private_icon == true return(
    { - mainList && mainList.course_identity < 5 && + mainList && isAdmin && }
    this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>

    this.onItemClick(item)} + className="fl font-16 font-bd mt2 comnonwidth580" style={{cursor: canNotLink ? 'normal' : 'poninter'}} + onClick={canNotLink ? () => {} : () => this.onItemClick(item)} >{item.name} {/* 只有非课堂成员且作业是私有的情况下才会为true */} @@ -155,7 +157,7 @@ class CommonWorkItem extends Component{ { - mainList && mainList.course_identity < 5 && + mainList && isAdmin &&

    • From 07e5760e2b0b067e8cb8457836619a95488b45e2 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 20 Jun 2019 19:06:46 +0800 Subject: [PATCH 008/964] this.props.addSuccess --- .../graduation/tasks/GraduationTasksappraiseReplyChild.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js index 094f8d96f..1279b4907 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseReplyChild.js @@ -83,7 +83,7 @@ class GraduationTasksappraiseReplyChild extends Component{
  • */} {this.props.ultimate===true?"": isAdmin && this.props.addSuccess()} > }
    @@ -696,7 +697,7 @@ class Selectsetting extends Component{ id={"startimes"} className={"Selectleft20"} width={"200px"} - value={item.publish_time===undefined||item.publish_time===""?"":moment(item.publish_time, dateFormat)} + value={item.publish_time===undefined||item.publish_time===""?"":item.publish_time===null?"":moment(item.publish_time, dateFormat)} onChange={(e,index)=>this.onChangeTimepublishs(e,index,key)} // onChange={ this.onChangeTimepublish } disabledTime={disabledDateTime} @@ -739,7 +740,7 @@ class Selectsetting extends Component{ {/*{this.state.course_group_idtypes===true?

    请选择分班

    :""}*/} {/*{course_group_publish_timestype===true?

    请填写完整

    :""}*/} - - {descriptiontype===true?

    描述不能超过最大限制:100个字符

    :""} + {descriptiontype===true?

    请输入资源描述,最大限制100个字符

    :""}
    {this.props.Cancelname} this.Saves()}>{this.props.Savesname} diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index 43210315d..eb0377022 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -85,11 +85,14 @@ class ExerciseListItem extends Component{ text-overflow: ellipsis; white-space: nowrap; } + .homepagePostSetting { + position: absolute; + } ` }
    -

    +

    {/*{item.exercise_name}*/} { @@ -132,7 +135,7 @@ class ExerciseListItem extends Component{ {/**/} {/**/}

    -

    +

    {item.exercise_status===1?"":{item.exercise_answer} 已答} {item.exercise_status===1?"":{item.exercise_unanswer} 未答} {item.unreview_count===null||item.exercise_status===1?"":{item.unreview_count} 未评数 } @@ -161,23 +164,32 @@ class ExerciseListItem extends Component{ {/*item.exercise_status ==2?"":*/} {/* 发布于{moment(item.exercise_left_time).fromNow()} */} {/*}*/} -

    - { - IsAdmin && -
    -
      -
    • - - -
    • -
    -
    - } + + + { IsAdmin &&
    + 编辑 + 设置 +
    } + +

    + {/*{*/} + {/*IsAdmin &&*/} + {/*
    */} + {/*
      */} + {/*
    • */} + {/**/} + {/*
        */} + {/*
      • 编辑
      • */} + {/*
      • 设置
      • */} + {/*
      */} + {/*
    • */} + {/*
    */} + {/*
    */} + {/*}*/} + + { IsStudent &&
    diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 3e3259a72..ef23674fe 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -234,12 +234,20 @@ class GraduateTaskItem extends Component{

    - + {this.props.isAdmin?
    - + 编辑 From 2141b068f97e5f6830be88fe19fa4766ba544ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 20 Jun 2019 19:33:55 +0800 Subject: [PATCH 011/964] =?UTF-8?q?=E6=AF=95=E8=AE=BE=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTaskssetting.js | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index a002911ec..9ef3d7091 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -480,7 +480,7 @@ class GraduationTaskssettingapp extends Component{ saveTaskssetting=()=>{ - let {latepenalty,hascommit,minnums,max_nums,publish_time,end_time,crosscomment,latetime}=this.state; + let {latepenalty,hascommit,minnums,max_nums,publish_time,end_time,crosscomment,latetime,starttimetype}=this.state; if(latepenalty===undefined){ this.setState({ latepenaltytype:true, @@ -500,19 +500,19 @@ class GraduationTaskssettingapp extends Component{ } - - if(moment(publish_time) <= moment()){ - this.setState({ - publishTimetypes:true, - publishTimetypesval:"发布时间不能早于当前时间", - }) - return - }else{ - this.setState({ - publishTimetypes:false - }) - } - + if(starttimetype===false) { + if (moment(publish_time) <= moment()) { + this.setState({ + publishTimetypes: true, + publishTimetypesval: "发布时间不能早于当前时间", + }) + return + } else { + this.setState({ + publishTimetypes: false + }) + } + } if(moment(end_time) Date: Thu, 20 Jun 2019 20:05:37 +0800 Subject: [PATCH 012/964] =?UTF-8?q?=E5=AD=90=E5=9B=9E=E5=A4=8D=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/boards/BoardsListItem.js | 7 ++++--- public/react/src/modules/courses/common/courseMessage.css | 2 +- public/react/src/modules/forums/MemoDetailMDEditor.js | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index 089d060a4..c25c541e8 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -1,6 +1,7 @@ import React,{ Component } from "react"; import {Tooltip} from 'antd' import moment from 'moment' +import { getUrl } from 'educoder' class BoardsListItem extends Component{ constructor(props){ super(props); @@ -37,11 +38,11 @@ class BoardsListItem extends Component{ } `} { checkBox } - + {/* /images/avatars/User/1?1529221779 */} 1?1529221779
    onItemClick(discussMessage)}> @@ -62,7 +63,7 @@ class BoardsListItem extends Component{

    - {discussMessage.author.name} + {discussMessage.author.name} { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 } { discussMessage.total_praises_count != 0 && {discussMessage.total_praises_count} 点赞 } diff --git a/public/react/src/modules/courses/common/courseMessage.css b/public/react/src/modules/courses/common/courseMessage.css index c928162f4..db2381d37 100644 --- a/public/react/src/modules/courses/common/courseMessage.css +++ b/public/react/src/modules/courses/common/courseMessage.css @@ -17,7 +17,7 @@ } /* 子回复按钮 */ .course-message .reply_to_message a.commentsbtn.task-btn-blue { - margin-right: 50px; + /* margin-right: 50px; */ } /* 改边距 */ /* .course-message .commentsDelegateParent { diff --git a/public/react/src/modules/forums/MemoDetailMDEditor.js b/public/react/src/modules/forums/MemoDetailMDEditor.js index caf8e5743..ebb61b1b7 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditor.js +++ b/public/react/src/modules/forums/MemoDetailMDEditor.js @@ -169,7 +169,7 @@ class MemoDetailMDEditor extends Component { } */}

    + style={{ padding: '30px',boxSizing:"border-box", display: isInited ? '' : 'none', paddingBottom: '40px' }} >
    +
    }

    From cc82615959a59363e35e2d2acb382a48fc6fa9d4 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 09:10:26 +0800 Subject: [PATCH 017/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTaskssettinglist.js | 4 +- public/react/src/modules/tpm/NewHeader.js | 1841 ++++++++--------- 2 files changed, 922 insertions(+), 923 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 4c5496ad5..3398d6763 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1535,8 +1535,8 @@ class GraduationTaskssettinglist extends Component{ return( {item==="提交作品"?提交作品:""} - {item==="修改作品"?修改作品:""} - {item==="查看作品"?查看作品 :""} + {item==="修改作品"?修改作品:""} + {item==="查看作品"?查看作品 :""} {item==="创建项目"?创建项目:""} {item==="关联项目"?关联项目:""} {item==="取消关联"?取消关联:""} diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 9dd0441de..3ef02578a 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -1,921 +1,920 @@ -import React, { Component } from 'react'; -import { BrowserRouter as Router, Route, Link } from "react-router-dom"; -import { Redirect } from 'react-router'; - -import PropTypes from 'prop-types'; - -// import searchImg from '../../../../images/educoder/icon/search.svg' - -// /images/educoder/icon/search.svg - -import { getImageUrl, toPath } from 'educoder' - -import axios from 'axios'; - -import { Modal,Checkbox ,Radio,Input,message } from 'antd'; - -import Addcourses from '../courses/coursesPublic/Addcourses'; - -import LoginDialog from '../login/LoginDialog'; - -import Trialapplication from '../login/Trialapplication' - -import 'antd/lib/modal/style/index.css'; - -import 'antd/lib/checkbox/style/index.css'; - -import 'antd/lib/radio/style/index.css'; - -import 'antd/lib/input/style/index.css'; - -import './TPMIndex.css' - -import { trigger, broadcastChannelPostMessage } from 'educoder'; - -const $ = window.$ -// TODO 这部分脚本从公共脚本中直接调用 - -const RadioGroup = Radio.Group; -const Search = Input.Search; -let old_url; -function loadHeader(){ - //头部导航条的----------显示搜索框 - $("#search-open").on("click",function(e){ - $(this).hide(); - // $("#header-nav").animate({opacity:"0"},1000); - $(".posi-search").show() // animate({opacity:"1"},1000); - $("#header-nav").css("z-index","2"); - $(".posi-search").css("z-index","3"); - $(".HeaderSearch").show(); - $(".HeaderSearch").val(""); - $(".search-input").focus(); - $(".search-all .search-content").hide(); - e.stopPropagation();//阻止冒泡 - }); - $(".HeaderSearch").on("click",function(e){ - e.stopPropagation();//阻止冒泡 - }); - //搜索框输入内容 - $(".HeaderSearch").on("input",function(e){ - if($(".HeaderSearch").val()==""){ - $(".search-all .search-content").hide(); - }else{ - $(".search-all .search-content").show(); - } - e.stopPropagation();//阻止冒泡 - }); - //搜索 - // $("#header_keyword_search").on("click", header_search); - // $("input[name='search_keyword']").on("keydown", function(event){ - // var code; - // if (!event) { - // event = window.event; //针对ie浏览器 - // code = event.keyCode; - // } - // else { - // code = event.keyCode; - // } - // if(code == 13) { - // header_search(); - // return false; - // } - // }); - $(".search-clear").click(function(e){e.stopPropagation();}); - //切换搜索条件 - $("#searchkey li").click(function(e){ - var key=$($(this).children("a")[0]).html(); - switch (key){ - case '实训': - $("#search_type").val('1'); - break; - case '课堂': - $("#search_type").val('2'); - break; - case '用户': - $("#search_type").val('3'); - break; - } - $("#searchkey").siblings(".searchkey").html(key); - $("#searchkey").hide(); - e.stopPropagation();//阻止冒泡 - }); - //切换选择导航条 - $("#header-nav li").click(function(){ - $("#header-nav li").removeClass("active"); - $(this).addClass("active"); - }); - //点击页面其它(与搜索框无关的地方)都会将搜索框隐藏,所以与搜索框有关的地方需要阻止冒泡 - $("body").on("click",function(){ - closeSearch(); - }); - - $(".search_history").on("click", function(){ - $("input[name='search_keyword']").val($(this).html()); - header_search(); - }); -} - -function header_search(reactHeaderComponnet){ - console.log(old_url) - var keyword = $("input[name='search_keyword']").val(); // 搜索关键字 - if (!reactHeaderComponnet) { - reactHeaderComponnet = window._header_componentHandler - } - if (!reactHeaderComponnet) { - var index = $("#search_type").val(); // 搜索课程/项目 - keyword = encodeURIComponent(keyword); - // $.get('/users/search_shixuns_or_course', - // { search: keyword, - // index: index}); - window.location.href = old_url+"/users/search_shixuns_or_courses" + "?search=" + keyword + "&index=" + index; - //e.stopPropagation();//阻止冒泡 - } else { - window.__headSearchKeyword = keyword - reactHeaderComponnet.props.history.push(`/shixuns`) - trigger('searchKeywordChange', keyword) - } -} -//头部导航条的隐藏 -function closeSearch(){ - $('#posi-search').hide(); - $("#search-open").show(); - // $(".posi-search").animate({opacity:"0"},800); - $(".HeaderSearch").hide(); - $("#header-nav").animate({opacity:"1"},1000); - $(".posi-search").css("z-index","2"); - $("#header-nav").css("z-index","3"); -} - -/* - _logined_header.html.erb - _unlogin_header.html.erb -*/ -window._header_componentHandler = null; -class NewHeader extends Component { - constructor(props) { - super(props) - this.state={ - Addcoursestypes:false, - tojoinitemtype:false, - tojoinclasstitle:undefined, - rolearr:["",""], - Checkboxteacherchecked:false, - Checkboxstudentchecked:false, - Checkboxteachingchecked:false, - Checkboxteachertype:false, - Checkboxteachingtype:false, - code_notice:false, - checked_notice:false, - RadioGroupvalue:undefined, - submitapplications:false, - isRender:false, - isRenders:false, - user:undefined, - } - } - - componentDidMount() { - window._header_componentHandler = this; - - loadHeader(); - - //下拉框的显示隐藏 - var hoverTimeout; - var hoveredPanel; - $(".edu-menu-panel").hover(function(){ - if (hoverTimeout) { // 一次只显示一个panel - if (hoveredPanel && hoveredPanel != this) { - $(hoveredPanel).find(".edu-menu-list").hide() - } - clearTimeout(hoverTimeout); - hoverTimeout = null; - } - hoveredPanel = this; - $(this).find(".edu-menu-list").show(); - },function(){ - var that =this; - // 延迟hide - hoverTimeout = setTimeout(function() { - $(that).find(".edu-menu-list").hide(); - }, 800) - - }); - - - - } - - - componentWillReceiveProps(newProps, oldProps) { - this.setState({ - user:newProps.user - }) - if(newProps.Headertop!=undefined){ - old_url=newProps.Headertop.old_url - } - - } - getCookie=(key)=>{ - var arr,reg = RegExp('(^| )'+key+'=([^;]+)(;|$)'); - if (arr = document.cookie.match(reg)) //["username=liuwei;", "", "liuwei", ";"] - return decodeURIComponent(arr[2]); - else - return null; - } - - delCookie=(name)=>{ - var exp = new Date(); - exp.setTime(exp.getTime() - 1); - var cval=this.getCookie(name); - if(cval!=null){ - document.cookie= name + "="+cval+";expires="+exp.toGMTString(); - } - } - onLogout = () => { - const url = `/accounts/logout.json` - this.delCookie("autologin_trustie") - axios.get(url, { - }) - .then((response) => { - if(response.data.status===1){ - this.setState({ - user:undefined - }) - // let path="/"; - // this.props.history.push(path); - broadcastChannelPostMessage('refreshPage') - window.location.href ="/login" - message.success('退出成功'); - } - }); - } - - tojoinclass=()=>{ - this.setState({ - Addcoursestypes:true, - }) - } - - tojoinitem=()=>{ - this.setState({ - tojoinitemtype:true - }) - } - - - submitstatevalue=(sum,value,data)=>{ - this.setState({ - Addcoursestypes:false, - tojoinitemtype:false, - tojoinclasstitle:undefined, - rolearr:["",""], - Checkboxteacherchecked:false, - Checkboxstudentchecked:false, - Checkboxteachingchecked:false, - Checkboxteachertype:false, - Checkboxteachingtype:false, - code_notice:false, - checked_notice:false, - submitapplicationssum:sum, - submitapplications:true, - submitapplicationsvalue:value, - submitapplicationsvaluedata:data, - RadioGroupvalue:undefined - }) - } - - onChangeRadioGroup = (e) => { - this.setState({ - RadioGroupvalue: e.target.value, - }); - } - - submitsubmitapplications=()=>{ - let { - submitapplicationssum, - submitapplicationsvaluedata - }=this.state; - this.setState({ - submitapplications:false, - RadioGroupvalue:undefined - }) - if(submitapplicationssum===0){ - if(submitapplicationsvaluedata!=undefined){ - window.location.href = "https://www.educoder.net/courses/"+submitapplicationsvaluedata; - } - }else if(submitapplicationssum===1){ - if(submitapplicationsvaluedata!=undefined){ - window.location.href = "https://www.educoder.net/projects/"+submitapplicationsvaluedata; - } - } - } - - hidesubmitapplications=()=>{ - this.setState({ - Addcoursestypes:false, - tojoinitemtype:false, - tojoinclasstitle:undefined, - rolearr:["",""], - Checkboxteacherchecked:false, - Checkboxstudentchecked:false, - Checkboxteachingchecked:false, - Checkboxteachertype:false, - Checkboxteachingtype:false, - code_notice:false, - checked_notice:false, - submitapplications:false, - RadioGroupvalue:undefined - }) - } - educoderlogin=()=>{ - //登出账号 - var url = `/accounts/logout.json`; - - axios.get((url)).then((result) => { - if(result!==undefined){ - this.setState({ - isRender:true - }) - } - }).catch((error) => { - console.log(error); - }) - } - - onKeywordSearch = () => { - header_search(this) - } - onKeywordSearchKeyDown = (e) => { - let code = e.keyCode; - - if(code == 13) { - header_search(this); - return false; - } - } - - hideAddcoursestypes=()=>{ - - this.setState({ - Addcoursestypes:false - }) - - } - - - hidetojoinclass=()=>{ - this.setState({ - tojoinclasstype:false, - tojoinitemtype:false, - tojoinclasstitle:undefined, - rolearr:["",""], - Checkboxteacherchecked:false, - Checkboxstudentchecked:false, - Checkboxteachingchecked:false, - Checkboxteachertype:false, - Checkboxteachingtype:false, - code_notice:false, - checked_notice:false, - RadioGroupvalue:undefined - }) - } - -submittojoinclass=(value)=>{ - let {tojoinclasstitle,rolearr,RadioGroupvalue}=this.state; - - if(tojoinclasstitle===undefined){ - this.setState({ - code_notice:true - }) - return - } - let newrolearr=rolearr; - if(value===1){ - if(tojoinclasstitle.length<6){ - this.setState({ - code_notice:true - }) - return - } - }else if(value===0){ - if(tojoinclasstitle.length<5){ - this.setState({ - code_notice:true - }) - return - } - } - if(tojoinclasstitle===""||tojoinclasstitle===undefined){ - this.setState({ - code_notice:true - }) - return - }else{ - this.setState({ - code_notice:false - }) - } - - let pamst=[]; - let num=0; - for(var i = 0 ; i { - if( response.data.state===0){ - this.submitstatevalue(0,"加入成功",response.data.course_id) - }else if( response.data.state===1){ - }else if( response.data.state===2){ - this.submitstatevalue( 0,"课堂已过期! 请联系课堂管理员重启课堂。(在配置课堂处)") - }else if( response.data.state===3){ - this.submitstatevalue( 0,"您已是课堂成员)",response.data.course_id) - }else if( response.data.state===4){ - this.submitstatevalue( 0,"您输入的邀请码错误)") - }else if( response.data.state===5){ - this.submitstatevalue( 0,"您还未登录") - }else if( response.data.state===6){ - this.submitstatevalue( 0,"申请已提交,请等待审核") - }else if( response.data.state===7){ - this.submitstatevalue( 0," 您已经发送过申请了,请耐心等待") - }else if( response.data.state===8){ - this.submitstatevalue( 0,"您已经是该课堂的教师了",response.data.course_id) - }else if( response.data.state==9){ - this.submitstatevalue( 0,"您已经是该课堂的教辅了",response.data.course_id) - }else if( response.data.state==10){ - this.submitstatevalue(0,"您已经是该课堂的管理员了",response.data.course_id) - }else if( response.data.state==11){ - this.submitstatevalue(0," 该课堂已归档,请联系老师") - }else if( response.data.state==12){ - this.submitstatevalue(0,"您已经发送过申请了,请耐心等待师") - }else if( response.data.state==13){ - this.submitstatevalue(0,"您申请已提交,请等待审核") - }else if( response.data.state==14){ - this.submitstatevalue("此邀请码已停用,请与老师联系") - }else if( response.data.state==15){ - this.submitstatevalue(0,"您已是课堂成员! 加入分班请在课堂具体分班页面进行") - }else { - this.submitstatevalue(0," 未知错误,请稍后再试") - } - }) - - } - - if(value===1){ - let url="https://www.educoder.net/applied_project/applied_project_info.json" - const form = new FormData(); - form.append('invite_code', tojoinclasstitle); - form.append('member', RadioGroupvalue); - form.append('type', 1); - axios.post(url,form,[true] - ).then((response) => { - if( response.data.status===1){ - this.submitstatevalue(1,"您输入的邀请码错误") - }else if( response.data.status===2){ - this.submitstatevalue( 1,"您已经是该项目成员",response.data.project) - }else if( response.data.status===3){ - this.submitstatevalue( 1,"请选择一个角色") - }else if( response.data.status===4){ - this.submitstatevalue( 1,"您的申请已提交,请等待项目管理员审批") - }else if( response.data.status===5){ - this.submitstatevalue( 1,"您已经申请加入该项目了,请耐心等待") - }else if( response.data.status===6){ - this.submitstatevalue( 1,"您已成功加入项目",response.data.project) - } - }) - } -} - - trialapplications =()=>{ - this.setState({ - isRenders: true, - }) - } - - - - render() { - const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。 - const {match ,} = this.props; - - let {Addcoursestypes, - tojoinitemtype, - tojoinclasstitle, - Checkboxteacherchecked, - Checkboxstudentchecked, - Checkboxteachingchecked, - Checkboxteachertype, - Checkboxteachingtype, - code_notice, - checked_notice, - RadioGroupvalue, - submitapplications, - submitapplicationsvalue, - user, - isRenders, - isRender, - }=this.state; - /* - 用户名称 用户头像url - */ - let activeIndex = false; - let activeForums = false; - let activeShixuns = false; - let activePaths = false; - let coursestype=false; - - if (match.path === '/forums') { - activeForums = true; - } else if (match.path.startsWith('/shixuns')) { - activeShixuns = true; - }else if (match.path.startsWith('/paths')) { - activePaths = true; - } else if (match.path.startsWith('/courses')) { - coursestype = true; - }else { - activeIndex = true; - } - - // join_course_url: "https://www.educoder.net/courses/join_course_multi_role" - // join_project_url: "https://www.educoder.net/applied_project/applied_project_info" - // rolearr:["",""], - console.log() - return ( - -
    - {/*{*/} - {/* isRender&& isRender === true?*/} - - {/* :""*/} - {/*}*/} - - { - isRenders&&isRenders===true? - - :"" - } - -
    - {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} - - 高校智能化教学与实训平台 - -
    - - - - - - -
    - - {/* - <%= link_to '登录', signin_path, :className => "mr5" %> - - <%= link_to '注册', user_join_path, :className => "ml5" %> - */} - { user===undefined? - - this.educoderlogin()} className="mr5 color-white">登录 - - 注册 - :user.login===""? - this.educoderlogin()} className="mr5 color-white">登录 - - 注册 - : - - } - {/*href="https://www.educoder.net/login"*/} - { user===undefined?"":user.login===""?"":*/} -
    - - - - -
    -
    - - -
    -
    - - - - -
    -
    -
      -
      -

      - {submitapplicationsvalue} -

      -
      -
    • - 取消 - 确定 -
    • - -
    -
    -
    -
    - -
    } -
    -
    - - ); - } -} - -export default NewHeader; - - - -//
      -//
    • 1{/*<%= link_to "首页", home_path %>*/}
    • -//
    • 2{/*<%= link_to "精选实训", shixuns_path %>*/}
    • -//
    • 3{/*<%= link_to "实训路径", subjects_path %>*/}
    • -//
    • 4{/*<%= link_to "在线课堂", courses_path %>*/}
    • -//
    • 5{/*<%= link_to "讨论组", forums_path %>*/}
    • -//
    - - - -{/*{*/} -{/**/} -{/**/} -{/*/!*{this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count > 99 ? '99+'*!/*/} -{/*/!*: this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count}*!/*/} -{/**/} -{/**/} -{/*}*/} -{/*{ this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count>0 &&*/} -{/**/} -{/**/} -{/*/!*{this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count > 99 ? '99+'*!/*/} -{/*/!*: this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count}*!/*/} -{/**/} -{/*}*/} -{/*{ this.props.Headertop===undefined?"":user && this.props.Headertop.unread_message_count>0 &&*/} -{/**/} -{/**/} -{/**/} -{/*}*/} - - - -{/* - 需求:消息数量 - - */} +import React, { Component } from 'react'; +import { BrowserRouter as Router, Route, Link } from "react-router-dom"; +import { Redirect } from 'react-router'; + +import PropTypes from 'prop-types'; + +// import searchImg from '../../../../images/educoder/icon/search.svg' + +// /images/educoder/icon/search.svg + +import { getImageUrl, toPath } from 'educoder' + +import axios from 'axios'; + +import { Modal,Checkbox ,Radio,Input,message } from 'antd'; + +import Addcourses from '../courses/coursesPublic/Addcourses'; + +import LoginDialog from '../login/LoginDialog'; + +// import Trialapplication from '../login/Trialapplication' + +import 'antd/lib/modal/style/index.css'; + +import 'antd/lib/checkbox/style/index.css'; + +import 'antd/lib/radio/style/index.css'; + +import 'antd/lib/input/style/index.css'; + +import './TPMIndex.css' + +import { trigger, broadcastChannelPostMessage } from 'educoder'; + +const $ = window.$ +// TODO 这部分脚本从公共脚本中直接调用 + +const RadioGroup = Radio.Group; +const Search = Input.Search; +let old_url; +function loadHeader(){ + //头部导航条的----------显示搜索框 + $("#search-open").on("click",function(e){ + $(this).hide(); + // $("#header-nav").animate({opacity:"0"},1000); + $(".posi-search").show() // animate({opacity:"1"},1000); + $("#header-nav").css("z-index","2"); + $(".posi-search").css("z-index","3"); + $(".HeaderSearch").show(); + $(".HeaderSearch").val(""); + $(".search-input").focus(); + $(".search-all .search-content").hide(); + e.stopPropagation();//阻止冒泡 + }); + $(".HeaderSearch").on("click",function(e){ + e.stopPropagation();//阻止冒泡 + }); + //搜索框输入内容 + $(".HeaderSearch").on("input",function(e){ + if($(".HeaderSearch").val()==""){ + $(".search-all .search-content").hide(); + }else{ + $(".search-all .search-content").show(); + } + e.stopPropagation();//阻止冒泡 + }); + //搜索 + // $("#header_keyword_search").on("click", header_search); + // $("input[name='search_keyword']").on("keydown", function(event){ + // var code; + // if (!event) { + // event = window.event; //针对ie浏览器 + // code = event.keyCode; + // } + // else { + // code = event.keyCode; + // } + // if(code == 13) { + // header_search(); + // return false; + // } + // }); + $(".search-clear").click(function(e){e.stopPropagation();}); + //切换搜索条件 + $("#searchkey li").click(function(e){ + var key=$($(this).children("a")[0]).html(); + switch (key){ + case '实训': + $("#search_type").val('1'); + break; + case '课堂': + $("#search_type").val('2'); + break; + case '用户': + $("#search_type").val('3'); + break; + } + $("#searchkey").siblings(".searchkey").html(key); + $("#searchkey").hide(); + e.stopPropagation();//阻止冒泡 + }); + //切换选择导航条 + $("#header-nav li").click(function(){ + $("#header-nav li").removeClass("active"); + $(this).addClass("active"); + }); + //点击页面其它(与搜索框无关的地方)都会将搜索框隐藏,所以与搜索框有关的地方需要阻止冒泡 + $("body").on("click",function(){ + closeSearch(); + }); + + $(".search_history").on("click", function(){ + $("input[name='search_keyword']").val($(this).html()); + header_search(); + }); +} + +function header_search(reactHeaderComponnet){ + console.log(old_url) + var keyword = $("input[name='search_keyword']").val(); // 搜索关键字 + if (!reactHeaderComponnet) { + reactHeaderComponnet = window._header_componentHandler + } + if (!reactHeaderComponnet) { + var index = $("#search_type").val(); // 搜索课程/项目 + keyword = encodeURIComponent(keyword); + // $.get('/users/search_shixuns_or_course', + // { search: keyword, + // index: index}); + window.location.href = old_url+"/users/search_shixuns_or_courses" + "?search=" + keyword + "&index=" + index; + //e.stopPropagation();//阻止冒泡 + } else { + window.__headSearchKeyword = keyword + reactHeaderComponnet.props.history.push(`/shixuns`) + trigger('searchKeywordChange', keyword) + } +} +//头部导航条的隐藏 +function closeSearch(){ + $('#posi-search').hide(); + $("#search-open").show(); + // $(".posi-search").animate({opacity:"0"},800); + $(".HeaderSearch").hide(); + $("#header-nav").animate({opacity:"1"},1000); + $(".posi-search").css("z-index","2"); + $("#header-nav").css("z-index","3"); +} + +/* + _logined_header.html.erb + _unlogin_header.html.erb +*/ +window._header_componentHandler = null; +class NewHeader extends Component { + constructor(props) { + super(props) + this.state={ + Addcoursestypes:false, + tojoinitemtype:false, + tojoinclasstitle:undefined, + rolearr:["",""], + Checkboxteacherchecked:false, + Checkboxstudentchecked:false, + Checkboxteachingchecked:false, + Checkboxteachertype:false, + Checkboxteachingtype:false, + code_notice:false, + checked_notice:false, + RadioGroupvalue:undefined, + submitapplications:false, + isRender:false, + isRenders:false, + user:undefined, + } + } + + componentDidMount() { + window._header_componentHandler = this; + + loadHeader(); + + //下拉框的显示隐藏 + var hoverTimeout; + var hoveredPanel; + $(".edu-menu-panel").hover(function(){ + if (hoverTimeout) { // 一次只显示一个panel + if (hoveredPanel && hoveredPanel != this) { + $(hoveredPanel).find(".edu-menu-list").hide() + } + clearTimeout(hoverTimeout); + hoverTimeout = null; + } + hoveredPanel = this; + $(this).find(".edu-menu-list").show(); + },function(){ + var that =this; + // 延迟hide + hoverTimeout = setTimeout(function() { + $(that).find(".edu-menu-list").hide(); + }, 800) + + }); + + + + } + + + componentWillReceiveProps(newProps, oldProps) { + this.setState({ + user:newProps.user + }) + if(newProps.Headertop!=undefined){ + old_url=newProps.Headertop.old_url + } + + } + getCookie=(key)=>{ + var arr,reg = RegExp('(^| )'+key+'=([^;]+)(;|$)'); + if (arr = document.cookie.match(reg)) //["username=liuwei;", "", "liuwei", ";"] + return decodeURIComponent(arr[2]); + else + return null; + } + + delCookie=(name)=>{ + var exp = new Date(); + exp.setTime(exp.getTime() - 1); + var cval=this.getCookie(name); + if(cval!=null){ + document.cookie= name + "="+cval+";expires="+exp.toGMTString(); + } + } + onLogout = () => { + const url = `/accounts/logout.json` + this.delCookie("autologin_trustie") + axios.get(url, { + }) + .then((response) => { + if(response.data.status===1){ + this.setState({ + user:undefined + }) + // let path="/"; + // this.props.history.push(path); + broadcastChannelPostMessage('refreshPage') + window.location.href ="/login" + message.success('退出成功'); + } + }); + } + + tojoinclass=()=>{ + this.setState({ + Addcoursestypes:true, + }) + } + + tojoinitem=()=>{ + this.setState({ + tojoinitemtype:true + }) + } + + + submitstatevalue=(sum,value,data)=>{ + this.setState({ + Addcoursestypes:false, + tojoinitemtype:false, + tojoinclasstitle:undefined, + rolearr:["",""], + Checkboxteacherchecked:false, + Checkboxstudentchecked:false, + Checkboxteachingchecked:false, + Checkboxteachertype:false, + Checkboxteachingtype:false, + code_notice:false, + checked_notice:false, + submitapplicationssum:sum, + submitapplications:true, + submitapplicationsvalue:value, + submitapplicationsvaluedata:data, + RadioGroupvalue:undefined + }) + } + + onChangeRadioGroup = (e) => { + this.setState({ + RadioGroupvalue: e.target.value, + }); + } + + submitsubmitapplications=()=>{ + let { + submitapplicationssum, + submitapplicationsvaluedata + }=this.state; + this.setState({ + submitapplications:false, + RadioGroupvalue:undefined + }) + if(submitapplicationssum===0){ + if(submitapplicationsvaluedata!=undefined){ + window.location.href = "https://www.educoder.net/courses/"+submitapplicationsvaluedata; + } + }else if(submitapplicationssum===1){ + if(submitapplicationsvaluedata!=undefined){ + window.location.href = "https://www.educoder.net/projects/"+submitapplicationsvaluedata; + } + } + } + + hidesubmitapplications=()=>{ + this.setState({ + Addcoursestypes:false, + tojoinitemtype:false, + tojoinclasstitle:undefined, + rolearr:["",""], + Checkboxteacherchecked:false, + Checkboxstudentchecked:false, + Checkboxteachingchecked:false, + Checkboxteachertype:false, + Checkboxteachingtype:false, + code_notice:false, + checked_notice:false, + submitapplications:false, + RadioGroupvalue:undefined + }) + } + educoderlogin=()=>{ + //登出账号 + var url = `/accounts/logout.json`; + + axios.get((url)).then((result) => { + if(result!==undefined){ + this.setState({ + isRender:true + }) + } + }).catch((error) => { + console.log(error); + }) + } + + onKeywordSearch = () => { + header_search(this) + } + onKeywordSearchKeyDown = (e) => { + let code = e.keyCode; + + if(code == 13) { + header_search(this); + return false; + } + } + + hideAddcoursestypes=()=>{ + + this.setState({ + Addcoursestypes:false + }) + + } + + + hidetojoinclass=()=>{ + this.setState({ + tojoinclasstype:false, + tojoinitemtype:false, + tojoinclasstitle:undefined, + rolearr:["",""], + Checkboxteacherchecked:false, + Checkboxstudentchecked:false, + Checkboxteachingchecked:false, + Checkboxteachertype:false, + Checkboxteachingtype:false, + code_notice:false, + checked_notice:false, + RadioGroupvalue:undefined + }) + } + +submittojoinclass=(value)=>{ + let {tojoinclasstitle,rolearr,RadioGroupvalue}=this.state; + + if(tojoinclasstitle===undefined){ + this.setState({ + code_notice:true + }) + return + } + let newrolearr=rolearr; + if(value===1){ + if(tojoinclasstitle.length<6){ + this.setState({ + code_notice:true + }) + return + } + }else if(value===0){ + if(tojoinclasstitle.length<5){ + this.setState({ + code_notice:true + }) + return + } + } + if(tojoinclasstitle===""||tojoinclasstitle===undefined){ + this.setState({ + code_notice:true + }) + return + }else{ + this.setState({ + code_notice:false + }) + } + + let pamst=[]; + let num=0; + for(var i = 0 ; i { + if( response.data.state===0){ + this.submitstatevalue(0,"加入成功",response.data.course_id) + }else if( response.data.state===1){ + }else if( response.data.state===2){ + this.submitstatevalue( 0,"课堂已过期! 请联系课堂管理员重启课堂。(在配置课堂处)") + }else if( response.data.state===3){ + this.submitstatevalue( 0,"您已是课堂成员)",response.data.course_id) + }else if( response.data.state===4){ + this.submitstatevalue( 0,"您输入的邀请码错误)") + }else if( response.data.state===5){ + this.submitstatevalue( 0,"您还未登录") + }else if( response.data.state===6){ + this.submitstatevalue( 0,"申请已提交,请等待审核") + }else if( response.data.state===7){ + this.submitstatevalue( 0," 您已经发送过申请了,请耐心等待") + }else if( response.data.state===8){ + this.submitstatevalue( 0,"您已经是该课堂的教师了",response.data.course_id) + }else if( response.data.state==9){ + this.submitstatevalue( 0,"您已经是该课堂的教辅了",response.data.course_id) + }else if( response.data.state==10){ + this.submitstatevalue(0,"您已经是该课堂的管理员了",response.data.course_id) + }else if( response.data.state==11){ + this.submitstatevalue(0," 该课堂已归档,请联系老师") + }else if( response.data.state==12){ + this.submitstatevalue(0,"您已经发送过申请了,请耐心等待师") + }else if( response.data.state==13){ + this.submitstatevalue(0,"您申请已提交,请等待审核") + }else if( response.data.state==14){ + this.submitstatevalue("此邀请码已停用,请与老师联系") + }else if( response.data.state==15){ + this.submitstatevalue(0,"您已是课堂成员! 加入分班请在课堂具体分班页面进行") + }else { + this.submitstatevalue(0," 未知错误,请稍后再试") + } + }) + + } + + if(value===1){ + let url="https://www.educoder.net/applied_project/applied_project_info.json" + const form = new FormData(); + form.append('invite_code', tojoinclasstitle); + form.append('member', RadioGroupvalue); + form.append('type', 1); + axios.post(url,form,[true] + ).then((response) => { + if( response.data.status===1){ + this.submitstatevalue(1,"您输入的邀请码错误") + }else if( response.data.status===2){ + this.submitstatevalue( 1,"您已经是该项目成员",response.data.project) + }else if( response.data.status===3){ + this.submitstatevalue( 1,"请选择一个角色") + }else if( response.data.status===4){ + this.submitstatevalue( 1,"您的申请已提交,请等待项目管理员审批") + }else if( response.data.status===5){ + this.submitstatevalue( 1,"您已经申请加入该项目了,请耐心等待") + }else if( response.data.status===6){ + this.submitstatevalue( 1,"您已成功加入项目",response.data.project) + } + }) + } +} + + // trialapplications =()=>{ + // this.setState({ + // isRenders: true, + // }) + // } + + + + render() { + const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。 + const {match ,} = this.props; + + let {Addcoursestypes, + tojoinitemtype, + tojoinclasstitle, + Checkboxteacherchecked, + Checkboxstudentchecked, + Checkboxteachingchecked, + Checkboxteachertype, + Checkboxteachingtype, + code_notice, + checked_notice, + RadioGroupvalue, + submitapplications, + submitapplicationsvalue, + user, + isRender, + }=this.state; + /* + 用户名称 用户头像url + */ + let activeIndex = false; + let activeForums = false; + let activeShixuns = false; + let activePaths = false; + let coursestype=false; + + if (match.path === '/forums') { + activeForums = true; + } else if (match.path.startsWith('/shixuns')) { + activeShixuns = true; + }else if (match.path.startsWith('/paths')) { + activePaths = true; + } else if (match.path.startsWith('/courses')) { + coursestype = true; + }else { + activeIndex = true; + } + + // join_course_url: "https://www.educoder.net/courses/join_course_multi_role" + // join_project_url: "https://www.educoder.net/applied_project/applied_project_info" + // rolearr:["",""], + console.log() + return ( + +
    + {/*{*/} + {/* isRender&& isRender === true?*/} + + {/* :""*/} + {/*}*/} + + {/*{*/} + {/* isRenders&&isRenders===true?*/} + {/* */} + {/* :""*/} + {/*}*/} + +
    + {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} + + 高校智能化教学与实训平台 + +
    + + + + + + +
    + + {/* + <%= link_to '登录', signin_path, :className => "mr5" %> + + <%= link_to '注册', user_join_path, :className => "ml5" %> + */} + { user===undefined? + + this.educoderlogin()} className="mr5 color-white">登录 + + 注册 + :user.login===""? + this.educoderlogin()} className="mr5 color-white">登录 + + 注册 + : + + } + {/*href="https://www.educoder.net/login"*/} + { user===undefined?"":user.login===""?"":*/} +
    + + + + +
    +
    + + +
    +
    + + + + +
    +
    +
      +
      +

      + {submitapplicationsvalue} +

      +
      +
    • + 取消 + 确定 +
    • + +
    +
    +
    +
    + +
    } +
    +
    + + ); + } +} + +export default NewHeader; + + + +//
      +//
    • 1{/*<%= link_to "首页", home_path %>*/}
    • +//
    • 2{/*<%= link_to "精选实训", shixuns_path %>*/}
    • +//
    • 3{/*<%= link_to "实训路径", subjects_path %>*/}
    • +//
    • 4{/*<%= link_to "在线课堂", courses_path %>*/}
    • +//
    • 5{/*<%= link_to "讨论组", forums_path %>*/}
    • +//
    + + + +{/*{*/} +{/**/} +{/**/} +{/*/!*{this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count > 99 ? '99+'*!/*/} +{/*/!*: this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count}*!/*/} +{/**/} +{/**/} +{/*}*/} +{/*{ this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count>0 &&*/} +{/**/} +{/**/} +{/*/!*{this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count > 99 ? '99+'*!/*/} +{/*/!*: this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count}*!/*/} +{/**/} +{/*}*/} +{/*{ this.props.Headertop===undefined?"":user && this.props.Headertop.unread_message_count>0 &&*/} +{/**/} +{/**/} +{/**/} +{/*}*/} + + + +{/* + 需求:消息数量 + + */} From 7afce937962a6efcd5b0993c2168c126652c2195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 09:33:52 +0800 Subject: [PATCH 018/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTasksappraise.js | 2 +- .../tasks/GraduationTaskssettinglist.js | 59 ++++++++++--------- 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index a45a105fd..7807e7265 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -205,7 +205,7 @@ class GraduationTasksappraise extends Component{
    -
    +
    {/*
    */} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index d0b30db93..39068e1e3 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -726,17 +726,19 @@ class GraduationTaskssettinglist extends Component{ {this.props.isAdmin()?operation.map((tag,key) => { return(
    - {tag.status===0?"--":调整学生最终成绩
    + 调整学生最终成绩
    其它历史评分将全部失效:""}> - {tag.name==="评阅"?{tag.name} + {tag.name==="评阅"?tag.status===0?"--": + {tag.name} + : - this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""} - >{tag.name} + >{tag.status===0?"":tag.name} } -
    } +
    ) }):""} @@ -745,9 +747,7 @@ class GraduationTaskssettinglist extends Component{ operation.map((tag,key) => { return(
    - {tag.status===0?"--": - 查看 - } + {tag.status===0?"":"查看"}
    )} ):"" @@ -858,19 +858,21 @@ class GraduationTaskssettinglist extends Component{ {this.props.isAdmin()?operation.map((tag,key) => { return(
    - {tag.status===0?"--": + 调整学生最终成绩
    其它历史评分将全部失效:""}> - {tag.name==="评阅"?{tag.name} + {tag.name==="评阅"?tag.status===0?"--": + {tag.name} + : this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""} - >{tag.name} + >{tag.status===0?"":tag.name} }
    - } +
    ) }):""} @@ -879,9 +881,10 @@ class GraduationTaskssettinglist extends Component{ operation.map((tag,key) => { return(
    - {tag.status===0?"--": - 查看 - } + + {tag.status===0?"":"查看"} + +
    )} ):"" @@ -1006,14 +1009,15 @@ class GraduationTaskssettinglist extends Component{ {this.props.isAdmin()?operation.map((tag,key) => { return(
    - {tag.status===0?"--": + 调整学生最终成绩
    其它历史评分将全部失效:""}> - {tag.name==="评阅"?{tag.name} + {tag.name==="评阅"?tag.status===0?"--": + {tag.name} : this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""} - >{tag.name} + >{tag.status===0?"":tag.name} }
    } @@ -1026,9 +1030,9 @@ class GraduationTaskssettinglist extends Component{ operation.map((tag,key) => { return(
    - {tag.status===0?"--": - 查看 - } + + {tag.status===0?"":"查看"} +
    )} ):"" @@ -1138,14 +1142,16 @@ class GraduationTaskssettinglist extends Component{ {this.props.isAdmin()?operation.map((tag,key) => { return(
    - {tag.status===0?"--": + 调整学生最终成绩
    其它历史评分将全部失效:""}> - {tag.name==="评阅"?{tag.name} + {tag.name==="评阅"?tag.status===0?"--": + {tag.name} + : this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""} - >{tag.name} + >{tag.status===0?"":tag.name} }
    } @@ -1158,9 +1164,8 @@ class GraduationTaskssettinglist extends Component{ operation.map((tag,key) => { return(
    - {tag.status===0?"--": - 查看 - } + + {tag.status===0?"":"查看"}
    )} ):"" From f3c99d878012f7ff124957c249fa0fc9feaa2c1a Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 09:50:16 +0800 Subject: [PATCH 019/964] MarkdownToHtml --- public/react/src/common/TextUtil.js | 5 ++- .../components/markdown/MarkdownToHtml.js | 45 ++++++------------- .../src/modules/courses/boards/TopicDetail.js | 32 ++++--------- 3 files changed, 27 insertions(+), 55 deletions(-) diff --git a/public/react/src/common/TextUtil.js b/public/react/src/common/TextUtil.js index 4a3145c19..d39ebb32a 100644 --- a/public/react/src/common/TextUtil.js +++ b/public/react/src/common/TextUtil.js @@ -1,5 +1,5 @@ import { bytesToSize } from 'educoder'; -export function markdownToHTML(oldContent) { +export function markdownToHTML(oldContent, selector) { window.$('#md_div').html('') // markdown to html var markdwonParser = window.editormd.markdownToHTML("md_div", { @@ -12,6 +12,9 @@ export function markdownToHTML(oldContent) { sequenceDiagram: true // 默认不解析 }); const content = window.$('#md_div').html() + if (selector) { + window.$(selector).html(content) + } return content } diff --git a/public/react/src/common/components/markdown/MarkdownToHtml.js b/public/react/src/common/components/markdown/MarkdownToHtml.js index 86e94c62e..266f831ee 100644 --- a/public/react/src/common/components/markdown/MarkdownToHtml.js +++ b/public/react/src/common/components/markdown/MarkdownToHtml.js @@ -6,40 +6,23 @@ class MarkdownToHtml extends Component{ this.state={ } } - // componentDidUpdate = (prevProps) => { - // if (this.props.content) { - // if ( prevProps.content != this.props.content ) { - // if (!this.shixunDescr) { - // this.shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", { - // markdown: this.props.content, - // htmlDecode: "style,script,iframe", // you can filter tags decode - // taskList: true, - // tex: true, // 默认不解析 - // flowChart: true, // 默认不解析 - // sequenceDiagram: true // 默认不解析 - // }); - // } else { - // this.shixunDescr.html(this.props.content) - // } - // } - // } - // } - // componentDidMount () { - // if (!this.shixunDescr) { - // this.shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", { - // markdown: this.props.content, - // htmlDecode: "style,script,iframe", // you can filter tags decode - // taskList: true, - // tex: true, // 默认不解析 - // flowChart: true, // 默认不解析 - // sequenceDiagram: true // 默认不解析 - // }); - // } - // } + componentDidUpdate = (prevProps) => { + if (this.props.content) { + if ( prevProps.content != this.props.content ) { + markdownToHTML(this.props.content, `.markdown_to_html_${this.props.selector || ''}`) + } + } + } + componentDidMount () { + this.props.content && markdownToHTML(this.props.content, `.markdown_to_html_${this.props.selector || ''}`) + + } render(){ return( -
    +
    ) } diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js index f0bc978ef..1ef880c9f 100644 --- a/public/react/src/modules/courses/boards/TopicDetail.js +++ b/public/react/src/modules/courses/boards/TopicDetail.js @@ -24,7 +24,7 @@ import '../../forums/RightSection.css' import './TopicDetail.css' import '../common/courseMessage.css' import { Pagination, Tooltip } from 'antd' -import { bytesToSize, ConditionToolTip } from 'educoder' +import { bytesToSize, ConditionToolTip, markdownToHTML, MarkdownToHtml } from 'educoder' import SendToCourseModal from '../coursesPublic/modal/SendToCourseModal' import CBreadcrumb from '../common/CBreadcrumb' import { generateComments, generateChildComments, _findById, handleContentBeforeCreateNew, addNewComment @@ -87,15 +87,6 @@ class TopicDetail extends Component { replies_count: response.data.data.total_replies_count }, {...this.state.memo}) }, () => { - setTimeout(()=>{ - var shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", { - htmlDecode: "style,script,iframe", // you can filter tags decode - taskList: true, - tex: true, // 默认不解析 - flowChart: true, // 默认不解析 - sequenceDiagram: true // 默认不解析 - }); - }, 200) }) // const { memo_replies, memo } = response.data; @@ -181,13 +172,13 @@ class TopicDetail extends Component { // md渲染content,等xhr执行完(即memoLoading变化),memo.content更新后初始化md setTimeout(()=>{ - var shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", { - htmlDecode: "style,script,iframe", // you can filter tags decode - taskList: true, - tex: true, // 默认不解析 - flowChart: true, // 默认不解析 - sequenceDiagram: true // 默认不解析 - }); + // var shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", { + // htmlDecode: "style,script,iframe", // you can filter tags decode + // taskList: true, + // tex: true, // 默认不解析 + // flowChart: true, // 默认不解析 + // sequenceDiagram: true // 默认不解析 + // }); }, 200) } @@ -629,13 +620,8 @@ class TopicDetail extends Component {
    -
    - -
    +
    -{/* style={{ paddingTop: '0px'}} */}
    {/* ${memo.user_praise ? '' : ''} */} From 3c40720339f36cbc77e05db8018aba3d8338b391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 10:09:33 +0800 Subject: [PATCH 020/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../graduation/tasks/GraduationTasksedit.js | 2 +- .../tasks/GraduationTaskssettinglist.js | 27 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index 36c2f9d3f..9874b26fa 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -125,7 +125,7 @@ class GraduationTasksedit extends Component{ GraduationTasksedittype=false; // window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions"; // this.goback() - this.props.history.push("/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"); + window.location.href="/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"; } }).catch((error) => { console.log(error) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 39068e1e3..ecfd21257 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -730,7 +730,7 @@ class GraduationTaskssettinglist extends Component{ 其它历史评分将全部失效:""}> {tag.name==="评阅"?tag.status===0?"--": - {tag.name} + tag.name : { return(
    - {tag.status===0?"":"查看"} + {tag.status===0?"--":查看}
    )} ):"" @@ -863,7 +863,7 @@ class GraduationTaskssettinglist extends Component{ 其它历史评分将全部失效:""}> {tag.name==="评阅"?tag.status===0?"--": - {tag.name} + tag.name : { return( )} ):"" @@ -1013,7 +1012,7 @@ class GraduationTaskssettinglist extends Component{ 调整学生最终成绩
    其它历史评分将全部失效:""}> {tag.name==="评阅"?tag.status===0?"--": - {tag.name} + tag.name : this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""} @@ -1030,9 +1029,9 @@ class GraduationTaskssettinglist extends Component{ operation.map((tag,key) => { return( )} ):"" @@ -1146,7 +1145,7 @@ class GraduationTaskssettinglist extends Component{ 调整学生最终成绩
    其它历史评分将全部失效:""}> {tag.name==="评阅"?tag.status===0?"--": - {tag.name} + tag.name : { return( )} ):"" From 86a20e86803fce6131d1ce664a78f395a3257341 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 21 Jun 2019 10:09:35 +0800 Subject: [PATCH 021/964] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../graduation/topics/GraduateTopicDetail.js | 46 +++++++++++++------ .../topics/GraduateTopicDetailInfo.js | 7 ++- .../topics/GraduateTopicDetailTable.js | 2 +- .../graduation/topics/GraduateTopicItem.js | 14 +++--- .../graduation/topics/GraduateTopicNew.js | 43 +++++++++++++++-- .../courses/graduation/topics/index.js | 18 +++++++- .../courses/poll/PollDetailTabFirst.js | 2 +- .../src/modules/courses/poll/PollListItem.js | 29 +++++------- .../modules/tpm/challengesnew/TPMMDEditor.js | 2 +- .../react/src/modules/user/usersInfo/Infos.js | 2 +- .../src/modules/user/usersInfo/InfosCourse.js | 17 ++++--- .../src/modules/user/usersInfo/InfosPath.js | 8 ++-- .../modules/user/usersInfo/InfosProject.js | 17 ++++--- .../src/modules/user/usersInfo/InfosShixun.js | 8 ++-- 14 files changed, 143 insertions(+), 72 deletions(-) diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js index e0eb07d56..27c27c64a 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js @@ -67,25 +67,35 @@ class GraduateTopicDetail extends Component{ let course_id=this.props.match.params.course_id; let {tableData}=this.state; - let url="/courses/"+course_id+"/graduation_topics/"+graduation_topic_id+"/" - if(tableData.user_selected_topic){ - url+="student_cancel_topic.json" - }else{ - url+="student_select_topic.json" - } - axios.post((url)).then((result)=>{ - console.log(result); - if(result.data.status == 0){ - this.getDetailList(); - this.props.showNotification(`${result.data.message}`); + this.props.confirm({ + content: tableData.user_selected_topic==0?`是否确认取消选题?`:"是否确认选题?", + onOk: () => { + let url="/courses/"+course_id+"/graduation_topics/"+graduation_topic_id+"/" + if(tableData.user_selected_topic==0){ + url+="student_cancel_topic.json" + }else if(tableData.user_selected_topic==null || tableData.user_selected_topic==2){ + url+="student_select_topic.json" + } + axios.post((url)).then((result)=>{ + console.log(result); + if(result.data.status == 0){ + this.getDetailList(); + this.props.showNotification(`${result.data.message}`); + } + }).catch((error)=>{ + console.log(error); + }) } - }).catch((error)=>{ - console.log(error); }) } render(){ - let {tableData,tablePage,tablePageSize,tab}=this.state + let { + tableData, + tablePage, + tablePageSize, + tab, + }=this.state let {course_id,graduation_topic_id}=this.props.match.params; const isStudent =this.props.isStudent(); const isAdmin =this.props.isAdmin(); @@ -113,8 +123,14 @@ class GraduateTopicDetail extends Component{ 课题详情
    + {/* null: 未选题 0:待确认 1:已同意 2:已拒绝 */} + { + isStudent && tableData.user_selected == false && (tableData.user_selected_topic==null || tableData.user_selected_topic==2) && + 选题 + } { - isStudent && {tableData.user_selected_topic ? "取消选题":"选题"} + isStudent && tableData.user_selected == true && tableData.user_selected_topic==0 && + 取消选题 } { isAdmin && 编辑 diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js index 708de6dcb..f0694964c 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js @@ -57,12 +57,17 @@ class GraduateTopicDetailTable extends Component{ return(
    +
    { topicInfo && topicInfo.description!="" && - + }
    { diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js index 7dbbf21f7..963c7a4f9 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js @@ -254,7 +254,7 @@ class GraduateTopicDetailTable extends Component{ tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{ return(
  • - {parseInt(key)*parseInt(page*15)+1} + {parseInt(key+1)+(parseInt(page-1)*15)} {item.student_name} {item.student_id} {item.class_group_name || "--"} diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js index 136280943..17a1b070e 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js @@ -96,26 +96,26 @@ class GraduateTopicItem extends Component{

    - + {discussMessage.author} - {discussMessage.selected_count} 已选 - {discussMessage.confirmation_count} 已确认 + {discussMessage.selected_count} 已选 + {discussMessage.confirmation_count} 已确认 { isAdmin && this.editTopic(`${discussMessage.id}`)} style="blue" className="font-16">编辑 } { - isStudent && data.user_selected == true && discussMessage.user_selected==true && - chooseTopic(`${discussMessage.id}`,index,discussMessage.user_selected)} style="blue" className="font-16"> + isStudent && data.user_selected == true && discussMessage.user_topic_status==0 && + chooseTopic(`${discussMessage.id}`,index,true)} style="blue" className="font-16"> 取消选题 } { - isStudent && data.user_selected == false && discussMessage.user_selected == false && - chooseTopic(`${discussMessage.id}`,index,discussMessage.user_selected)} style="blue" className="font-16"> + isStudent && data.user_selected==false && (discussMessage.user_topic_status == null || discussMessage.user_topic_status == 2) && + chooseTopic(`${discussMessage.id}`,index,false)} style="blue" className="font-16"> 选题 } diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js index 7c0811615..c3c0d18e2 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js @@ -87,7 +87,7 @@ class GraduateTopicNew extends Component{ let topicId=this.props.match.params.topicId let url=`/courses/${cid}/graduation_topics/${topicId}/edit.json`; axios.get((url)).then((result)=>{ - if(result.status==200){ + if(result){ this.setState({ left_banner_id:result.data.left_banner_id, course_name:result.data.course_name, @@ -315,6 +315,11 @@ class GraduateTopicNew extends Component{ console.log(this.props); return(

    +

    {course_name} @@ -384,6 +389,31 @@ class GraduateTopicNew extends Component{ .ant-upload-list-item{ margin-top:0px!important; } + + .ant-form-item-children{ + position:unset + } + .rememberTip{ + position:absolute; + right:0px; + bottom:-10px; + } + .chooseDes .ant-form-explain{ + position:absolute; + bottom:-10px; + left:0px; + } + .setUploadStyle .uploadBtn{ + height:20px; + line-height:20px; + } + .setUploadStyle .ant-form-item-control{ + margin-top:15px!important; + line-height:22px!important; + } + .setUploadStyle .ant-upload-list{ + margin-top:5px; + } `} @@ -392,7 +422,7 @@ class GraduateTopicNew extends Component{ {getFieldDecorator('description', { rules: [{ @@ -405,7 +435,9 @@ class GraduateTopicNew extends Component{ mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"> )} - + { getFieldDecorator('file',{ rules:[{ @@ -508,6 +540,9 @@ class GraduateTopicNew extends Component{ .flexBlock .ant-row.ant-form-item { margin-bottom: 6px; } + .ant-cascader-menu{ + min-width:125px!important; + } `} @@ -546,7 +581,7 @@ class GraduateTopicNew extends Component{ {getFieldDecorator('city', { rules: [{ diff --git a/public/react/src/modules/courses/graduation/topics/index.js b/public/react/src/modules/courses/graduation/topics/index.js index d7d6852f2..f84f53952 100644 --- a/public/react/src/modules/courses/graduation/topics/index.js +++ b/public/react/src/modules/courses/graduation/topics/index.js @@ -223,7 +223,23 @@ onDelete=(index)=>{ }) }else{ // 加入题库 - + let courseid=this.props.match.params.coursesId + let url=`/courses/${courseid}/graduation_topics/add_to_bank.json`; + axios.post((url),{ + topic_ids:checkBoxValues + }).then((result)=>{ + if(result){ + this.props.showNotification(`题库更新成功`); + let {searchValue,page,status} =this.state + this.fetchAll(searchValue,page,status); + this.setState({ + checkBoxValues:[], + checkAllValue:false + }) + } + }).catch((error)=>{ + console.log(error) + }) } }else{ diff --git a/public/react/src/modules/courses/poll/PollDetailTabFirst.js b/public/react/src/modules/courses/poll/PollDetailTabFirst.js index 4166895e1..6a5be2e8d 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabFirst.js +++ b/public/react/src/modules/courses/poll/PollDetailTabFirst.js @@ -187,7 +187,7 @@ class PollDetailTabFirst extends Component{ key: 'classes', dataIndex: 'classes', width:160, - className:course_groups && course_groups.length > 0?"edu-txt-center":"edu-txt-center none" + className:poll_types && poll_types.groups_count > 0 ? "edu-txt-center":"edu-txt-center none" }, { title: '提交状态', dataIndex: 'status', diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index 769b4db33..3ebb6eb73 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -49,23 +49,23 @@ class PollListItem extends Component{

    { item.polls_status !=1 && - + {item.poll_answer} 已答 {item.poll_unanswer} 未答 } { item.polls_status ==1 && item.publish_time ==null && item.created_at && - 创建于{moment(item.created_at).format(dataformat)} + 创建于{moment(item.created_at).format(dataformat)} } { item.polls_status ==1 && item.publish_time !=null && - 将发布于{moment(item.publish_time).format(dataformat)} + 将发布于{moment(item.publish_time).format(dataformat)} } { item.polls_status ==2 && item.publish_time !=null && - {formatDuring(t)} + {formatDuring(t)} } { @@ -81,21 +81,14 @@ class PollListItem extends Component{ } :"" } -

    - { - IsAdmin && -
    -
      -
    • - -
        -
      • 编辑
      • -
      • 设置
      • -
      -
    • + { + IsAdmin && +
        + 设置 + 编辑
      -
    - } + } +

    ) diff --git a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js index 30fa1c803..4af26d698 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js +++ b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js @@ -300,7 +300,7 @@ export default class TPMMDEditor extends Component {
  • -
    +
    {noStorage == true ? '' :

    } {noStorage == true ? '' :

    }
    diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 0f608426c..8d77a1b29 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -268,7 +268,7 @@ class Infos extends Component{ 实训 实训课程 项目 - { isAdmin && 题库 } + { data && data.identity !="学生" && this.ToBank(`/`)}>题库 }
    diff --git a/public/react/src/modules/user/usersInfo/InfosCourse.js b/public/react/src/modules/user/usersInfo/InfosCourse.js index 1a6b78542..b864dff63 100644 --- a/public/react/src/modules/user/usersInfo/InfosCourse.js +++ b/public/react/src/modules/user/usersInfo/InfosCourse.js @@ -41,7 +41,7 @@ class InfosCourse extends Component{ category, status, page, - per_page:category && page ==1?17:16 + per_page: this.props.is_current && category && page ==1?17:16 }}).then((result)=>{ if(result){ this.setState({ @@ -111,18 +111,21 @@ class InfosCourse extends Component{
  • this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的
  • this.changeCategory("study")}>{is_current ? "我":"TA"}学习的
  • - + { + is_current && + + }

    共参与{totalCount}个{category?category=="manage"?"发布":"学习":"课堂"} 时间最新

    { - !isStudent && page == 1 && !category && + !isStudent && page == 1 && !category && is_current && } { diff --git a/public/react/src/modules/user/usersInfo/InfosPath.js b/public/react/src/modules/user/usersInfo/InfosPath.js index 156370f05..55422f208 100644 --- a/public/react/src/modules/user/usersInfo/InfosPath.js +++ b/public/react/src/modules/user/usersInfo/InfosPath.js @@ -44,7 +44,7 @@ class InfosPath extends Component{ status, sort_by, page, - per_page:category && page ==1?17:16 + per_page:this.props.is_current && category && page ==1?17:16 }}).then((result)=>{ if(result){ this.setState({ @@ -126,7 +126,7 @@ class InfosPath extends Component{
  • this.changeCategory("study")}>{is_current ? "我":"TA"}学习的
  • { - category && category == "manage" && + category && category == "manage" && is_current &&
  • this.changeStatus()}>全部
  • this.changeStatus("editing")}>编辑中
  • @@ -135,7 +135,7 @@ class InfosPath extends Component{
    } { - category && category == "study" && + category && category == "study" && is_current &&
  • this.changeStatus()}>全部
  • this.changeStatus("unfinished")}>未完成
  • @@ -148,7 +148,7 @@ class InfosPath extends Component{
    { - isStudent ==false && page == 1 && !category && + !isStudent && page == 1 && !category && is_current && } { diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js index eb3ef9b65..fab96f59e 100644 --- a/public/react/src/modules/user/usersInfo/InfosProject.js +++ b/public/react/src/modules/user/usersInfo/InfosProject.js @@ -37,7 +37,7 @@ class InfosProject extends Component{ category, status, page, - per_page:category && page ==1?17:16 + per_page:this.props.is_current && category && page ==1?17:16 }}).then((result)=>{ if(result){ this.setState({ @@ -107,18 +107,21 @@ class InfosProject extends Component{
  • this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的
  • this.changeCategory("study")}>{is_current ? "我":"TA"}学习的
  • - + { + is_current && + + }

    共参与{totalCount}个{category?category=="manage"?"发布":"学习":"项目"} 时间最新

    { - !isStudent && page == 1 && !category && + !isStudent && page == 1 && !category && is_current && } { diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js index 1fcd86b98..90575f9f0 100644 --- a/public/react/src/modules/user/usersInfo/InfosShixun.js +++ b/public/react/src/modules/user/usersInfo/InfosShixun.js @@ -44,7 +44,7 @@ class InfosShixun extends Component{ status, sort_by, page, - per_page:category && page ==1?17:16 + per_page:this.props.is_current && category && page ==1?17:16 }}).then((result)=>{ if(result){ this.setState({ @@ -126,7 +126,7 @@ class InfosShixun extends Component{
  • this.changeCategory("study")}>{is_current ? "我":"TA"}学习的
  • { - category && category == "manage" && + category && category == "manage" && is_current &&
  • this.changeStatus()}>全部
  • this.changeStatus("editing")}>编辑中
  • @@ -136,7 +136,7 @@ class InfosShixun extends Component{
    } { - category && category == "study" && + category && category == "study" && is_current &&
  • this.changeStatus()}>全部
  • this.changeStatus("processing")}>未通关
  • @@ -157,7 +157,7 @@ class InfosShixun extends Component{
    { - isStudent ==false && page == 1 && !category && + !isStudent && page == 1 && !category && is_current && } { From 5437ff4b7a2a5d0b8e8733f2308031a7aa4c178e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 10:13:05 +0800 Subject: [PATCH 022/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/graduation/tasks/GraduationTaskssetting.js | 2 +- .../courses/graduation/tasks/GraduationTaskssettinglist.js | 2 +- .../courses/graduation/tasks/GraduationTaskssettingquestions.js | 2 +- public/react/src/modules/courses/graduation/topics/index.js | 2 +- public/react/src/modules/courses/shixunHomework/Listofworks.js | 2 +- .../src/modules/courses/shixunHomework/ShixunStudentWork.js | 2 +- .../src/modules/courses/shixunHomework/Trainingjobsetting.js | 2 +- .../src/modules/courses/shixunHomework/Workquestionandanswer.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index 762fe1406..d19225743 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -1066,7 +1066,7 @@ class GraduationTaskssettingapp extends Component{ {this.props.isAdmin()?
  • 导出
  • :""} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index ecfd21257..29aa95385 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1322,7 +1322,7 @@ class GraduationTaskssettinglist extends Component{ {this.props.isAdmin()?
  • 导出
  • :""} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index f373af827..5732c03f1 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -308,7 +308,7 @@ class GraduationTasksquestions extends Component{ {this.props.isAdmin()?
  • 导出
  • :""} diff --git a/public/react/src/modules/courses/graduation/topics/index.js b/public/react/src/modules/courses/graduation/topics/index.js index d7d6852f2..efe15eccd 100644 --- a/public/react/src/modules/courses/graduation/topics/index.js +++ b/public/react/src/modules/courses/graduation/topics/index.js @@ -337,7 +337,7 @@ onBoardsNew=()=>{ {/* 参考普通作业 - 题库选用 */} {/* this.useFromBank()}>题库选用 正式版没有,先隐藏*/}

    - < a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xls`} className={"color-blue mr20 font-16"}>导出 + < a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xlsx`} className={"color-blue mr20 font-16"}>导出 this.onBoardsNew()}>新建 ):"" } diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index d346486d4..e38a0c453 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1116,7 +1116,7 @@ class Listofworks extends Component { >设置 {this.props.isAdmin() ? 导出 : ""} {this.props.isAdmin() ? teacherdata && teacherdata.end_immediately === true ? diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 3fbdb2d3b..461c4d74d 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -590,7 +590,7 @@ class ShixunStudentWork extends Component { >设置 {this.props.isAdmin() ? 导出 : ""} {this.props.isAdmin()? data.end_immediately===true? diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 70a92aae6..919a744cf 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1592,7 +1592,7 @@ class Trainingjobsetting extends Component { {/**/} {this.props.isAdmin() ? 导出 : ""} {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? 立即截止 : "": ""} diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 419bca1b5..a06a5be32 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -411,7 +411,7 @@ class Workquestionandanswer extends Component { {/*导出成绩*/} {this.props.isAdmin() ? 导出 : ""} {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? 立即截止:"" : ""} From 370b1ee2343cbd8f5679cd7bffb3aa18b7717891 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 10:35:34 +0800 Subject: [PATCH 023/964] css --- .../src/modules/courses/boards/TopicDetail.js | 37 +++++++++++++------ .../modules/courses/common/courseMessage.css | 2 +- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js index 1ef880c9f..5d4a434a5 100644 --- a/public/react/src/modules/courses/boards/TopicDetail.js +++ b/public/react/src/modules/courses/boards/TopicDetail.js @@ -227,15 +227,30 @@ class TopicDetail extends Component { // filesize = bytesToSize(item.filesize) } attachments.push( -

    - - - {fileName && 30 }> - {fileName} - } - {filesize? ` ${filesize.replace(' ', '')}` : ''} + //

    + // + // + // {fileName && 30 }> + // {fileName} + // } + // {filesize? ` ${filesize.replace(' ', '')}` : ''} + // + //

    + +
    + + -

    + {fileName && 30 }> + + {fileName} + + } + + {item.filesize} + +
    ) }) return attachments; @@ -542,7 +557,7 @@ class TopicDetail extends Component { } {/* || current_user.user_id === author_info.user_id */} { current_user && (isAdmin || isCurrentUserTheAuthor) && -
    +
      @@ -619,10 +634,10 @@ class TopicDetail extends Component {
    -
    +
    -
    +
    {/* ${memo.user_praise ? '' : ''} */} diff --git a/public/react/src/modules/courses/common/courseMessage.css b/public/react/src/modules/courses/common/courseMessage.css index db2381d37..e521b24f5 100644 --- a/public/react/src/modules/courses/common/courseMessage.css +++ b/public/react/src/modules/courses/common/courseMessage.css @@ -25,7 +25,7 @@ } */ #forum_list .return_btn.no_mr { - margin-right: 15px + /* margin-right: 15px */ } /* md编辑器拖拽调整 */ From 83937f4304e3ea505cdeb3561bc0603eb29b4d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 10:38:37 +0800 Subject: [PATCH 024/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTaskssetting.js | 58 +++++++++++-------- .../tasks/GraduationTaskssettinglist.js | 2 +- .../tasks/GraduationTaskssettingquestions.js | 2 +- 3 files changed, 35 insertions(+), 27 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index d19225743..c74f8a1d7 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -140,9 +140,11 @@ class GraduationTaskssettingapp extends Component{ componentDidMount(){ - + let query=this.props.location.search + const type = query.split('?tab='); + let id=parseInt(type[1]) this.getsettings(); - if(this.props.isAdmin()===true){ + if(this.props.isAdmin()===true&&isNaN(id)){ this.editSetting() } } @@ -484,6 +486,31 @@ class GraduationTaskssettingapp extends Component{ let {latepenalty,hascommit,minnums,max_nums,publish_time,end_time,crosscomment,latetime,starttimetype}=this.state; + + if(isNaN(parseInt(this.state.minnum))){ + this.setState({ + numtype:true + }) + this.scrollToAnchor("publishtimestart"); + return + }else{ + this.setState({ + numtype:false + }) + } + if(isNaN(parseInt(this.state.maxnum))){ + this.setState({ + numtype:true + }) + this.scrollToAnchor("publishtimestart"); + return + }else{ + this.setState({ + numtype:false + }) + } + + if(latepenalty===undefined){ this.setState({ latepenaltytype:true, @@ -611,26 +638,7 @@ class GraduationTaskssettingapp extends Component{ return } - if(isNaN(parseInt(this.state.minnum))){ - this.setState({ - numtype:true - }) - return - }else{ - this.setState({ - numtype:false - }) - } - if(isNaN(parseInt(this.state.maxnum))){ - this.setState({ - numtype:true - }) - return - }else{ - this.setState({ - numtype:false - }) - } + @@ -1036,7 +1044,7 @@ class GraduationTaskssettingapp extends Component{ 任务问答 设置 + to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置 {/*导出*/} - - - - -
    { - this.handleDialogClose() - }}> - -
    -
    -
    -
      + } + + + + + +
      { + this.handleDialogClose() + }}> + +
      +
      + +
      +
        试用申请 -
      - -
      -
      - 您尚未获得访问权限,请如实填写下述信息 -
      -
      - 管理员审核批准后,即可继续访问网站 -
      -
      - this.inputOnBlur(e)} - style={{"height": "38px",}} - name="myiphone" - > - { - Phonenumberisnotco && Phonenumberisnotco != "" ? -

      - {Phonenumberisnotco} -

      - :
      - } -
      - - -
      - - - - - { - getverificationcodes === undefined ? - - : getverificationcodes === true ? - - : - - } -
      - { - Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ? -

      - {Phonenumberisnotcocodes} -

      - :
      - } -
      - - { - Phonenumberisnotcoreason && Phonenumberisnotcoreason != "" ? -

      - {Phonenumberisnotcoreason} -

      - :
      - } -
      - - - - -
      -
      - -
      -
    - - } -
    - - - - ) - - - } + "padding": "20px", + "text-align": "center!important", + "color": "#05101A", + "font-weight": "bold", + "font-size": "17px", + "margin-top": "10px", + }}>试用申请 + + +
    +
    + 您尚未获得访问权限,请如实填写下述信息 +
    +
    + 管理员审核批准后,即可继续访问网站 +
    + + { + user_phone_binded === true ? "" : +
    + this.inputOnBlur(e)} + style={{"height": "38px",}} + name="myiphone" + > + { + Phonenumberisnotco && Phonenumberisnotco != "" ? +

    + {Phonenumberisnotco} +

    + :
    + } +
    + } + + + { + user_phone_binded === true ? "" : +
    + + + + + { + getverificationcodes === undefined ? + + : getverificationcodes === true ? + + : + + } +
    + } + + + { + Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ? +

    + {Phonenumberisnotcocodes} +

    + :
    + } +
    + + { + Phonenumberisnotcoreason && Phonenumberisnotcoreason != "" ? +

    + {Phonenumberisnotcoreason} +

    + :
    + } +
    + + + + +
    + + +
    + + +
    + + } +
    + + + ) + + + } } diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 3ef02578a..25d290fac 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -18,7 +18,7 @@ import Addcourses from '../courses/coursesPublic/Addcourses'; import LoginDialog from '../login/LoginDialog'; -// import Trialapplication from '../login/Trialapplication' +import Trialapplication from '../login/Trialapplication' import 'antd/lib/modal/style/index.css'; @@ -170,6 +170,7 @@ class NewHeader extends Component { submitapplications:false, isRender:false, isRenders:false, + showTrial:false, user:undefined, } } @@ -512,12 +513,17 @@ submittojoinclass=(value)=>{ } // trialapplications =()=>{ + // console.log("点击了") // this.setState({ // isRenders: true, + // showTrial:true, // }) // } - + // 关闭 + cancelModulationModels = () => { + this.setState({isRenders: false}) + } render() { const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。 @@ -538,6 +544,7 @@ submittojoinclass=(value)=>{ submitapplicationsvalue, user, isRender, + isRenders, }=this.state; /* 用户名称 用户头像url @@ -574,11 +581,13 @@ submittojoinclass=(value)=>{ /> {/* :""*/} {/*}*/} + {/*{*/} {/* isRenders&&isRenders===true?*/} {/* this.cancelModulationModels()}*/} {/* />*/} {/* :""*/} {/*}*/} From 765af2c66e7c14fb909ca52552c5e1ca5bb257dc Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 12:24:25 +0800 Subject: [PATCH 029/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/login/Trialapplication.js | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index a0903021a..e0a631541 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -53,9 +53,9 @@ class Trialapplication extends Component { //初始化数据 componentDidMount() { - console.log("53"); + // console.log("53"); - console.log(this.props.isRenders); + // console.log(this.props.isRenders); if (this.props.isRenders != undefined) { this.setState({ @@ -78,31 +78,11 @@ class Trialapplication extends Component { } return response; }, (error) => { - // // if (error.response && error.response.data.error === '401 Unauthorized') { - // // this.back_url = window.location.href; - // // this.setState({ - // // isRender: true - // // }) // // // TODO 这里如果样式变了会出现css不加载的情况 - // // const $ = window.$; - // // const isCssLoaded = window.getComputedStyle($('.log_nav li.active')[0], null) - // // .getPropertyValue('border-bottom') - // // == "2px solid rgb(69, 155, 229)" - // // if (!isCssLoaded) { - // // const isPort3007 = window.location.port == 3007; - // // let _url_origin = isPort3007 ? 'http://localhost:3000' : '' - // // - // // $('head').append( $('') - // // .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css`) ); - // // $('head').append( $('') - // // .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css`) ); - // // } - // // } - // // return Promise.reject(error); }); - console.log("89"); + // console.log("89"); try { - console.log(this.state.props.user && this.state.props.user.user_phone_binded); + // console.log(this.state.props.user && this.state.props.user.user_phone_binded); if (this.state.props.user !== undefined) { this.setState({ user_phone_binded: this.state.props.user.user_phone_binded, From 05a22b7e9c97ab7a15e8fd07301b68d5a57970f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 12:31:40 +0800 Subject: [PATCH 030/964] =?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/busyWork/CommonWorkSetting.js | 2 +- .../courses/coursesPublic/Associationmodel.js | 476 +++---- .../src/modules/courses/exercise/Exercise.js | 2 +- .../graduation/tasks/GraduateTaskItem.js | 1 + .../tasks/GraduationTaskssetting.js | 10 +- .../tasks/GraduationTaskssettinglist.js | 15 +- .../tasks/GraduationTaskssettingquestions.js | 2 +- .../modules/courses/graduation/tasks/index.js | 2 +- public/react/src/modules/courses/poll/Poll.js | 1240 ++++++++--------- .../poll/pollPublicBtn/ImmediatelyPublish.js | 562 ++++---- .../courses/shixunHomework/Listofworks.js | 2 +- .../shixunHomework/ShixunStudentWork.js | 2 +- .../shixunHomework/Trainingjobsetting.js | 2 +- .../shixunHomework/Workquestionandanswer.js | 2 +- .../courses/shixunHomework/shixunHomework.js | 4 +- 15 files changed, 1165 insertions(+), 1159 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index 3ef242a44..5ce5a5df3 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -421,7 +421,7 @@ class CommonWorkSetting extends Component{ Topval:"本操作只对“未发布”的对象生效", Botvalleft:"暂不发布", Botval:"则通过后续手动设置,定时发布", - starttime:starttime, + starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), endtime:endtime, Cancelname:"暂不发布", Savesname:"立即发布", diff --git a/public/react/src/modules/courses/coursesPublic/Associationmodel.js b/public/react/src/modules/courses/coursesPublic/Associationmodel.js index 48616ef1f..1f10caa5f 100644 --- a/public/react/src/modules/courses/coursesPublic/Associationmodel.js +++ b/public/react/src/modules/courses/coursesPublic/Associationmodel.js @@ -1,239 +1,239 @@ -import React,{ Component } from "react"; -import { Modal,Checkbox,Upload,Button,Icon,message,Input,Radio} from "antd"; -import axios from 'axios'; -import Modals from '../../modals/Modals'; -const RadioGroup = Radio.Group; -const Search = Input.Search; - -class Associationmodel extends Component{ - constructor(props){ - super(props); - this.state={ - group_ids:[], - fileList:[], - Modalstype:false, - Modalstopval:"", - ModalCancel:"", - ModalSave:"", - loadtype:false, - search:undefined, - page:1, - limit:"", - projects:undefined, - projectvalue:undefined, - projectvaluetype:false, - } - } - - - componentDidMount() { - this.searchValue(); - } - - searchValue=()=>{ - let {search}=this.state; - let url="/users/search_user_projects.json"; - axios.get(url, { - params: { - search: search - } - }).then((result)=>{ - console.log(result) - if(result.status===200){ - this.setState({ - projects:result.data.projects - }) - } - - }).catch((error)=>{ - console.log(error) - }) - } - - inputSearchValue=(e)=>{ - this.setState({ - search:e.target.value - }) - } - - - goback=()=>{ - this.props.funlist() - this.props.Cancel() - console.log(this.props) - this.setState({ - Modalstype:false, - - }) - } - - - setSaves=()=>{ - let {projectvalue}=this.state; - let taskid=this.props.taskid; - let url="/graduation_tasks/"+taskid+"/graduation_works/relate_project.json"; - - axios.post(url, { - project_id: projectvalue - }).then((result)=>{ - - if(result.status===200){ - if(result.data.status===0){ - - this.setState({ - Modalstype:true, - Modalstopval:result.data.message, - ModalSave:this.goback, - loadtype:true - }) - - } - - } - - }).catch((error)=>{ - console.log(error) - }) - } - Saves=()=>{ - let {projectvalue}=this.state; - if(projectvalue===undefined||projectvalue===""){ - this.setState({ - projectvaluetype:true, - }) - }else{ - this.setState({ - projectvaluetype:false, - }) - } - let taskid=this.props.taskid; - console.log(this.props) - let url="/graduation_tasks/"+taskid+"/graduation_works/check_project.json"; - axios.get(url, { - params: { - project_id: projectvalue - } - }).then((result)=>{ - - if(result.status===200){ - - if(result.data.is_relate===false){ - - this.setSaves() - - }else{ - - this.setState({ - Modalstype:true, - Modalstopval:"该项目已被"+result.data.relate_user+"关联", - ModalSave:this.ModalSave, - loadtype:true - }) - - } - - } - - }).catch((error)=>{ - console.log(error) - }) - } - - onChange = (e) => { - - this.setState({ - projectvalue: e.target.value, - }); - - } - - ModalSave=()=>{ - this.setState({ - Modalstype:false - }) - } - - render(){ - let { - Modalstype, - Modalstopval, - ModalCancel, - ModalSave, - loadtype, - search, - projects, - projectvalue, - projectvaluetype - }=this.state; - - - - return( -
    - {/*提示*/} - - -
    -

    - - - -

    - -
    - - - - {projects&&projects.map((item,key)=>{ - return( -
    - -
    {item.project_name}
    -
    - ) - })} - -
    - -
    - - {projectvaluetype===true?请先选择项目:""} - -
    - 取消 - 确认 -
    - -
    -
    -
    - ) - } -} +import React,{ Component } from "react"; +import { Modal,Checkbox,Upload,Button,Icon,message,Input,Radio} from "antd"; +import axios from 'axios'; +import Modals from '../../modals/Modals'; +const RadioGroup = Radio.Group; +const Search = Input.Search; + +class Associationmodel extends Component{ + constructor(props){ + super(props); + this.state={ + group_ids:[], + fileList:[], + Modalstype:false, + Modalstopval:"", + ModalCancel:"", + ModalSave:"", + loadtype:false, + search:undefined, + page:1, + limit:"", + projects:undefined, + projectvalue:undefined, + projectvaluetype:false, + } + } + + + componentDidMount() { + this.searchValue(); + } + + searchValue=()=>{ + let {search}=this.state; + let url="/users/search_user_projects.json"; + axios.get(url, { + params: { + search: search + } + }).then((result)=>{ + console.log(result) + if(result.status===200){ + this.setState({ + projects:result.data.projects + }) + } + + }).catch((error)=>{ + console.log(error) + }) + } + + inputSearchValue=(e)=>{ + this.setState({ + search:e.target.value + }) + } + + + goback=()=>{ + this.props.funlist() + this.props.Cancel() + console.log(this.props) + this.setState({ + Modalstype:false, + + }) + } + + + setSaves=()=>{ + let {projectvalue}=this.state; + let taskid=this.props.taskid; + let url="/graduation_tasks/"+taskid+"/graduation_works/relate_project.json"; + + axios.post(url, { + project_id: projectvalue + }).then((result)=>{ + + if(result.status===200){ + if(result.data.status===0){ + + this.setState({ + Modalstype:true, + Modalstopval:result.data.message, + ModalSave:this.goback, + loadtype:true + }) + this.props.funlist() + } + + } + + }).catch((error)=>{ + console.log(error) + }) + } + Saves=()=>{ + let {projectvalue}=this.state; + if(projectvalue===undefined||projectvalue===""){ + this.setState({ + projectvaluetype:true, + }) + }else{ + this.setState({ + projectvaluetype:false, + }) + } + let taskid=this.props.taskid; + console.log(this.props) + let url="/graduation_tasks/"+taskid+"/graduation_works/check_project.json"; + axios.get(url, { + params: { + project_id: projectvalue + } + }).then((result)=>{ + + if(result.status===200){ + + if(result.data.is_relate===false){ + + this.setSaves() + + }else{ + + this.setState({ + Modalstype:true, + Modalstopval:"该项目已被"+result.data.relate_user+"关联", + ModalSave:this.ModalSave, + loadtype:true + }) + + } + + } + + }).catch((error)=>{ + console.log(error) + }) + } + + onChange = (e) => { + + this.setState({ + projectvalue: e.target.value, + }); + + } + + ModalSave=()=>{ + this.setState({ + Modalstype:false + }) + } + + render(){ + let { + Modalstype, + Modalstopval, + ModalCancel, + ModalSave, + loadtype, + search, + projects, + projectvalue, + projectvaluetype + }=this.state; + + + + return( +
    + {/*提示*/} + + +
    +

    + + + +

    + +
    + + + + {projects&&projects.map((item,key)=>{ + return( +
    + +
    {item.project_name}
    +
    + ) + })} + +
    + +
    + + {projectvaluetype===true?请先选择项目:""} + +
    + 取消 + 确认 +
    + +
    +
    +
    + ) + } +} export default Associationmodel; \ No newline at end of file diff --git a/public/react/src/modules/courses/exercise/Exercise.js b/public/react/src/modules/courses/exercise/Exercise.js index 608bdf166..a6791fb54 100644 --- a/public/react/src/modules/courses/exercise/Exercise.js +++ b/public/react/src/modules/courses/exercise/Exercise.js @@ -213,7 +213,7 @@ class Exercise extends Component{ Topval:"本操作只对“未发布”的对象生效", Botvalleft:"暂不发布", Botval:"则通过后续手动设置,定时发布", - starttime:"发布时间:"+this.props.getNowFormatDates(1), + starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:this.props.getNowFormatDates(1), endtime:"截止时间:"+this.props.getNowFormatDates(2), Cancelname:"暂不发布", diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 942fa96ca..4d6c6777b 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -65,6 +65,7 @@ class GraduateTaskItem extends Component{ cardsModalsavetype:this.cannerassocition, loadtype:true }) + this.props.funlist() } }).catch((error)=>{ diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index c74f8a1d7..dfa6879f5 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -415,7 +415,7 @@ class GraduationTaskssettingapp extends Component{ Topval:"发布设置均可修改", Botvalleft:"点击修改", Botval:"此设置将对所有分班生效", - starttime:moment(moment(handleDateString(this.props.getNowFormatDates(1)))).format("YYYY-MM-DD HH:mm") , + starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") , starttimes:this.props.getNowFormatDates(1), typs:"start", endtime:endtime, @@ -1164,7 +1164,7 @@ class GraduationTaskssettingapp extends Component{
    截止时间: - + 指导老师手动分配 (由指导老师在作品列表中,手动选择每个作品被分配的评阅老师) - 答辩组间老师互评 (由系统按照设置在答辩组之间自动分配: - 答辩组设置 + 答辩组间老师互评 (由系统按照设置在答辩组之间自动分配: + + 答辩组设置 + diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 7ef1f99c5..019b739c9 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -332,7 +332,7 @@ class GraduationTaskssettinglist extends Component{ Topval:"发布设置均可修改", Botvalleft:"点击修改", Botval:"此设置将对所有分班生效", - starttime:moment(new Date()).format('YYYY-MM-DD 00:00'), + starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") , starttimes:this.props.getNowFormatDates(1), typs:"start", endtime:endtime, @@ -544,6 +544,7 @@ class GraduationTaskssettinglist extends Component{ axios.get(url).then((result)=>{ if(result.data.status===0){ + this.searchValue() this.setState({ Modalstype:true, Modalstopval:result.data.message, @@ -730,7 +731,7 @@ class GraduationTaskssettinglist extends Component{ 其它历史评分将全部失效:""}> {tag.name==="评阅"?tag.status===0?"--": - tag.name + {tag.name} : :""}> {tag.name==="评阅"?tag.status===0?"--": - tag.name + {tag.name} : 调整学生最终成绩
    其它历史评分将全部失效:""}> {tag.name==="评阅"?tag.status===0?"--":
    - tag.name + {tag.name} + : this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""} @@ -1145,7 +1147,7 @@ class GraduationTaskssettinglist extends Component{ 调整学生最终成绩
    其它历史评分将全部失效:""}> {tag.name==="评阅"?tag.status===0?"--":
    - tag.name + {tag.name} : :""} {taskslistdata&&taskslistdata? @@ -1551,7 +1554,7 @@ class GraduationTaskssettinglist extends Component{ to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置 - {taskslistdata.work_status===undefined?"":taskslistdata.work_status.map((item,key)=>{ + {taskslistdata.work_status===undefined||taskslistdata.work_status===null||taskslistdata.work_status.length===0?"":taskslistdata.work_status.map((item,key)=>{ return( {item==="提交作品"?提交作品:""} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index 80055f5d3..997085d13 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -81,7 +81,7 @@ class GraduationTasksquestions extends Component{ Topval:"发布设置均可修改", Botvalleft:"点击修改", Botval:"此设置将对所有分班生效", - starttime:moment(new Date()).format('YYYY-MM-DD 00:00'), + starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") , starttimes:this.props.getNowFormatDates(1), typs:"start", endtime:endtime, diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js index fa86da93d..f2fc3845e 100644 --- a/public/react/src/modules/courses/graduation/tasks/index.js +++ b/public/react/src/modules/courses/graduation/tasks/index.js @@ -413,7 +413,7 @@ class GraduationTasks extends Component{ Topval:"本操作只对“未发布”的对象生效", Botvalleft:"暂不发布", Botval:"则通过后续手动设置,定时发布", - starttime:"发布时间:"+starttime, + starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:this.props.getNowFormatDates(1), typs:"start", endtime:"截止时间:"+endtime, diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js index 2d0aedd7a..aa01bcf47 100644 --- a/public/react/src/modules/courses/poll/Poll.js +++ b/public/react/src/modules/courses/poll/Poll.js @@ -1,621 +1,621 @@ -import React,{ Component } from "react"; -import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip ,Spin} from "antd"; -import CourseLayoutcomponent from '../common/CourseLayoutComponent'; -import HomeworkModal from "../coursesPublic/HomeworkModal"; -import ShixunModal from "../coursesPublic/ShixunModal"; -import PathModal from "../coursesPublic/PathModal"; -import AddcoursesNav from "../coursesPublic/AddcoursesNav"; -import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish' -import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd' -import PollListItem from './PollListItem' -import NoneData from '../coursesPublic/NoneData' -import UseBank from '../busyWork/UseBank' - -import _ from 'lodash'; - -import '../css/members.css' -import '../css/busyWork.css' - - -import { WordsBtn } from 'educoder' -import Modals from '../../modals/Modals' - -import axios from 'axios' - -const Search = Input.Search; - - -class Poll extends Component{ - constructor(props){ - super(props); - this.state={ - modalname:undefined, - modaltype:undefined, - visible:false, - Topval:undefined, - Topvalright:undefined, - Botvalleft:undefined, - Botval:undefined, - starttime:undefined, - endtime:undefined, - Cancelname:undefined, - Savesname:undefined, - Cancel:undefined, - Saves:undefined, - StudentList_value:undefined, - addname:undefined, - addnametype:false, - addnametab:undefined, - addcanner:undefined, - addsave:undefined, - course_groups:[], - chooseId:undefined, - // 列表相关 - checkBoxValues:[], - checkAllValue:false, - pollsList:undefined, - course_types:undefined, - page:1, - pageSize:15, - type:0, - polls_counts:undefined, - - //公用提示弹框相关 - modalsType:false, - modalsTopval:"", - modalsBottomval:"", - loadtype:false, - boxType:"delete", - isSpin:false - } - - } - - inputStudent=(e)=>{ - this.setState({ - StudentList_value:e.target.value - }) - } - - - // 题库选用 - selectBlank=(type)=>{ - if(type===2){ - this.setState({ - addname:"添加目录", - addnametype:true, - addnametab:type, - addcanner:this.homeworkhide, - addsave:undefined - }) - }else if(type===4){ - this.setState({ - addname:"移动到目录", - addnametype:true, - addnametab:type, - addcanner:this.homeworkhide, - addsave:undefined - }) - } - - } - // 切换菜单选项 - changeType=(e)=>{ - this.setState({ - type:e.key, - checkBoxValues:[], - checkAllValue:false - }) - let{StudentList_value,page}=this.state; - this.InitList(e.key,StudentList_value,page); - } - // 获取列表数据 - InitList=(type,search,page)=>{ - this.setState({ - isSpin:true - }) - let {pageSize}=this.state - let coursesId=this.props.match.params.coursesId; - let url='/courses/'+coursesId+'/polls.json?limit='+pageSize+'&page='+page - if(type!="0"){ - url+="&type="+type - } - if(search!=""&&search!=undefined){ - url+="&search="+search - } - axios.get(url).then((result)=>{ - if(result){ - this.setState({ - pollsList:result.data.polls, - course_types:result.data.course_types, - polls_counts:result.data.polls_counts, - isSpin:false, - checkBoxValues:[] - }) - } - }).catch((error)=>{ - console.log(error); - }) - } - // 加载列表 - componentDidMount(){ - this.setState({ - isSpin:true - }) - let{type,StudentList_value,page}=this.state - this.InitList(type,StudentList_value,page); - } - //切换分页 - changePage=(pageNumber)=>{ - - this.setState({ - page:pageNumber - }) - let{type,StudentList_value}=this.state - this.InitList(type,StudentList_value,pageNumber); - } - // 搜索 - searchInfo=()=>{ - this.setState({ - page:1 - }) - let{type,StudentList_value}=this.state; - this.InitList(type,StudentList_value,1) - } - // checkbox - onItemClick = (item) => { - const checkBoxValues = this.state.checkBoxValues.slice(0); - const index = checkBoxValues.indexOf(item.id); - if (index != -1) { - _.remove(checkBoxValues, (listItem)=> listItem === item.id) - } else { - checkBoxValues.push(item.id); - } - this.onCheckBoxChange(checkBoxValues) - } - // 全选or反选 - onCheckAll = (e) => { - this.setState({ - checkAllValue: e.target.checked - }) - const values = this.state.pollsList.map(item => { - return item.id - }) - if (e.target.checked) { - const concated = this.state.checkBoxValues.concat(values); - const uniq=_.uniq(concated) - this.setState({ - checkBoxValues: uniq - }) - } else { - this.setState({ - checkBoxValues: _.difference(this.state.checkBoxValues, values) - }) - } - } - - onCheckBoxChange = (checkedValues) => { - this.setState({ - checkBoxValues: checkedValues, - checkAllValue: checkedValues.length == this.state.pollsList.length - }) - } - - //删除或者设为公开 - ActionPoll=(value)=>{ - let CourseId=this.props.match.params.coursesId; - //判断是否有选中数据 - if(this.state.checkBoxValues.length==0){ - this.props.showNotification("请先在列表中选择数据"); - // this.setState({ - // modalsType:true, - // modalsTopval:"请先在列表中选择数据", - // modalsBottomval:'', - // loadtype:true - // }) - }else{ - if(value != "bank"){ - this.setState({ - modalsType:true, - modalsTopval:value=="delete"?"已提交作品将全部被删除,不可恢复":"公开后非课堂成员也可以访问查看", - modalsBottomval:value=="delete"?"您确定要删除吗?":"是否确认公开?", - loadtype:false, - boxType:value - }) - }else{ - //加入题库 - let url=`/courses/${CourseId}/polls/join_poll_banks.json`; - axios.post((url), { - check_ids: this.state.checkBoxValues - }) - .then((result)=>{ - if(result){ - this.props.showNotification(`${result.data.message}`); - this.setState({ - modalsType:false, - modalsTopval:"", - modalsBottomval:"", - loadtype:false, - checkBoxValues:[], - checkAllValue:false - }) - let{type,StudentList_value}=this.state - this.InitList(type,StudentList_value,1); - } - }).catch((error)=>{ - console.log(error); - }) - } - } - } - //取消删除或者设为公开 - modalCancel=()=>{ - this.setState({ - modalsType:false, - modalsTopval:"", - modalsBottomval:"", - loadtype:false - }) - } - //确定删除或者设为公开 - ModalAction=()=>{ - let CourseId=this.props.match.params.coursesId; - if(this.state.checkBoxValues.length==0){ - this.setState({ - modalsType:false, - modalsTopval:"", - loadtype:false, - checkBoxValues:[] - }) - }else{ - if(this.state.boxType=="delete"){ - //删除 - let url=`/courses/${CourseId}/polls/destroys.json`; - axios.post((url), { - check_ids: this.state.checkBoxValues - }) - .then((result)=>{ - if(result){ - this.props.showNotification(`${result.data.message}`); - this.setState({ - modalsType:false, - modalsTopval:"", - modalsBottomval:"", - loadtype:false, - checkBoxValues:[] - }) - let{type,StudentList_value}=this.state - this.InitList(type,StudentList_value,1); - } - }).catch((error)=>{ - console.log(error); - }) - }else if(this.state.boxType=="public"){ - //设为公开 - let url=`/courses/${CourseId}/polls/set_public.json`; - axios.post((url), { - check_ids: this.state.checkBoxValues - }) - .then((result)=>{ - if(result){ - this.props.showNotification(`${result.data.message}`); - this.setState({ - modalsType:false, - modalsTopval:"", - loadtype:false, - checkBoxValues:[] - }) - let{type,StudentList_value}=this.state - this.InitList(type,StudentList_value,1); - } - }).catch((error)=>{ - console.log(error); - }) - } - } - } - - successFun=()=>{ - let{type,StudentList_value,page}=this.state - this.InitList(type,StudentList_value,page) - - } - // 题库选用成功后,立即发布,刷新页面 - useBankSuccess=(checkValue,value)=>{ - // let{type,StudentList_value,page}=this.state - // this.InitList(type,StudentList_value,page); - this.setState({ - checkBoxValues:[] - }) - let coursesId=this.props.match.params.coursesId; - let url=`/courses/${coursesId}/polls/publish_modal.json`; - axios.get(url,{ - params:{ - check_ids:value - } - }).then((response) => { - if(response){ - let list=[]; - if(response.data.course_info){ - for(var i=0;i 0 ? 1 : 2, - visible:true, - Topval:"本操作只对“未发布”的对象生效", - Botvalleft:"暂不发布", - Botval:"则通过后续手动设置,定时发布", - starttime:"发布时间:"+this.props.getNowFormatDates(1), - starttimes:this.props.getNowFormatDates(1), - endtime:"截止时间:"+this.props.getNowFormatDates(2), - Cancelname:"暂不发布", - Savesname:"立即发布", - Cancel:this.homeworkhide, - Saves:this.homeworkstartend, - }) - } - }).catch((error) => { - console.log(error) - }); - } - - getcourse_groupslist=(id)=>{ - this.setState({ - chooseId:id - }) - } - - // 确定立即发布 - homeworkstartend=(value,endtime)=>{ - - let {checkBoxValues}=this.state; - let coursesId=this.props.match.params.coursesId; - - let url=`/courses/${coursesId}/polls/publish.json` - axios.post(url,{ - check_ids:checkBoxValues, - group_ids:value, - end_time:endtime - }).then((result)=>{ - if(result){ - let{type,StudentList_value,page}=this.state - this.InitList(type,StudentList_value,page); - this.props.showNotification(result.data.message); - this.homeworkhide(); - } - }).catch((error)=>{ - console.log(error); - }) - } - - //暂不发布 - homeworkhide=()=>{ - this.setState({ - modalname:undefined, - modaltype:undefined, - visible:false, - Topval:undefined, - Topvalright:undefined, - Botvalleft:undefined, - Botval:undefined, - starttime:undefined, - endtime:undefined, - Cancelname:undefined, - Savesname:undefined, - Cancel:undefined, - Saves:undefined, - StudentList_value:undefined, - addname:undefined, - addnametype:false, - addnametab:undefined, - checkBoxValues:[] - }) - } - - render(){ - let { - modalname, - modaltype, - visible, - Topval, - Topvalright, - Botvalleft, - Botval, - starttime, - endtime, - Cancelname, - Savesname, - Cancel, - Saves, - StudentList_value, - addname, - addnametype, - addnametab, - addcanner, - addsave, - course_groups, - - checkAllValue, - checkBoxValues, - course_types, - pollsList, - page, - pageSize, - polls_counts, - - modalsType, - modalsTopval, - modalsBottomval, - loadtype - }=this.state; - console.log(this.props); - let {child}=this.props; - let {coursesId,Id}=this.props.match.params - const isAdmin = this.props.isAdmin() - const isStudent=this.props.isStudent(); - // console.log(child) - return( - - - {visible===true?this.getcourse_groupslist(id)} - />:""} - - {/*添加目录/选择目录*/} - - - {/* 公用的提示弹框 */} - - - -
    -

    - {polls_counts&&polls_counts.left_banner_name} - { - isAdmin && -

  • -

    - 新建 -
  • - } -

    -
    -

    - 共{polls_counts && polls_counts.polls_total_counts}个问卷 - 已发布:{polls_counts && polls_counts.polls_published_counts}个 - { - isAdmin && 未发布:{polls_counts && polls_counts.polls_unpublish_counts}个 - } -

    -
    - -
    -
    -
    - - 全部 - { course_types && course_types.user_permission == 1 && 未发布 } - 提交中 - 已截止 - -
    -
    - - { - pollsList && pollsList.length > 0 && isAdmin && -
    -
    - 已选 {checkBoxValues.length} 个 -
    -
  • this.ActionPoll("delete")}>删除
  • -
  • - -
  • -
  • - -
  • - { - course_types && course_types.course_is_public == 1 &&
  • this.ActionPoll("public")}>设为公开
  • - } -
  • this.ActionPoll("bank")}>加入题库
  • -
    -
    -
    - } - - { - pollsList && pollsList.length > 0 && - - -
    - { - pollsList && pollsList.map((item,key)=>{ - return( - this.onItemClick(item)}>} - > - ) - }) - } -
    -
    - } -
    - { - pollsList && pollsList.length==0 && - } - { - course_types && polls_counts.polls_all_counts > pageSize ? -
    - -
    - : - "" - } - - -
    - ) - } -} +import React,{ Component } from "react"; +import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip ,Spin} from "antd"; +import CourseLayoutcomponent from '../common/CourseLayoutComponent'; +import HomeworkModal from "../coursesPublic/HomeworkModal"; +import ShixunModal from "../coursesPublic/ShixunModal"; +import PathModal from "../coursesPublic/PathModal"; +import AddcoursesNav from "../coursesPublic/AddcoursesNav"; +import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish' +import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd' +import PollListItem from './PollListItem' +import NoneData from '../coursesPublic/NoneData' +import UseBank from '../busyWork/UseBank' + +import _ from 'lodash'; + +import '../css/members.css' +import '../css/busyWork.css' + + +import { WordsBtn } from 'educoder' +import Modals from '../../modals/Modals' + +import axios from 'axios' + +const Search = Input.Search; + + +class Poll extends Component{ + constructor(props){ + super(props); + this.state={ + modalname:undefined, + modaltype:undefined, + visible:false, + Topval:undefined, + Topvalright:undefined, + Botvalleft:undefined, + Botval:undefined, + starttime:undefined, + endtime:undefined, + Cancelname:undefined, + Savesname:undefined, + Cancel:undefined, + Saves:undefined, + StudentList_value:undefined, + addname:undefined, + addnametype:false, + addnametab:undefined, + addcanner:undefined, + addsave:undefined, + course_groups:[], + chooseId:undefined, + // 列表相关 + checkBoxValues:[], + checkAllValue:false, + pollsList:undefined, + course_types:undefined, + page:1, + pageSize:15, + type:0, + polls_counts:undefined, + + //公用提示弹框相关 + modalsType:false, + modalsTopval:"", + modalsBottomval:"", + loadtype:false, + boxType:"delete", + isSpin:false + } + + } + + inputStudent=(e)=>{ + this.setState({ + StudentList_value:e.target.value + }) + } + + + // 题库选用 + selectBlank=(type)=>{ + if(type===2){ + this.setState({ + addname:"添加目录", + addnametype:true, + addnametab:type, + addcanner:this.homeworkhide, + addsave:undefined + }) + }else if(type===4){ + this.setState({ + addname:"移动到目录", + addnametype:true, + addnametab:type, + addcanner:this.homeworkhide, + addsave:undefined + }) + } + + } + // 切换菜单选项 + changeType=(e)=>{ + this.setState({ + type:e.key, + checkBoxValues:[], + checkAllValue:false + }) + let{StudentList_value,page}=this.state; + this.InitList(e.key,StudentList_value,page); + } + // 获取列表数据 + InitList=(type,search,page)=>{ + this.setState({ + isSpin:true + }) + let {pageSize}=this.state + let coursesId=this.props.match.params.coursesId; + let url='/courses/'+coursesId+'/polls.json?limit='+pageSize+'&page='+page + if(type!="0"){ + url+="&type="+type + } + if(search!=""&&search!=undefined){ + url+="&search="+search + } + axios.get(url).then((result)=>{ + if(result){ + this.setState({ + pollsList:result.data.polls, + course_types:result.data.course_types, + polls_counts:result.data.polls_counts, + isSpin:false, + checkBoxValues:[] + }) + } + }).catch((error)=>{ + console.log(error); + }) + } + // 加载列表 + componentDidMount(){ + this.setState({ + isSpin:true + }) + let{type,StudentList_value,page}=this.state + this.InitList(type,StudentList_value,page); + } + //切换分页 + changePage=(pageNumber)=>{ + + this.setState({ + page:pageNumber + }) + let{type,StudentList_value}=this.state + this.InitList(type,StudentList_value,pageNumber); + } + // 搜索 + searchInfo=()=>{ + this.setState({ + page:1 + }) + let{type,StudentList_value}=this.state; + this.InitList(type,StudentList_value,1) + } + // checkbox + onItemClick = (item) => { + const checkBoxValues = this.state.checkBoxValues.slice(0); + const index = checkBoxValues.indexOf(item.id); + if (index != -1) { + _.remove(checkBoxValues, (listItem)=> listItem === item.id) + } else { + checkBoxValues.push(item.id); + } + this.onCheckBoxChange(checkBoxValues) + } + // 全选or反选 + onCheckAll = (e) => { + this.setState({ + checkAllValue: e.target.checked + }) + const values = this.state.pollsList.map(item => { + return item.id + }) + if (e.target.checked) { + const concated = this.state.checkBoxValues.concat(values); + const uniq=_.uniq(concated) + this.setState({ + checkBoxValues: uniq + }) + } else { + this.setState({ + checkBoxValues: _.difference(this.state.checkBoxValues, values) + }) + } + } + + onCheckBoxChange = (checkedValues) => { + this.setState({ + checkBoxValues: checkedValues, + checkAllValue: checkedValues.length == this.state.pollsList.length + }) + } + + //删除或者设为公开 + ActionPoll=(value)=>{ + let CourseId=this.props.match.params.coursesId; + //判断是否有选中数据 + if(this.state.checkBoxValues.length==0){ + this.props.showNotification("请先在列表中选择数据"); + // this.setState({ + // modalsType:true, + // modalsTopval:"请先在列表中选择数据", + // modalsBottomval:'', + // loadtype:true + // }) + }else{ + if(value != "bank"){ + this.setState({ + modalsType:true, + modalsTopval:value=="delete"?"已提交作品将全部被删除,不可恢复":"公开后非课堂成员也可以访问查看", + modalsBottomval:value=="delete"?"您确定要删除吗?":"是否确认公开?", + loadtype:false, + boxType:value + }) + }else{ + //加入题库 + let url=`/courses/${CourseId}/polls/join_poll_banks.json`; + axios.post((url), { + check_ids: this.state.checkBoxValues + }) + .then((result)=>{ + if(result){ + this.props.showNotification(`${result.data.message}`); + this.setState({ + modalsType:false, + modalsTopval:"", + modalsBottomval:"", + loadtype:false, + checkBoxValues:[], + checkAllValue:false + }) + let{type,StudentList_value}=this.state + this.InitList(type,StudentList_value,1); + } + }).catch((error)=>{ + console.log(error); + }) + } + } + } + //取消删除或者设为公开 + modalCancel=()=>{ + this.setState({ + modalsType:false, + modalsTopval:"", + modalsBottomval:"", + loadtype:false + }) + } + //确定删除或者设为公开 + ModalAction=()=>{ + let CourseId=this.props.match.params.coursesId; + if(this.state.checkBoxValues.length==0){ + this.setState({ + modalsType:false, + modalsTopval:"", + loadtype:false, + checkBoxValues:[] + }) + }else{ + if(this.state.boxType=="delete"){ + //删除 + let url=`/courses/${CourseId}/polls/destroys.json`; + axios.post((url), { + check_ids: this.state.checkBoxValues + }) + .then((result)=>{ + if(result){ + this.props.showNotification(`${result.data.message}`); + this.setState({ + modalsType:false, + modalsTopval:"", + modalsBottomval:"", + loadtype:false, + checkBoxValues:[] + }) + let{type,StudentList_value}=this.state + this.InitList(type,StudentList_value,1); + } + }).catch((error)=>{ + console.log(error); + }) + }else if(this.state.boxType=="public"){ + //设为公开 + let url=`/courses/${CourseId}/polls/set_public.json`; + axios.post((url), { + check_ids: this.state.checkBoxValues + }) + .then((result)=>{ + if(result){ + this.props.showNotification(`${result.data.message}`); + this.setState({ + modalsType:false, + modalsTopval:"", + loadtype:false, + checkBoxValues:[] + }) + let{type,StudentList_value}=this.state + this.InitList(type,StudentList_value,1); + } + }).catch((error)=>{ + console.log(error); + }) + } + } + } + + successFun=()=>{ + let{type,StudentList_value,page}=this.state + this.InitList(type,StudentList_value,page) + + } + // 题库选用成功后,立即发布,刷新页面 + useBankSuccess=(checkValue,value)=>{ + // let{type,StudentList_value,page}=this.state + // this.InitList(type,StudentList_value,page); + this.setState({ + checkBoxValues:[] + }) + let coursesId=this.props.match.params.coursesId; + let url=`/courses/${coursesId}/polls/publish_modal.json`; + axios.get(url,{ + params:{ + check_ids:value + } + }).then((response) => { + if(response){ + let list=[]; + if(response.data.course_info){ + for(var i=0;i 0 ? 1 : 2, + visible:true, + Topval:"本操作只对“未发布”的对象生效", + Botvalleft:"暂不发布", + Botval:"则通过后续手动设置,定时发布", + starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), + starttimes:this.props.getNowFormatDates(1), + endtime:"截止时间:"+this.props.getNowFormatDates(2), + Cancelname:"暂不发布", + Savesname:"立即发布", + Cancel:this.homeworkhide, + Saves:this.homeworkstartend, + }) + } + }).catch((error) => { + console.log(error) + }); + } + + getcourse_groupslist=(id)=>{ + this.setState({ + chooseId:id + }) + } + + // 确定立即发布 + homeworkstartend=(value,endtime)=>{ + + let {checkBoxValues}=this.state; + let coursesId=this.props.match.params.coursesId; + + let url=`/courses/${coursesId}/polls/publish.json` + axios.post(url,{ + check_ids:checkBoxValues, + group_ids:value, + end_time:endtime + }).then((result)=>{ + if(result){ + let{type,StudentList_value,page}=this.state + this.InitList(type,StudentList_value,page); + this.props.showNotification(result.data.message); + this.homeworkhide(); + } + }).catch((error)=>{ + console.log(error); + }) + } + + //暂不发布 + homeworkhide=()=>{ + this.setState({ + modalname:undefined, + modaltype:undefined, + visible:false, + Topval:undefined, + Topvalright:undefined, + Botvalleft:undefined, + Botval:undefined, + starttime:undefined, + endtime:undefined, + Cancelname:undefined, + Savesname:undefined, + Cancel:undefined, + Saves:undefined, + StudentList_value:undefined, + addname:undefined, + addnametype:false, + addnametab:undefined, + checkBoxValues:[] + }) + } + + render(){ + let { + modalname, + modaltype, + visible, + Topval, + Topvalright, + Botvalleft, + Botval, + starttime, + endtime, + Cancelname, + Savesname, + Cancel, + Saves, + StudentList_value, + addname, + addnametype, + addnametab, + addcanner, + addsave, + course_groups, + + checkAllValue, + checkBoxValues, + course_types, + pollsList, + page, + pageSize, + polls_counts, + + modalsType, + modalsTopval, + modalsBottomval, + loadtype + }=this.state; + console.log(this.props); + let {child}=this.props; + let {coursesId,Id}=this.props.match.params + const isAdmin = this.props.isAdmin() + const isStudent=this.props.isStudent(); + // console.log(child) + return( + + + {visible===true?this.getcourse_groupslist(id)} + />:""} + + {/*添加目录/选择目录*/} + + + {/* 公用的提示弹框 */} + + + +
    +

    + {polls_counts&&polls_counts.left_banner_name} + { + isAdmin && +

  • +

    + 新建 +
  • + } +

    +
    +

    + 共{polls_counts && polls_counts.polls_total_counts}个问卷 + 已发布:{polls_counts && polls_counts.polls_published_counts}个 + { + isAdmin && 未发布:{polls_counts && polls_counts.polls_unpublish_counts}个 + } +

    +
    + +
    +
    +
    + + 全部 + { course_types && course_types.user_permission == 1 && 未发布 } + 提交中 + 已截止 + +
    +
    + + { + pollsList && pollsList.length > 0 && isAdmin && +
    +
    + 已选 {checkBoxValues.length} 个 +
    +
  • this.ActionPoll("delete")}>删除
  • +
  • + +
  • +
  • + +
  • + { + course_types && course_types.course_is_public == 1 &&
  • this.ActionPoll("public")}>设为公开
  • + } +
  • this.ActionPoll("bank")}>加入题库
  • +
    +
    +
    + } + + { + pollsList && pollsList.length > 0 && + + +
    + { + pollsList && pollsList.map((item,key)=>{ + return( + this.onItemClick(item)}>} + > + ) + }) + } +
    +
    + } +
    + { + pollsList && pollsList.length==0 && + } + { + course_types && polls_counts.polls_all_counts > pageSize ? +
    + +
    + : + "" + } + + +
    + ) + } +} export default Poll; \ No newline at end of file diff --git a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js index e0424aa93..95e5ba2ad 100644 --- a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js +++ b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js @@ -1,282 +1,282 @@ -import React,{ Component } from "react"; - - -import Modals from '../../../modals/Modals' -import { WordsBtn } from 'educoder' -import HomeworkModal from "../../coursesPublic/HomeworkModal"; - -import axios from 'axios' -import moment from 'moment'; - - - - -class Immediatelypublish extends Component{ - constructor(props){ - super(props) - this.state={ - modalname:undefined, - modaltype:undefined, - visible:false, - Topval:undefined, - Topvalright:undefined, - Botvalleft:undefined, - Botval:undefined, - starttime:undefined, - starttimes:undefined, - endtime:undefined, - Cancelname:undefined, - Savesname:undefined, - Cancel:undefined, - Saves:undefined, - course_groups:undefined, - - modalsType:false, - modalsTopval:"", - loadtype:false, - chooseId:undefined - } - } - //立即发布 - homeworkstart=()=>{ - let {checkBoxValues}=this.props - - - // console.log(this.props.Exercisetype==="exercise") - - - if(checkBoxValues.length==0){ - this.props.showNotification("请先在列表中选择数据"); - // this.setState({ - // modalsType:true, - // modalsTopval:"请先在列表中选择数据", - // loadtype:true - // }) - }else{ - let coursesId=this.props.match.params.coursesId; - if(this.props.Exercisetype==="exercise"){ - let url=`/courses/${coursesId}/exercises/publish_modal.json`; - axios.get(url,{ - params:{ - check_ids:checkBoxValues - } - }).then((response) => { - if(response.status===200){ - let list=[]; - if(response.data.course_info){ - for(var i=0;i 0 ? 1 : 2, - visible:true, - Topval:"本操作只对“未发布”的对象生效", - Botvalleft:"暂不发布", - Botval:"则通过后续手动设置,定时发布", - starttime:"发布时间:"+this.props.getNowFormatDates(1), - starttimes:this.props.getNowFormatDates(1), - endtime:"截止时间:"+this.props.getNowFormatDates(2), - Cancelname:"暂不发布", - Savesname:"立即发布", - Cancel:this.homeworkhide, - Saves:this.homeworkstartend, - }) - } - }).catch((error) => { - console.log(error) - }); - }else{ - let url=`/courses/${coursesId}/polls/publish_modal.json`; - axios.get(url,{ - params:{ - check_ids:checkBoxValues - } - }).then((response) => { - if(response){ - let list=[]; - if(response.data.course_info){ - for(var i=0;i 0 ? 1 : 2, - visible:true, - Topval:"本操作只对“未发布”的对象生效", - Botvalleft:"暂不发布", - Botval:"则通过后续手动设置,定时发布", - starttime:"发布时间:"+this.props.getNowFormatDates(1), - starttimes:this.props.getNowFormatDates(1), - endtime:"截止时间:"+this.props.getNowFormatDates(2), - Cancelname:"暂不发布", - Savesname:"立即发布", - Cancel:this.homeworkhide, - Saves:this.homeworkstartend, - }) - } - }).catch((error) => { - console.log(error) - }); - - } - - } - } - - //取消提示弹框 - modalCancel=()=>{ - this.setState({ - modalsType:false, - modalsTopval:"", - loadtype:false - }) - } - //暂不发布 - homeworkhide=()=>{ - this.setState({ - modalname:undefined, - modaltype:undefined, - visible:false, - Topval:undefined, - Topvalright:undefined, - Botvalleft:undefined, - Botval:undefined, - starttime:undefined, - starttimes:undefined, - endtime:undefined, - Cancelname:undefined, - Savesname:undefined, - Cancel:undefined, - Saves:undefined, - StudentList_value:undefined, - addname:undefined, - addnametype:false, - addnametab:undefined - }) - } - // 确定立即发布 - homeworkstartend=(ids,endtime)=>{ - - let {checkBoxValues}=this.props - let {chooseId}=this.state; - let coursesId=this.props.match.params.coursesId; - - if(this.props.Exercisetype==="exercise"){ - - let url=`/courses/${coursesId}/exercises/publish.json` - axios.post(url,{ - check_ids:checkBoxValues, - group_ids:chooseId, - end_time:endtime - }).then((result)=>{ - if(result){ - this.props.showNotification(result.data.message); - this.homeworkhide(); - - // 调用父级公共头部的接口刷新 - this.props.action() - } - }).catch((error)=>{ - console.log(error); - }) - - }else{ - let url=`/courses/${coursesId}/polls/publish.json` - axios.post(url,{ - check_ids:checkBoxValues, - group_ids:chooseId, - end_time:endtime - }).then((result)=>{ - if(result){ - this.props.showNotification(result.data.message); - this.homeworkhide(); - - // 调用父级公共头部的接口刷新 - this.props.action() - } - }).catch((error)=>{ - console.log(error); - }) - } - - } - - getcourse_groupslist=(id)=>{ - this.setState({ - chooseId:id - }) - } - - render(){ - let{ - modalname, - modaltype, - visible, - Topval, - Topvalright, - Botvalleft, - Botval, - starttime, - starttimes, - endtime, - Cancelname, - Savesname, - Cancel, - Saves, - course_groups, - - modalsType, - modalsTopval, - loadtype, - }=this.state - return( - - this.getcourse_groupslist(id)} - /> - {/* 公用的提示弹框 */} - - - 立即发布 - - ) - } -} +import React,{ Component } from "react"; + + +import Modals from '../../../modals/Modals' +import { WordsBtn } from 'educoder' +import HomeworkModal from "../../coursesPublic/HomeworkModal"; + +import axios from 'axios' +import moment from 'moment'; + + + + +class Immediatelypublish extends Component{ + constructor(props){ + super(props) + this.state={ + modalname:undefined, + modaltype:undefined, + visible:false, + Topval:undefined, + Topvalright:undefined, + Botvalleft:undefined, + Botval:undefined, + starttime:undefined, + starttimes:undefined, + endtime:undefined, + Cancelname:undefined, + Savesname:undefined, + Cancel:undefined, + Saves:undefined, + course_groups:undefined, + + modalsType:false, + modalsTopval:"", + loadtype:false, + chooseId:undefined + } + } + //立即发布 + homeworkstart=()=>{ + let {checkBoxValues}=this.props + + + // console.log(this.props.Exercisetype==="exercise") + + + if(checkBoxValues.length==0){ + this.props.showNotification("请先在列表中选择数据"); + // this.setState({ + // modalsType:true, + // modalsTopval:"请先在列表中选择数据", + // loadtype:true + // }) + }else{ + let coursesId=this.props.match.params.coursesId; + if(this.props.Exercisetype==="exercise"){ + let url=`/courses/${coursesId}/exercises/publish_modal.json`; + axios.get(url,{ + params:{ + check_ids:checkBoxValues + } + }).then((response) => { + if(response.status===200){ + let list=[]; + if(response.data.course_info){ + for(var i=0;i 0 ? 1 : 2, + visible:true, + Topval:"本操作只对“未发布”的对象生效", + Botvalleft:"暂不发布", + Botval:"则通过后续手动设置,定时发布", + starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), + starttimes:this.props.getNowFormatDates(1), + endtime:"截止时间:"+this.props.getNowFormatDates(2), + Cancelname:"暂不发布", + Savesname:"立即发布", + Cancel:this.homeworkhide, + Saves:this.homeworkstartend, + }) + } + }).catch((error) => { + console.log(error) + }); + }else{ + let url=`/courses/${coursesId}/polls/publish_modal.json`; + axios.get(url,{ + params:{ + check_ids:checkBoxValues + } + }).then((response) => { + if(response){ + let list=[]; + if(response.data.course_info){ + for(var i=0;i 0 ? 1 : 2, + visible:true, + Topval:"本操作只对“未发布”的对象生效", + Botvalleft:"暂不发布", + Botval:"则通过后续手动设置,定时发布", + starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), + starttimes:this.props.getNowFormatDates(1), + endtime:"截止时间:"+this.props.getNowFormatDates(2), + Cancelname:"暂不发布", + Savesname:"立即发布", + Cancel:this.homeworkhide, + Saves:this.homeworkstartend, + }) + } + }).catch((error) => { + console.log(error) + }); + + } + + } + } + + //取消提示弹框 + modalCancel=()=>{ + this.setState({ + modalsType:false, + modalsTopval:"", + loadtype:false + }) + } + //暂不发布 + homeworkhide=()=>{ + this.setState({ + modalname:undefined, + modaltype:undefined, + visible:false, + Topval:undefined, + Topvalright:undefined, + Botvalleft:undefined, + Botval:undefined, + starttime:undefined, + starttimes:undefined, + endtime:undefined, + Cancelname:undefined, + Savesname:undefined, + Cancel:undefined, + Saves:undefined, + StudentList_value:undefined, + addname:undefined, + addnametype:false, + addnametab:undefined + }) + } + // 确定立即发布 + homeworkstartend=(ids,endtime)=>{ + + let {checkBoxValues}=this.props + let {chooseId}=this.state; + let coursesId=this.props.match.params.coursesId; + + if(this.props.Exercisetype==="exercise"){ + + let url=`/courses/${coursesId}/exercises/publish.json` + axios.post(url,{ + check_ids:checkBoxValues, + group_ids:chooseId, + end_time:endtime + }).then((result)=>{ + if(result){ + this.props.showNotification(result.data.message); + this.homeworkhide(); + + // 调用父级公共头部的接口刷新 + this.props.action() + } + }).catch((error)=>{ + console.log(error); + }) + + }else{ + let url=`/courses/${coursesId}/polls/publish.json` + axios.post(url,{ + check_ids:checkBoxValues, + group_ids:chooseId, + end_time:endtime + }).then((result)=>{ + if(result){ + this.props.showNotification(result.data.message); + this.homeworkhide(); + + // 调用父级公共头部的接口刷新 + this.props.action() + } + }).catch((error)=>{ + console.log(error); + }) + } + + } + + getcourse_groupslist=(id)=>{ + this.setState({ + chooseId:id + }) + } + + render(){ + let{ + modalname, + modaltype, + visible, + Topval, + Topvalright, + Botvalleft, + Botval, + starttime, + starttimes, + endtime, + Cancelname, + Savesname, + Cancel, + Saves, + course_groups, + + modalsType, + modalsTopval, + loadtype, + }=this.state + return( + + this.getcourse_groupslist(id)} + /> + {/* 公用的提示弹框 */} + + + 立即发布 + + ) + } +} export default Immediatelypublish \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index e38a0c453..ba3c34c51 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -821,7 +821,7 @@ class Listofworks extends Component { Topval: "本操作只对“未发布”的对象生效", Botvalleft: "暂不发布", Botval: "则通过后续手动设置,定时发布", - starttime: "发布时间:" + starttime, + starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), endtime: "截止时间:" + endtime, starttimes:starttime, typs:"start", diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 461c4d74d..a62e815ef 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -304,7 +304,7 @@ class ShixunStudentWork extends Component { Topval:"本操作只对“未发布”的对象生效", Botvalleft:"暂不发布", Botval:"则通过后续手动设置,定时发布", - starttime:"发布时间:"+starttime, + starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), endtime:"截止时间:"+endtime, Cancelname:"暂不发布", Savesname:"立即发布", diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 919a744cf..108ab58f0 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1237,7 +1237,7 @@ class Trainingjobsetting extends Component { Topval: "本操作只对“未发布”的对象生效", Botvalleft: "暂不发布", Botval: "则通过后续手动设置,定时发布", - starttime: "发布时间:" + starttime, + starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:starttime, typs:"start", endtime: "截止时间:" + endtime, diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index a06a5be32..7808355e8 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -148,7 +148,7 @@ class Workquestionandanswer extends Component { Topval: "本操作只对“未发布”的对象生效", Botvalleft: "暂不发布", Botval: "则通过后续手动设置,定时发布", - starttime: "发布时间:" + starttime, + starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), endtime: "截止时间:" + endtime, Cancelname: "暂不发布", Savesname: "立即发布", diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 9589d4515..5970a8907 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -209,7 +209,7 @@ class ShixunHomework extends Component{ Topval:"本操作只对“未发布”的对象生效", Botvalleft:"暂不发布", Botval:"则通过后续手动设置,定时发布", - starttime:"发布时间:"+starttime, + starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:starttime, endtime:"截止时间:"+endtime, Cancelname:"暂不发布", @@ -403,7 +403,7 @@ class ShixunHomework extends Component{ Topval:"本操作只对“未发布”的对象生效", Botvalleft:"暂不发布", Botval:"则通过后续手动设置,定时发布", - starttime:"发布时间:"+ starttime, + starttime:"发布时间:"+ moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:starttime, typs:"start", endtime:"截止时间:"+ endtime, From a8a33ebd7d24e54c70d5e5da01373f9f1a5f8d5e Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 21 Jun 2019 13:50:17 +0800 Subject: [PATCH 031/964] =?UTF-8?q?=E6=AF=95=E8=AE=BE=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/graduation/tasks/GraduationTaskssettinglist.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 7ef1f99c5..9e0573a1c 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1357,7 +1357,7 @@ class GraduationTaskssettinglist extends Component{ 不限 this.funteachercomment(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.length)} style={{ paddingTop: '4px'}}> - {taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ + {taskslistdata.search_assistants && taskslistdata.search_assistants.teacher_comment && taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ return( {item.name} @@ -1499,7 +1499,7 @@ class GraduationTaskssettinglist extends Component{ pagination={false} loading={loadingstate} onChange={this.TablePagination} - + className="edu-txt-center" />}
    @@ -1740,6 +1740,7 @@ class GraduationTaskssettinglist extends Component{ pagination={false} loading={loadingstate} onChange={this.TablePagination} + className="edu-txt-center" />}
    From 0780f2027bff41bb9c5674e5f75d2a7b05befb50 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 21 Jun 2019 13:58:46 +0800 Subject: [PATCH 032/964] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5-?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/user/usersInfo/Infos.js | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index e5f1e99dd..0ce102eb5 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -48,12 +48,6 @@ class Infos extends Component{ } } - // 试用申请 - trialapplications =()=>{ - this.setState({ - isRenders: true, - }) - } //获取个人主页信息 getInfo = (user_login) =>{ @@ -157,6 +151,19 @@ class Infos extends Component{ } } + // 试用申请 + trialapplications =()=>{ + this.setState({ + isRenders: true, + showTrial:true + }) + } + cancelModulationModels=()=>{ + this.setState({ + isRenders: false + }) + } + render(){ let { data , @@ -174,7 +181,7 @@ class Infos extends Component{ return(
    { - isRenders && + isRenders && this.cancelModulationModels()}/> }
    From d276fee00b15bd3b9ae4ee2c4cdc85fd906cfd5c Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 21 Jun 2019 14:07:35 +0800 Subject: [PATCH 033/964] =?UTF-8?q?=E9=A2=98=E5=BA=93=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/usersInfo/Infos.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 0ce102eb5..3300423a1 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -163,6 +163,9 @@ class Infos extends Component{ isRenders: false }) } + ToBank=(url)=>{ + window.location.href=url; + } render(){ let { @@ -290,7 +293,7 @@ class Infos extends Component{ 实训 实训课程 项目 - { data && data.identity !="学生" && this.ToBank(`/`)}>题库 } + { data && data.identity !="学生" && this.ToBank(`/users/${username}?type=a_project`)}>题库 }
    From 005dfc59ca1d5a61e04594491dfbb93c67ae3f22 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 14:41:42 +0800 Subject: [PATCH 034/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../graduation/tasks/GraduationTasksnew.js | 685 +++++++++--------- public/react/src/modules/tpm/NewHeader.js | 2 +- 2 files changed, 359 insertions(+), 328 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js index f98373fe6..79a0e77ea 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js @@ -1,297 +1,327 @@ -import React,{Component} from "React"; -import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd"; +import React, {Component} from "React"; +import {Form, Select, Input, Button, Checkbox, Upload, Icon, message, Modal} from "antd"; import {Link} from 'react-router-dom'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; -import { WordsBtn,getUrl} from 'educoder'; +import {WordsBtn, getUrl} from 'educoder'; import axios from 'axios'; import Modals from '../../../modals/Modals'; import '../../css/Courses.css'; -const { Option} = Select; + +const {Option} = Select; const CheckboxGroup = Checkbox.Group; const confirm = Modal.confirm; -let GraduationTasksnewtype=true; -class GraduationTasksnew extends Component{ - - constructor(props){ - super(props) - this.state={ - coursename:"", - coursesearch:"", - title_num:60, - title_value:"", - fileList: [], - contents: [{val:"",id:1}], - type:true - } - } - - componentDidMount(){ - // const query =this.props.location.search; - // - // const type = query.split('&'); - // let name = type[1].split("name=") - // name = String(name).split(",") - // name = decodeURI(name[1]) - // - // this.setState({ - // coursename:name, - // coursesearch:this.props.location.search - // }) - } - - scrollToAnchors=(anchorName)=>{ - this.setState({ - anchor:anchorName - }) - } - - - handleSubmit=(e) => { - let {fileList}=this.state; - let listid=[] - - for(var list of fileList){ - listid.push(list.response.id) - } - e.preventDefault(); - if( GraduationTasksnewtype===true){ - this.props.form.validateFields((err, values) => { - if (!err) { - if(values.tasktype===undefined){ - this.scrollToAnchors("tasktypes"); - return +let GraduationTasksnewtype = true; + +class GraduationTasksnew extends Component { + + constructor(props) { + super(props) + this.state = { + coursename: "", + coursesearch: "", + title_num: 60, + title_value: "", + fileList: [], + contents: [{val: "", id: 1}], + type: true + } + } + + componentDidMount() { + // const query =this.props.location.search; + // + // const type = query.split('&'); + // let name = type[1].split("name=") + // name = String(name).split(",") + // name = decodeURI(name[1]) + // + // this.setState({ + // coursename:name, + // coursesearch:this.props.location.search + // }) + } + + scrollToAnchors = (anchorName) => { + this.setState({ + anchor: anchorName + }) + } + + + handleSubmit = (e) => { + let {fileList} = this.state; + let listid = [] + + for (var list of fileList) { + listid.push(list.response.id) + } + e.preventDefault(); + if (GraduationTasksnewtype === true) { + this.props.form.validateFields((err, values) => { + if (!err) { + if (values.tasktype === undefined) { + this.scrollToAnchors("tasktypes"); + return + } + + if (values.name === undefined) { + this.scrollToAnchors("nametypes"); + return + } + + if (values.description === undefined) { + this.scrollToAnchors("descriptiontypes"); + return + } else if (values.description.length > 5000) { + this.scrollToAnchors("descriptiontypes"); + return + } + console.log('Received values of form: ', values); + console.log(fileList); + const course_id = this.props.match.params.coursesId; + + let url = "/courses/" + course_id + "/graduation_tasks.json" + axios.post(url, { + task_type: parseInt(values.tasktype), + name: values.name, + description: values.description, + attachment_ids: listid, + } + ).then((response) => { + if (response.status === 200) { + GraduationTasksnewtype = false; + // this.goback(); + this.props.history.push("/courses/" + this.props.match.params.coursesId + "/graduation_tasks/" + this.props.match.params.category_id + "/" + response.data.task_id + "/setting"); + } + }).catch((error) => { + console.log(error) + }) + } + + }); + } + + + } + + + goback = () => { + let courseId = this.props.match.params.coursesId; + let category_id = this.props.match.params.category_id; + + window.location.href = "/courses/" + courseId + "/graduation_tasks/" + category_id; + } + + + // 输入title + changeTitle = (e) => { + + this.setState({ + title_num: 60 - parseInt(e.target.value.length), + title_value: e.target.value + }) + + } + // 附件相关 START + handleChange = (info) => { + let fileList = info.fileList; + + // for(var list of fileList ){ + // console.log(list) + // } + this.setState({fileList}); + } + + onAttachmentRemove = (file) => { + // confirm({ + // title: '确定要删除这个附件吗?', + // okText: '确定', + // cancelText: '取消', + // // content: 'Some descriptions', + // onOk: () => { + // this.deleteAttachment(file) + // }, + // onCancel() { + // console.log('Cancel'); + // }, + // }); + // return false; + + this.setState({ + Modalstype: true, + Modalstopval: '确定要删除这个附件吗?', + ModalSave: () => this.deleteAttachment(file), + ModalCancel: this.cancelAttachment + }) + return false; + } + + cancelAttachment = () => { + this.setState({ + Modalstype: false, + Modalstopval: '确定要删除这个附件吗?', + ModalSave: "", + ModalCancel: "" + }) + } + + deleteAttachment = (file) => { + const url = `/attachments/${file.response ? file.response.id : file.uid}.json` + axios.delete(url, {}) + .then((response) => { + if (response.data) { + const {status} = response.data; + if (status == 0) { + console.log('--- success') + + this.setState((state) => { + const index = state.fileList.indexOf(file); + const newFileList = state.fileList.slice(); + newFileList.splice(index, 1); + return { + fileList: newFileList, + }; + }); + } + } + }) + .catch(function (error) { + console.log(error); + }); + } + + //滚动 + ifHasAnchorJustScorll() { + // let anchor = this.getURLStuff("anchor"); + + let anchor = this.state.anchor; + // console.log("anchor ", anchor); + // 对应id的话, 滚动到相应位置 + if (!!anchor) { + let anchorElement = document.getElementById(anchor); + if (anchorElement) { + window.scrollTo(0, anchorElement.offsetTop - window.innerHeight / 2); + } + } + // 没有的话,滚动到头部 + else { + document.body.scrollTop = document.documentElement.scrollTop = 0; + } + } + + render() { + const {getFieldDecorator} = this.props.form; + let { + coursename, coursesearch, title_num, title_value, pageType, fileList, contents, type, + Modalstype, Modalstopval, ModalCancel, ModalSave + } = this.state; + + let {coursedata} = this.props; + + let courseId = this.props.match.params.coursesId; + let position = this.props.match.params.position; + let category_id = this.props.match.params.category_id; + const uploadProps = { + width: 600, + fileList, + multiple: true, + // https://github.com/ant-design/ant-design/issues/15505 + // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 + // showUploadList: false, + action: `${getUrl()}/api/attachments.json`, + onChange: this.handleChange, + onRemove: this.onAttachmentRemove, + beforeUpload: (file) => { + console.log('beforeUpload', file.name); + const isLt150M = file.size / 1024 / 1024 < 150; + if (!isLt150M) { + message.error('文件大小必须小于150MB!'); + } + return isLt150M; + }, + }; + this.ifHasAnchorJustScorll(); + // console.log(this.props.current_user.course_name) + return ( + + +
    + {/*提示*/} + +
    +
    + +

    + {this.props.current_user && this.props.current_user.course_name} + > + 毕设任务 + > + {"新建"} +

    + +
    +

    新建毕设任务

    + 返回 +
    + + +
    + + {/*内容*/} +
    + + + {getFieldDecorator('tasktype', { + rules: [{required: true, message: "请选择任务类型"}], + })()} + + (选择确认后,无法修改) + + + + {getFieldDecorator('name', { + rules: [{required: true, message: "不能为空"}], + })()} + + +
    + + +
    + - - {getFieldDecorator('description', { - rules: [{ - required: true, message: '请输入帖子内容', - }, { - max: 5000, message: '最大限制为5000个字符', - }], - })( - - )} - - - - - (单个文件150M以内) - -
    - - - -
    - - 取消 -
    -
    -
    - -
    -
    -
    - -
    - - ) - } + + {getFieldDecorator('description', { + rules: [{ + required: true, message: '请输入帖子内容', + }, { + max: 5000, message: '最大限制为5000个字符', + }], + })( + + )} + + + + + (单个文件150M以内) + +
    + + + +
    + + 取消 +
    +
    + + +
    +
    +
    + + + + ) + } } -const GraduationTasksnewApp = Form.create({ name: 'coursesNew' })(GraduationTasksnew); + +const GraduationTasksnewApp = Form.create({name: 'coursesNew'})(GraduationTasksnew); export default GraduationTasksnewApp; \ No newline at end of file diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 25d290fac..e97a728d4 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -570,7 +570,7 @@ submittojoinclass=(value)=>{ // join_course_url: "https://www.educoder.net/courses/join_course_multi_role" // join_project_url: "https://www.educoder.net/applied_project/applied_project_info" // rolearr:["",""], - console.log() + // console.log() return (
    From d486fa127244c92c57cfed3f7c6e608e0aa7093f Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 15:02:39 +0800 Subject: [PATCH 035/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/graduation/tasks/GraduationTasksnew.js | 4 ++-- public/react/src/modules/login/Trialapplication.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js index 79a0e77ea..ccbaa8646 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js @@ -240,7 +240,7 @@ class GraduationTasksnew extends Component { return isLt150M; }, }; - this.ifHasAnchorJustScorll(); + // this.ifHasAnchorJustScorll(); // console.log(this.props.current_user.course_name) return ( @@ -313,7 +313,7 @@ class GraduationTasksnew extends Component { {getFieldDecorator('name', { rules: [{required: true, message: "不能为空"}], })()} diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index e0a631541..bf81c8655 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -212,8 +212,8 @@ class Trialapplication extends Component { this.setState({ isRenders: false }) - this.Cancel(); window.location.href = "/"; + this.Cancel(); } else { this.setState({ isRenders: false From 6995de1523182422013b2c58bca9cb223619458e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 15:08:09 +0800 Subject: [PATCH 036/964] cs --- .../modules/courses/boards/BoardsListItem.js | 42 ++++++++++--------- .../courses/busyWork/CommonWorkItem.js | 10 ++++- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index c25c541e8..2a6aaae2f 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -1,7 +1,7 @@ import React,{ Component } from "react"; import {Tooltip} from 'antd' import moment from 'moment' -import { getUrl } from 'educoder' +import { getUrl, WordsBtn } from 'educoder' class BoardsListItem extends Component{ constructor(props){ super(props); @@ -61,34 +61,37 @@ class BoardsListItem extends Component{
    -

    +

    - {discussMessage.author.name} + {discussMessage.author.name} - { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 } - { discussMessage.total_praises_count != 0 && {discussMessage.total_praises_count} 点赞 } - { discussMessage.visits != 0 && {discussMessage.visits} 浏览 } + { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 } + { discussMessage.total_praises_count != 0 && {discussMessage.total_praises_count} 点赞 } + { discussMessage.visits != 0 && {discussMessage.visits} 浏览 } - {moment(discussMessage.created_on).fromNow()} + {moment(discussMessage.created_on).fromNow()} - {/* 最后回复社区导师10个月前 */}

    +
    + {(isAdmin || discussMessage.author.login == current_user.login) && + { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑 } + + { isAdmin && { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}> + { discussMessage.sticky ? '取消置顶' : '置顶' } } +
    + + - {/* 473 */} - {/*

    - 82 - 1 - 4 -

    */} - { (isAdmin || discussMessage.author.login == current_user.login) && + {/* { (isAdmin || discussMessage.author.login == current_user.login) &&
    - } + } */} + +
    ) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 258a06332..295f55fe1 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -156,7 +156,7 @@ class CommonWorkItem extends Component{ - { + {/* { mainList && isAdmin &&
  • @@ -170,7 +170,7 @@ class CommonWorkItem extends Component{
  • - } + } */}

    {item.commit_count===undefined?"":{item.commit_count} 已交} @@ -184,6 +184,12 @@ class CommonWorkItem extends Component{ {item.status_time} } + + {this.props.isAdmin &&

    + { this.props.toEditPage(this.props.match.params, item.homework_id) }}>编辑 + { this.props.toWorkSettingPage(this.props.match.params, item.homework_id) }}>设置 +
    } + { // isStudent && From b7424701b22fab5af6f4d98fe117562ac5b8f718 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 15:11:07 +0800 Subject: [PATCH 037/964] =?UTF-8?q?route=E7=BC=BA=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/busyWork/IndexGroup.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/public/react/src/modules/courses/busyWork/IndexGroup.js b/public/react/src/modules/courses/busyWork/IndexGroup.js index 5271d7deb..0a4415f2f 100644 --- a/public/react/src/modules/courses/busyWork/IndexGroup.js +++ b/public/react/src/modules/courses/busyWork/IndexGroup.js @@ -36,6 +36,10 @@ const CommonWorkAnswer = Loadable({ loader: () => import('./CommonWorkAnswer'), loading:Loading, }) +const CommonWorkAppraise = Loadable({ + loader: () => import('./CommonWorkAppraise'), + loading:Loading, +}) const CommonWork = Loadable({ @@ -87,6 +91,12 @@ class CoursesWorkIndex extends Component{ (props) => () } > + {/* 评阅 */} + () + } + > Date: Fri, 21 Jun 2019 15:18:11 +0800 Subject: [PATCH 038/964] title --- public/react/src/modules/courses/busyWork/CommonWorkList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 58a448a35..11d26ebf1 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -70,10 +70,10 @@ function buildColumns(that, student_works) { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' - }}> - + }} title={text}> + {/* + */} {text} -
    ), }, { From 9769bec51717f4afc616c8d2e66022e4caed64b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 15:31:48 +0800 Subject: [PATCH 039/964] =?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/graduation/tasks/GraduationTasksedit.js | 9 +++++++-- public/react/src/modules/courses/new/CoursesNew.js | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index 9874b26fa..cd84cd221 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -79,7 +79,12 @@ class GraduationTasksedit extends Component{ let listid=[] let graduation_id=this.state.data.graduation_id; for(var list of fileList){ - listid.push(list.response.id) + if(list.response!=undefined){ + listid.push(list.response.id) + }else{ + listid.push(list.id) + } + } // console.log(listid) @@ -125,7 +130,7 @@ class GraduationTasksedit extends Component{ GraduationTasksedittype=false; // window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions"; // this.goback() - window.location.href="/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"; + this.props.history.push("/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"); } }).catch((error) => { console.log(error) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index d8fb83974..6c0158f21 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -314,7 +314,7 @@ class CoursesNew extends Component { } }).then((result)=>{ this.setState({ - searchlistscholl:result.data.shools_name, + searchlistscholl:result.data.school_names, scholl:value }) this.props.form.setFieldsValue({ From 5811df7dcecba4a2baa7a23d25e4798bff220691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 15:34:44 +0800 Subject: [PATCH 040/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/graduation/tasks/GraduationTasksedit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index cd84cd221..39116c5de 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -82,7 +82,7 @@ class GraduationTasksedit extends Component{ if(list.response!=undefined){ listid.push(list.response.id) }else{ - listid.push(list.id) + listid.push(list.uid) } } From 0d3608e6e095ffab9ec9263cdf5b507f760476c2 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 15:34:56 +0800 Subject: [PATCH 041/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/coursesPublic/HomeworkModal.js | 2 ++ public/react/src/modules/login/Trialapplication.js | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js index f448483d2..66bca0023 100644 --- a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js +++ b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js @@ -27,6 +27,8 @@ class HomeworkModal extends Component{ group_ids:[], endtime:"" } + console.log("30"); + console.log(props); } componentDidMount() { diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index bf81c8655..9626a1475 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -213,7 +213,6 @@ class Trialapplication extends Component { isRenders: false }) window.location.href = "/"; - this.Cancel(); } else { this.setState({ isRenders: false @@ -274,8 +273,6 @@ class Trialapplication extends Component { thiss.setState({ isRenders: false }) - thiss.Cancel(); - } else { thiss.setState({ isRenders: false From 66e65946fbf32ad17d7ce4bba58d9d262dc6cd82 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 16:25:51 +0800 Subject: [PATCH 042/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/HomeworkModal.js | 2 -- .../src/modules/login/Trialapplication.js | 27 +++++++++++-------- public/react/src/modules/tpm/NewHeader.js | 2 ++ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js index 66bca0023..f448483d2 100644 --- a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js +++ b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js @@ -27,8 +27,6 @@ class HomeworkModal extends Component{ group_ids:[], endtime:"" } - console.log("30"); - console.log(props); } componentDidMount() { diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index 9626a1475..b86b68930 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -69,6 +69,22 @@ class Trialapplication extends Component { }) } + // 是否不显示手机栏 + let url = `/users/get_user_info.json` + axios.get(url,{params:{ + school:1 + } + }, + ).then((response) => { + if(response !==undefined){ + this.setState({ + user_phone_binded:response.data.user_phone_binded + }) + } + }).catch((error) => { + console.log(error) + }) + axios.interceptors.response.use((response) => { if (response != undefined) if (response && response.data.status === 407) { @@ -81,18 +97,7 @@ class Trialapplication extends Component { // // // TODO 这里如果样式变了会出现css不加载的情况 }); // console.log("89"); - try { - // console.log(this.state.props.user && this.state.props.user.user_phone_binded); - if (this.state.props.user !== undefined) { - this.setState({ - user_phone_binded: this.state.props.user.user_phone_binded, - }) - } - } catch (e) { - console.log(e); - - } } diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index e97a728d4..956e9afc4 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -173,6 +173,8 @@ class NewHeader extends Component { showTrial:false, user:undefined, } + console.log("176") + console.log(props); } componentDidMount() { From 8791b8edf10412ab398fb267895ba8e6749288a9 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 16:39:24 +0800 Subject: [PATCH 043/964] =?UTF-8?q?=E5=88=86=E7=8F=AD=E8=AE=BE=E7=BD=AE=20?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/busyWork/CommonWorkSetting.js | 64 +++++++++++-------- .../modules/courses/members/teacherList.js | 2 +- 2 files changed, 39 insertions(+), 27 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index 5ce5a5df3..ab00f3c00 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -271,8 +271,8 @@ class CommonWorkSetting extends Component{ absence_penalty = 2 } } else { - evaluation_start = '' - evaluation_end = '' + evaluation_start = null + evaluation_end = null evaluation_num = 0 absence_penalty = 0 } @@ -484,6 +484,7 @@ class CommonWorkSetting extends Component{ publish_time_type, end_time_type } = this.state; let group_settings_param = [] + let max_un_unified_setting_end_time = null if (!unified_setting) { const result = this.refs.pollDetailTabForthRules.notUnifiedSettingCheck(this.state.rules); this.setState({ @@ -494,6 +495,9 @@ class CommonWorkSetting extends Component{ return false; } group_settings_param = result.rules.map(item => { + if (!max_un_unified_setting_end_time || moment(item.end_time) > moment(max_un_unified_setting_end_time)) { + max_un_unified_setting_end_time = item.end_time; + } return { group_id: item.course_group_id, publish_time: item.publish_time, @@ -517,16 +521,22 @@ class CommonWorkSetting extends Component{ return false } - - let temp_publish_time = publish_time - let temp_end_time = end_time - if (!temp_publish_time) { - const publish_time_moment = getNextHalfHourOfMoment(moment()); - temp_publish_time = publish_time_moment.format(dateFormat); - } - if (!temp_end_time) { - temp_end_time = moment(handleDateString(temp_publish_time)).add(1, 'months').format(dateFormat) + let temp_publish_time + let temp_end_time + if (unified_setting) { + let temp_publish_time = publish_time + let temp_end_time = end_time + if (!temp_publish_time) { + const publish_time_moment = getNextHalfHourOfMoment(moment()); + temp_publish_time = publish_time_moment.format(dateFormat); + } + if (!temp_end_time) { + temp_end_time = moment(handleDateString(temp_publish_time)).add(1, 'months').format(dateFormat) + } + } else { + temp_end_time = max_un_unified_setting_end_time } + // 已发布的不检查 const isUnPublish= homework_status.indexOf(STATUS_UN_PUBLISH) != -1 const isAdmin = this.props.isAdmin() @@ -534,20 +544,22 @@ class CommonWorkSetting extends Component{ const publish_time_editable = isUnPublish; const end_time_editable = isAdmin || !end_time || moment(end_time) > current; - if (publish_time_editable && temp_publish_time && moment(temp_publish_time) < moment()) { - this.setState({ - publicTimeTip: '发布时间不能小于当前时间' - }) - scrollTo('.publicTimeTip') - return false - } - // 已截止的不检查 - if (end_time_editable && temp_end_time && moment(temp_end_time) <= moment(temp_publish_time)) { - this.setState({ - publicTimeTip: '截止时间必须晚于发布时间' - }) - scrollTo('.publicTimeTip') - return false + if (unified_setting) { + if (publish_time_editable && temp_publish_time && moment(temp_publish_time) < moment()) { + this.setState({ + publicTimeTip: '发布时间不能小于当前时间' + }) + scrollTo('.publicTimeTip') + return false + } + // 已截止的不检查 + if (end_time_editable && temp_end_time && moment(temp_end_time) <= moment(temp_publish_time)) { + this.setState({ + publicTimeTip: '截止时间必须晚于发布时间' + }) + scrollTo('.publicTimeTip') + return false + } } this.setState({ publicTimeTip: '' @@ -1201,7 +1213,7 @@ class CommonWorkSetting extends Component{
    - {anonymous_comment_time_tip &&
    {anonymous_comment_time_tip}
    } + {
    {anonymous_comment_time_tip}
    } {/* 匿评数量 */}
    diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 9b1a2ad6e..509bf56c1 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -49,7 +49,7 @@ function buildColumns(that) { width: 160, key: 'name', render: (name, record) => { - return {name} + return {name} } }, { title: '角色', From ad989177c7795488d10cc518d111a7a416312cc7 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 16:41:28 +0800 Subject: [PATCH 044/964] isAdmin --- public/react/src/modules/courses/busyWork/CommonWorkItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 295f55fe1..ad755338c 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -185,7 +185,7 @@ class CommonWorkItem extends Component{ } - {this.props.isAdmin &&
    + {isAdmin &&
    { this.props.toEditPage(this.props.match.params, item.homework_id) }}>编辑 { this.props.toWorkSettingPage(this.props.match.params, item.homework_id) }}>设置
    } From 51467cf3ef8ddb5bfc0ec3bb333affd8123bb8ef Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 16:41:42 +0800 Subject: [PATCH 045/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/login/Trialapplication.js | 45 +++++++++---------- public/react/src/modules/tpm/NewHeader.js | 2 +- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index b86b68930..d98228856 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -44,18 +44,14 @@ class Trialapplication extends Component { componentWillReceiveProps(nextProps) { - // this.setState({ - // isRenders:nextProps.isRenders - // }) - // console.log("componentWillReceiveProps"); - // console.log(nextProps); + } //初始化数据 componentDidMount() { - // console.log("53"); + console.log("53"); - // console.log(this.props.isRenders); + console.log(this.props.isRenders); if (this.props.isRenders != undefined) { this.setState({ @@ -69,22 +65,6 @@ class Trialapplication extends Component { }) } - // 是否不显示手机栏 - let url = `/users/get_user_info.json` - axios.get(url,{params:{ - school:1 - } - }, - ).then((response) => { - if(response !==undefined){ - this.setState({ - user_phone_binded:response.data.user_phone_binded - }) - } - }).catch((error) => { - console.log(error) - }) - axios.interceptors.response.use((response) => { if (response != undefined) if (response && response.data.status === 407) { @@ -94,10 +74,22 @@ class Trialapplication extends Component { } return response; }, (error) => { - // // // TODO 这里如果样式变了会出现css不加载的情况 + //TODO 这里如果样式变了会出现css不加载的情况 + }); - // console.log("89"); + console.log("89"); + try { + if (this.state.props.user !== undefined) { + console.log(this.state.props.user && this.state.props.user.user_phone_binded); + this.setState({ + user_phone_binded: this.state.props.user.user_phone_binded, + }) + } + + } catch (e) { + console.log(e); + } } @@ -217,6 +209,7 @@ class Trialapplication extends Component { this.setState({ isRenders: false }) + this.Cancel(); window.location.href = "/"; } else { this.setState({ @@ -278,6 +271,8 @@ class Trialapplication extends Component { thiss.setState({ isRenders: false }) + thiss.Cancel(); + } else { thiss.setState({ isRenders: false diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 956e9afc4..3d3e83d36 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -583,7 +583,7 @@ submittojoinclass=(value)=>{ /> {/* :""*/} {/*}*/} - + {/*{*/} {/* isRenders&&isRenders===true?*/} From fbd6f3fe5df798dab16566487f1cc46eca0e2794 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 16:58:08 +0800 Subject: [PATCH 046/964] invalid --- .../modules/courses/busyWork/CommonWorkSetting.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index ab00f3c00..1574d692d 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -1018,7 +1018,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择发布时间" id={"startime"} width={"210px"} - value={publish_time===null||publish_time===""?"":moment(publish_time, dateFormat)} + value={!publish_time?"":moment(publish_time, dateFormat)} onChange={this.onChangeTimepublish} // disabled={this.props.isSuperAdmin()?false:publish_time_type===true?true:false} disabled={moment(this.state.init_publish_time) < moment() || noAuth} @@ -1048,7 +1048,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择截止时间" id={"endTime"} width={"210px"} - value={end_time===null||end_time===""?"":moment(end_time, dateFormat)} + value={!end_time?"":moment(end_time, dateFormat)} onChange={this.onChangeTimeend} disabled={this.props.isSuperAdmin()?false:end_time_type===true?true:false} disabled={moment(this.state.init_end_time) < moment() || noAuth} @@ -1117,7 +1117,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择结束时间" id={"enTime"} width={"210px"} - value={late_time===null||late_time===""? undefined :moment(late_time, dateFormat)} + value={!late_time ? undefined :moment(late_time, dateFormat)} onChange={this.onChangeTimelatetime} disabledTime={disabledDateTime} disabled={!allow_late || noAuth || moment(init_late_time) < moment()} @@ -1165,7 +1165,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择匿名开启时间" id={"startime"} width={"210px"} - value={evaluation_start===null||evaluation_start===""?"":moment(evaluation_start, dateFormat)} + value={!evaluation_start ?"":moment(evaluation_start, dateFormat)} onChange={this.onChangeEvaluationStart} disabled={ (anonymous_comment && !noAuth ? false : true) || moment(init_evaluation_start) < moment() } // disabledDate={ (evaluation_start) => @@ -1194,7 +1194,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择匿名结束时间" id={"endtime"} width={"210px"} - value={evaluation_end===null||evaluation_end===""?"":moment(evaluation_end, dateFormat)} + value={!evaluation_end ?"":moment(evaluation_end, dateFormat)} onChange={this.onChangeEvaluationEnd} disabledTime={disabledDateTime} disabled={(anonymous_comment && !noAuth ? false : true) || moment(init_evaluation_end) < moment()} @@ -1289,7 +1289,7 @@ class CommonWorkSetting extends Component{ placeholder="请选择申诉结束时间" id={"endtime"} width={"210px"} - value={appeal_time===null||appeal_time===""?"":moment(appeal_time, dateFormat)} + value={!appeal_time?"":moment(appeal_time, dateFormat)} onChange={this.appeal_time_change} disabled={ (anonymous_appeal && !noAuth ? false : true) || moment(init_appeal_time) < moment()} /> From fc7087ebca053667a742e1629b9ecbd997ba1c96 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 17:19:05 +0800 Subject: [PATCH 047/964] =?UTF-8?q?=E5=88=86=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/CommonWorkList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 11d26ebf1..7142d3d00 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -259,9 +259,9 @@ function buildColumns(that, student_works) {
    最终调整成绩:{record.work_score}分
    :
    { record.final_score &&
    作业评分:{record.final_score}分
    } - { !!that.state.late_penalty &&
    迟交扣分:{that.state.late_penalty}分
    } - { !!that.state.absence_penalty &&
    缺评扣分:{that.state.absence_penalty}分
    } - { !!that.state.appeal_penalty &&
    违规匿评扣分:{that.state.appeal_penalty}分
    } + { record.late_penalty >= 0 &&
    迟交扣分:{record.late_penalty}分
    } + { record.absence_penalty >= 0 &&
    缺评扣分:{record.absence_penalty}分
    } + { record.appeal_penalty >= 0 &&
    违规匿评扣分:{record.appeal_penalty}分
    }
    最终成绩:{record.work_score}分
    }
    ) From 28bbaf7d1ced57541de9299e2fff1d05191f587c Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 21 Jun 2019 17:20:01 +0800 Subject: [PATCH 048/964] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E8=80=81=E7=89=88=E7=9A=84=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/ExerciseReviewAndAnswer.js | 2 +- .../modules/courses/graduation/tasks/index.js | 3 +- public/react/src/modules/tpm/NewHeader.js | 12 +- .../react/src/modules/user/usersInfo/Infos.js | 133 +++++++++++++----- .../src/modules/user/usersInfo/InfosBank.js | 2 +- .../src/modules/user/usersInfo/InfosCourse.js | 2 +- .../src/modules/user/usersInfo/InfosPath.js | 2 +- .../modules/user/usersInfo/InfosProject.js | 2 +- .../src/modules/user/usersInfo/InfosShixun.js | 2 +- .../src/modules/user/usersInfo/usersInfo.css | 14 +- 10 files changed, 121 insertions(+), 53 deletions(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index d46b48038..58569554f 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -656,7 +656,7 @@ class ExerciseReviewAndAnswer extends Component{ return(

    - {parseInt(key+1)}、{type[item.question_type]}({item.question_score}分) + {exercise_questions.q_position}、{type[item.question_type]}({item.question_score}分) { // 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮 diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js index d28b8f697..acb8508b2 100644 --- a/public/react/src/modules/courses/graduation/tasks/index.js +++ b/public/react/src/modules/courses/graduation/tasks/index.js @@ -13,6 +13,7 @@ import Modals from '../../../modals/Modals'; import UseBank from "../../busyWork/UseBank"; import '../../css/members.css'; import '../style.css'; +import moment from 'moment' class GraduationTasks extends Component{ @@ -413,7 +414,7 @@ class GraduationTasks extends Component{ Topval:"本操作只对“未发布”的对象生效", Botvalleft:"暂不发布", Botval:"则通过后续手动设置,定时发布", - starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), + starttime:"发布时间:"+moment(new Date()).format("YYYY-MM-DD HH:mm"), starttimes:this.props.getNowFormatDates(1), typs:"start", endtime:"截止时间:"+endtime, diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 25d290fac..e2ef85907 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -570,7 +570,7 @@ submittojoinclass=(value)=>{ // join_course_url: "https://www.educoder.net/courses/join_course_multi_role" // join_project_url: "https://www.educoder.net/applied_project/applied_project_info" // rolearr:["",""], - console.log() + console.log(this.props) return (

    @@ -707,18 +707,18 @@ submittojoinclass=(value)=>{ 注册 :
    - +
    ) } diff --git a/public/react/src/modules/user/usersInfo/InfosBank.js b/public/react/src/modules/user/usersInfo/InfosBank.js index 39015681d..cf670063d 100644 --- a/public/react/src/modules/user/usersInfo/InfosBank.js +++ b/public/react/src/modules/user/usersInfo/InfosBank.js @@ -39,7 +39,7 @@ class InfosBank extends Component{ } getCourses=(category,type,page,sort_by,CoursesId)=>{ - let url=`/users/${this.props.login}/question_banks.json`; + let url=`/users/${this.props.match.params.username}/question_banks.json`; axios.get((url),{params:{ category, type, diff --git a/public/react/src/modules/user/usersInfo/InfosCourse.js b/public/react/src/modules/user/usersInfo/InfosCourse.js index b864dff63..109a4d7b9 100644 --- a/public/react/src/modules/user/usersInfo/InfosCourse.js +++ b/public/react/src/modules/user/usersInfo/InfosCourse.js @@ -36,7 +36,7 @@ class InfosCourse extends Component{ } getCourses=(category,status,page)=>{ - let url=`/users/${this.props.login}/courses.json`; + let url=`/users/${this.props.match.params.username}/courses.json`; axios.get((url),{params:{ category, status, diff --git a/public/react/src/modules/user/usersInfo/InfosPath.js b/public/react/src/modules/user/usersInfo/InfosPath.js index 55422f208..ce3bcfba8 100644 --- a/public/react/src/modules/user/usersInfo/InfosPath.js +++ b/public/react/src/modules/user/usersInfo/InfosPath.js @@ -38,7 +38,7 @@ class InfosPath extends Component{ } getCourses=(category,status,sort_by,page,per_page)=>{ - let url=`/users/${this.props.login}/subjects.json`; + let url=`/users/${this.props.match.params.username}/subjects.json`; axios.get((url),{params:{ category, status, diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js index fab96f59e..99232b8ef 100644 --- a/public/react/src/modules/user/usersInfo/InfosProject.js +++ b/public/react/src/modules/user/usersInfo/InfosProject.js @@ -32,7 +32,7 @@ class InfosProject extends Component{ } getCourses=(category,status,page)=>{ - let url=`/users/${this.props.login}/projects.json`; + let url=`/users/${this.props.match.params.username}/projects.json`; axios.get((url),{params:{ category, status, diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js index 90575f9f0..d6835098a 100644 --- a/public/react/src/modules/user/usersInfo/InfosShixun.js +++ b/public/react/src/modules/user/usersInfo/InfosShixun.js @@ -38,7 +38,7 @@ class InfosShixun extends Component{ } getCourses=(category,status,sort_by,page)=>{ - let url=`/users/${this.props.login}/shixuns.json`; + let url=`/users/${this.props.match.params.username}/shixuns.json`; axios.get((url),{params:{ category, status, diff --git a/public/react/src/modules/user/usersInfo/usersInfo.css b/public/react/src/modules/user/usersInfo/usersInfo.css index 31bdd5a2c..0be9837bf 100644 --- a/public/react/src/modules/user/usersInfo/usersInfo.css +++ b/public/react/src/modules/user/usersInfo/usersInfo.css @@ -8,8 +8,20 @@ float: left; margin: 0px 40px; padding:0px; - height: 47px;line-height: 40px; + height: 45px; + line-height: 40px; font-size: 16px; + position: relative; +} +.navInfo li.active::after{ + position: absolute; + left: 0px; + height: 2px; + width: 100%; + content: ''; + bottom: 0px; + background: #05101A!important; + color: #666!important; } .navInfo li,.navInfo li.ant-menu-item-active{ border-bottom: none!important; From bda8393f2797eba03b0036653b94d037ccdb63ea Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 17:21:11 +0800 Subject: [PATCH 049/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/login/Trialapplication.js | 6 +++--- public/react/src/modules/tpm/NewHeader.js | 2 -- public/react/src/modules/tpm/TPMIndexHOC.js | 21 ++++++++++++------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index d98228856..d2b942ce7 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -79,10 +79,10 @@ class Trialapplication extends Component { }); console.log("89"); try { - if (this.state.props.user !== undefined) { - console.log(this.state.props.user && this.state.props.user.user_phone_binded); + if (this.state.props.user_phone_binded !== undefined) { + console.log(this.state.props.user_phone_binded); this.setState({ - user_phone_binded: this.state.props.user.user_phone_binded, + user_phone_binded: this.state.props.user_phone_binded, }) } diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 3d3e83d36..955ae593f 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -171,7 +171,6 @@ class NewHeader extends Component { isRender:false, isRenders:false, showTrial:false, - user:undefined, } console.log("176") console.log(props); @@ -583,7 +582,6 @@ submittojoinclass=(value)=>{ /> {/* :""*/} {/*}*/} - {/*{*/} {/* isRenders&&isRenders===true?*/} diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index c808a4808..7723af4fc 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -9,6 +9,7 @@ import { getUrl } from 'educoder' import axios from 'axios'; import './TPMIndex.css' +import Trialapplication from "../login/Trialapplication"; // import "antd/dist/antd.css"; // import '../../css/educoder/edu-common.css' // import '../../css/educoder/edu-all.css' @@ -246,10 +247,10 @@ export function TPMIndexHOC(WrappedComponent) { } */ if (response.data) { - this.initCommonState(response.data) - this.setState({ - tpmLoading: false, + this.setState({ + user_phone_binded:response.data.user_phone_binded, + tpmLoading: false, coursedata: { course_identity: response.data.course_identity >= 0 ? response.data.course_identity : undefined, course_public: response.data.course_public, @@ -266,7 +267,7 @@ export function TPMIndexHOC(WrappedComponent) { }) } render() { - let{Headertop,Footerdown}=this.state; + let{Headertop,Footerdown,user_phone_binded}=this.state; const common = { isSuperAdmin:this.isSuperAdmin, isAdminOrCreator:this.isAdminOrCreator, @@ -278,11 +279,17 @@ export function TPMIndexHOC(WrappedComponent) { isNotMember: this.isNotMember, isUserid:this.state.coursedata&&this.state.coursedata.userid } - - return (
    - + + } + + From f4193a6edfb9b197073f491a39edff692d381da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 17:22:41 +0800 Subject: [PATCH 050/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTaskssettinglist.js | 141 ++++++++++++------ .../modules/courses/graduation/tasks/index.js | 2 +- 2 files changed, 96 insertions(+), 47 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 517629479..c4275c902 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -92,7 +92,7 @@ class GraduationTaskssettinglist extends Component{ if (worklists.length != 0) { for (var i = 0; i < worklists.length; i++) { - +debugger datalist.push({ name: worklists[i].name, number: (parseInt(page)-1)*parseInt(limit)+(i+1), @@ -101,7 +101,7 @@ class GraduationTaskssettinglist extends Component{ grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null, submitstate: worklists[i].status === 0 ? "未提交" : worklists[i].status === 1 ? "按时提交" : worklists[i].status === 2 ? "延时提交" : "", turnovertime:worklists[i].update_time, - associationitems: worklists[i].project_info === undefined ?"--": worklists[i].project_info.name , + associationitems: {name:worklists[i].project_info === undefined ?"--": worklists[i].project_info.name,id:worklists[i].project_info.id}, teacherrating: worklists[i].teacher_comment_score, crossrating: worklists[i].cross_comment_score, finalscore: worklists[i].final_score.work_score === null ? "--" : worklists[i].final_score.work_score, @@ -611,7 +611,7 @@ class GraduationTaskssettinglist extends Component{ course_groups } =this.state; - let columns; + let columns; // console.log("taskslistdata.course_group_count"); // console.log(taskslistdata); @@ -662,9 +662,11 @@ class GraduationTaskssettinglist extends Component{ key: 'associationitems', render: (text, record) => ( - - {record.associationitems} - + ), },{ title: '提交状态', @@ -694,9 +696,11 @@ class GraduationTaskssettinglist extends Component{ dataIndex: 'teacherrating', render: (text, record) => ( - - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.teacherrating==="--"||record.crossrating==="未批阅"?0:record.teacherrating)} - + + + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)} + + ), }, { title: '交叉评分', @@ -705,8 +709,10 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.crossrating==="--"||record.crossrating==="未批阅"?0:record.crossrating)} - + + 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)} + + ), }, { title: '最终成绩', @@ -715,8 +721,10 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{parseInt(record.finalscore==="--"?0:record.finalscore)} - + + 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)} + + ), }, { title: '操作', @@ -794,9 +802,11 @@ class GraduationTaskssettinglist extends Component{ key: 'associationitems', render: (text, record) => ( - - {record.associationitems} - + ), },{ title: '提交状态', @@ -827,8 +837,10 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.teacherrating==="--"||record.crossrating==="未批阅"?0:record.teacherrating)} - + + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)} + + ), }, { title: '交叉评分', @@ -837,8 +849,10 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.crossrating==="--"||record.crossrating==="未批阅"?0:record.crossrating)} - + + 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)} + + ), }, { title: '最终成绩', @@ -847,8 +861,10 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{parseInt(record.finalscore==="--"?0:record.finalscore)} - + + 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)} + + ), }, { title: '操作', @@ -944,9 +960,12 @@ class GraduationTaskssettinglist extends Component{ key: 'associationitems', render: (text, record) => ( - - {record.associationitems} - + ), },{ title: '提交状态', @@ -977,8 +996,10 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.teacherrating==="--"||record.crossrating==="未批阅"?0:record.teacherrating)} - + + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)} + + ), }, { title: '交叉评分', @@ -987,8 +1008,10 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.crossrating==="--"||record.crossrating==="未批阅"?0:record.crossrating)} - + + 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)} + + ), }, { title: '最终成绩', @@ -997,8 +1020,10 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{parseInt(record.finalscore==="--"?0:record.finalscore)} - + + 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)} + + ), }, { title: '操作', @@ -1078,9 +1103,13 @@ class GraduationTaskssettinglist extends Component{ key: 'associationitems', render: (text, record) => ( - - {record.associationitems} - + ), },{ title: '提交状态', @@ -1111,8 +1140,10 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.teacherrating==="--"||record.crossrating==="未批阅"?0:record.teacherrating)} - + + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)} + + ), }, { title: '交叉评分', @@ -1121,8 +1152,10 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{parseInt(record.crossrating==="--"||record.crossrating==="未批阅"?0:record.crossrating)} - + + 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)} + + ), }, { title: '最终成绩', @@ -1131,8 +1164,10 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{parseInt(record.finalscore==="--"?0:record.finalscore)} - + + 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)} + + ), }, { title: '操作', @@ -1190,6 +1225,19 @@ class GraduationTaskssettinglist extends Component{
    + + {/*提示*/}
    - {taskslistdata&&taskslistdata.work_count}个检索结果({taskslistdata&&taskslistdata.work_count} 学生) -
    -

    - {order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序

    + {this.props.isAdmin()?{taskslistdata&&taskslistdata.work_count}个检索结果({taskslistdata&&taskslistdata.work_count} 学生) :""} + {this.props.isAdmin()?
    +

    + + {order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序 +

    • this.funorder("updated_at")}>更新时间
    • @@ -1466,7 +1515,7 @@ class GraduationTaskssettinglist extends Component{
    • this.funorder("student_id" )}>学生学号
    -
    +
    :""}
    diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js index d28b8f697..99784c453 100644 --- a/public/react/src/modules/courses/graduation/tasks/index.js +++ b/public/react/src/modules/courses/graduation/tasks/index.js @@ -6,7 +6,7 @@ import Titlesearchsection from '../../common/titleSearch/TitleSearchSection'; import HomeworkModal from "../../coursesPublic/HomeworkModal"; import { WordsBtn } from 'educoder'; import axios from 'axios'; -import _ from 'lodash' +import moment from 'moment'; import GraduateTaskItem from './GraduateTaskItem'; import TaskPublishModal from "./TaskPublishModal"; import Modals from '../../../modals/Modals'; From c8722effdfc61d2187afcc5f32cfb706fa772e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 17:24:23 +0800 Subject: [PATCH 051/964] =?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/modules/courses/graduation/tasks/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js index a50452f88..ff2ddc0f9 100644 --- a/public/react/src/modules/courses/graduation/tasks/index.js +++ b/public/react/src/modules/courses/graduation/tasks/index.js @@ -13,7 +13,6 @@ import Modals from '../../../modals/Modals'; import UseBank from "../../busyWork/UseBank"; import '../../css/members.css'; import '../style.css'; -import moment from 'moment' class GraduationTasks extends Component{ From 18d328a1fc38d5bbc265f14ca36e5ee2def0ecfa Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 17:34:11 +0800 Subject: [PATCH 052/964] this.closeConnectionProject() --- .../react/src/modules/courses/busyWork/ConnectProject.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/ConnectProject.js b/public/react/src/modules/courses/busyWork/ConnectProject.js index 06ded5f67..9d201009d 100644 --- a/public/react/src/modules/courses/busyWork/ConnectProject.js +++ b/public/react/src/modules/courses/busyWork/ConnectProject.js @@ -23,7 +23,12 @@ class ConnectProject extends Component{ } onSubmit = () => { - const { radioValue } = this.state; + const { radioValue, projects } = this.state; + if (projects.length === 0) { + this.closeConnectionProject() + return; + } + if (!radioValue) { this.props.showNotification('请先在下面的列表中选择项目') return; @@ -115,7 +120,7 @@ class ConnectProject extends Component{ >
    { - projects && projects.length && + projects && !!projects.length &&
    {this.setState({keyword: e.target.value})}} From 6f93f9b15a256f7767be4c310c991f28f52613f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 18:38:34 +0800 Subject: [PATCH 053/964] =?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/graduation/tasks/GraduationTaskssettinglist.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index c4275c902..03be6cb8b 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -92,7 +92,6 @@ class GraduationTaskssettinglist extends Component{ if (worklists.length != 0) { for (var i = 0; i < worklists.length; i++) { -debugger datalist.push({ name: worklists[i].name, number: (parseInt(page)-1)*parseInt(limit)+(i+1), From b6576392ab2bde46976718fed4deedcf082347e8 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 18:40:25 +0800 Subject: [PATCH 054/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/graduation/tasks/GraduationTaskssettinglist.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index c4275c902..9438b151b 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1176,6 +1176,9 @@ debugger render: operation => (
    {this.props.isAdmin()?operation.map((tag,key) => { + console.log("1179"); + console.log(key); + console.log(tag); return(
    From 76a72bc27a94cc704fe62732d1328f87e7a9b097 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 18:53:22 +0800 Subject: [PATCH 055/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Trainingjobsetting.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 108ab58f0..4c11ab072 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -637,11 +637,14 @@ class Trainingjobsetting extends Component { //允许补交 onChanges = (e) => { + // debugger if(e.target.value ==="允许补交"){ if(this.state.end_time !== null && this.state.end_time!== undefined){ + // console.log(this.state.end_time); + var times = this.state.end_time.format('YYYY-MM-DD HH:mm'); this.setState({ - late_time:moment(handleDateString(this.state.end_time)).add(1, 'months'), - late_times:moment(handleDateString(this.state.end_time)).add(1, 'months').format('YYYY-MM-DD HH:mm'), + late_time:moment(handleDateString(times)).add(1, 'months'), + late_times:moment(handleDateString(times)).add(1, 'months').format('YYYY-MM-DD HH:mm'), }) } @@ -1080,7 +1083,7 @@ class Trainingjobsetting extends Component { } // console.log(value); - // console.log(dateString); + console.log(dateString); // console.log(handleDateString(dateString)); this.onChangedata('publish_time', value, dateString); if(this.state.allowreplenishment === "允许补交") { From dda42d72937974f63f5e36f804b632109247f08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 19:05:27 +0800 Subject: [PATCH 056/964] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/graduation/tasks/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js index a50452f88..ff2ddc0f9 100644 --- a/public/react/src/modules/courses/graduation/tasks/index.js +++ b/public/react/src/modules/courses/graduation/tasks/index.js @@ -13,7 +13,6 @@ import Modals from '../../../modals/Modals'; import UseBank from "../../busyWork/UseBank"; import '../../css/members.css'; import '../style.css'; -import moment from 'moment' class GraduationTasks extends Component{ From 52c853f9979d9e5cff22513f33dcdb1b7a2ee046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 19:06:28 +0800 Subject: [PATCH 057/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../graduation/tasks/GraduationTaskssettinglist.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 03be6cb8b..e77a163d9 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -845,7 +845,7 @@ class GraduationTaskssettinglist extends Component{ title: '交叉评分', key: 'crossrating', dataIndex: 'crossrating', - + className:'none', render: (text, record) => ( @@ -1218,8 +1218,15 @@ class GraduationTaskssettinglist extends Component{ let position=this.props.match.params.position; let category_id=this.props.match.params.category_id; let task_Id = this.props.match.params.task_Id; - // console.log("task_statustask_statustask_status"); - // console.log(task_status); + + if(taskslistdata&&taskslistdata.cross_comment===false){ + columns.map((item,key)=>{ + if(item.title==="交叉评分"){ + columns.splice(key,1) + } + }) + } + return( From 683161b1ec1e233b16e0f4a5d7476d305466c9a4 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, 22 Jun 2019 00:34:24 +0800 Subject: [PATCH 058/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/exercise/Exercise.js | 9 +- .../tasks/GraduationTaskssetting.js | 12 +- .../tasks/GraduationTaskssettinglist.js | 54 +- .../tasks/GraduationTaskssettingquestions.js | 12 +- .../modules/courses/graduation/tasks/index.js | 15 +- .../poll/pollPublicBtn/ImmediatelyEnd.js | 536 +++++++++--------- .../poll/pollPublicBtn/ImmediatelyPublish.js | 12 +- .../courses/shixunHomework/Listofworks.js | 12 +- .../shixunHomework/ShixunStudentWork.js | 12 +- .../shixunHomework/Trainingjobsetting.js | 12 +- .../shixunHomework/Workquestionandanswer.js | 12 +- .../courses/shixunHomework/shixunHomework.js | 20 +- 12 files changed, 374 insertions(+), 344 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Exercise.js b/public/react/src/modules/courses/exercise/Exercise.js index a6791fb54..6f9470260 100644 --- a/public/react/src/modules/courses/exercise/Exercise.js +++ b/public/react/src/modules/courses/exercise/Exercise.js @@ -8,6 +8,7 @@ import '../css/members.css' import { WordsBtn } from 'educoder' import '../css/busyWork.css' import _ from 'lodash'; +import moment from 'moment' import UseBank from "../busyWork/UseBank"; import ImmediatelyPublish from "../poll/pollPublicBtn/ImmediatelyPublish"; import ImmediatelyEnd from "../poll/pollPublicBtn/ImmediatelyEnd"; @@ -187,7 +188,7 @@ class Exercise extends Component{ } // 题库选用成功后刷新页面 useBankSuccess=(checkValue,value)=>{ - +debugger let{type,StudentList_value,page,limit}=this.state; let coursesId=this.props.match.params.coursesId; let url=`/courses/${coursesId}/exercises/publish_modal.json`; @@ -210,9 +211,9 @@ class Exercise extends Component{ modalname:"立即发布", modaltype:response.data.un_publish > 0 ? 1 : 2, visible:true, - Topval:"本操作只对“未发布”的对象生效", - Botvalleft:"暂不发布", - Botval:"则通过后续手动设置,定时发布", + Topval:"学生将立即收到试卷", + // Botvalleft:"暂不发布", + Botval:`本操作只对"未发布"的分班有效`, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:this.props.getNowFormatDates(1), endtime:"截止时间:"+this.props.getNowFormatDates(2), diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index dfa6879f5..d1ce04697 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -412,9 +412,9 @@ class GraduationTaskssettingapp extends Component{ this.setState({ modalname:"立即发布", visibles:true, - Topval:"发布设置均可修改", - Botvalleft:"点击修改", - Botval:"此设置将对所有分班生效", + Topval:"学生将立即收到毕设任务", + // Botvalleft:"点击修改", + Botval:`本操作只对"未发布"的分班有效`, starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") , starttimes:this.props.getNowFormatDates(1), typs:"start", @@ -787,9 +787,9 @@ class GraduationTaskssettingapp extends Component{ this.setState({ modalname:"立即截止", visibles:true, - Topval:"本操作只对“提交中”的对象生效", - Botvalleft:"暂不截止", - Botval:"则将根据已设置的截止时间,定时截止", + Topval:"学生将不能再提交作品", + // Botvalleft:"暂不截止", + Botval:`本操作只对"提交中"的分班有效`, Cancelname:"暂不截止", Savesname:"立即截止", Cancel:this.cancelmodel, diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index fd3eac922..c842d02f2 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -100,7 +100,7 @@ class GraduationTaskssettinglist extends Component{ grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null, submitstate: worklists[i].status === 0 ? "未提交" : worklists[i].status === 1 ? "按时提交" : worklists[i].status === 2 ? "延时提交" : "", turnovertime:worklists[i].update_time, - associationitems: {name:worklists[i].project_info === undefined ?"--": worklists[i].project_info.name,id:worklists[i].project_info.id}, + associationitems:result.data.have_grouping==false?"": {name:worklists[i].project_info === undefined ?"--": worklists[i].project_info.name,id:worklists[i].project_info.id}, teacherrating: worklists[i].teacher_comment_score, crossrating: worklists[i].cross_comment_score, finalscore: worklists[i].final_score.work_score === null ? "--" : worklists[i].final_score.work_score, @@ -309,9 +309,9 @@ class GraduationTaskssettinglist extends Component{ this.setState({ modalname:"立即截止", visible:true, - Topval:"本操作只对“提交中”的对象生效", - Botvalleft:"暂不截止", - Botval:"则将根据已设置的截止时间,定时截止", + Topval:"学生将不能再提交作品", + // Botvalleft:"暂不截止", + Botval:`本操作只对"提交中"的分班有效`, Cancelname:"暂不截止", Savesname:"立即截止", Cancel:this.cancelmodel, @@ -328,9 +328,9 @@ class GraduationTaskssettinglist extends Component{ this.setState({ modalname:"立即发布", visible:true, - Topval:"发布设置均可修改", - Botvalleft:"点击修改", - Botval:"此设置将对所有分班生效", + Topval:"学生将立即收到毕设任务", + // Botvalleft:"点击修改", + Botval:`本操作只对"未发布"的分班有效`, starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") , starttimes:this.props.getNowFormatDates(1), typs:"start", @@ -742,8 +742,9 @@ class GraduationTaskssettinglist extends Component{ : this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""} - >{tag.status===0?"":tag.name} + onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}> + {tag.status===0?"":tag.name} + } @@ -874,10 +875,8 @@ class GraduationTaskssettinglist extends Component{ {this.props.isAdmin()?operation.map((tag,key) => { return(
    - 调整学生最终成绩
    其它历史评分将全部失效:""}> - {tag.name==="评阅"?tag.status===0?"--": {tag.name} @@ -1045,7 +1044,6 @@ class GraduationTaskssettinglist extends Component{ >{tag.status===0?"":tag.name} }
    - }
    ) }):""} @@ -1192,7 +1190,6 @@ class GraduationTaskssettinglist extends Component{ >{tag.status===0?"":tag.name} } - }
    ) }):""} @@ -1223,13 +1220,44 @@ class GraduationTaskssettinglist extends Component{ let task_Id = this.props.match.params.task_Id; if(taskslistdata&&taskslistdata.cross_comment===false){ + columns.map((item,key)=>{ if(item.title==="交叉评分"){ columns.splice(key,1) } }) + if(taskslistdata&&taskslistdata.have_grouping===false){ + columns.map((item,key)=>{ + if(item.title==="关联项目"){ + columns.splice(key,1) + } + }) + + columns.map((item,key)=>{ + if(item.title==="分组"){ + columns.splice(key,1) + } + }) + } + + }else{ + if(taskslistdata&&taskslistdata.have_grouping===false){ + columns.map((item,key)=>{ + if(item.title==="关联项目"){ + columns.splice(key,1) + } + }) + + columns.map((item,key)=>{ + if(item.title==="分组"){ + columns.splice(key,1) + } + }) + } } + + console.log(columns) return( diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index 997085d13..99c0d21c1 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -59,9 +59,9 @@ class GraduationTasksquestions extends Component{ this.setState({ modalname:"立即截止", visible:true, - Topval:"本操作只对“提交中”的对象生效", - Botvalleft:"暂不截止", - Botval:"则将根据已设置的截止时间,定时截止", + Topval:"学生将不能再提交作品", + // Botvalleft:"暂不截止", + Botval:`本操作只对"提交中"的分班有效`, Cancelname:"暂不截止", Savesname:"立即截止", Cancel:this.cancelmodel, @@ -78,9 +78,9 @@ class GraduationTasksquestions extends Component{ this.setState({ modalname:"立即发布", visible:true, - Topval:"发布设置均可修改", - Botvalleft:"点击修改", - Botval:"此设置将对所有分班生效", + Topval:"学生将立即收到毕设任务", + // Botvalleft:"点击修改", + Botval:`本操作只对"未发布"的分班有效`, starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") , starttimes:this.props.getNowFormatDates(1), typs:"start", diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js index ff2ddc0f9..29610eb93 100644 --- a/public/react/src/modules/courses/graduation/tasks/index.js +++ b/public/react/src/modules/courses/graduation/tasks/index.js @@ -33,6 +33,7 @@ class GraduationTasks extends Component{ isSpin:false, typs:undefined, starttimes:undefined, + } } fetchAll = (search,page,order,count) => { @@ -410,9 +411,9 @@ class GraduationTasks extends Component{ this.setState({ modalname:"立即发布", visible:true, - Topval:"本操作只对“未发布”的对象生效", - Botvalleft:"暂不发布", - Botval:"则通过后续手动设置,定时发布", + Topval:"学生将立即收到毕设任务", + // Botvalleft:"暂不发布", + Botval:`本操作只对"未发布"的分班有效`, starttime:"发布时间:"+moment(new Date()).format("YYYY-MM-DD HH:mm"), starttimes:this.props.getNowFormatDates(1), typs:"start", @@ -476,9 +477,9 @@ class GraduationTasks extends Component{ this.setState({ modalname:"立即截止", visible:true, - Topval:"本操作只对“提交中”的对象生效", - Botvalleft:"暂不截止", - Botval:"则将根据已设置的截止时间,定时截止", + Topval:"学生将不能再提交作品", + // Botvalleft:"暂不截止", + Botval:`本操作只对"提交中"的分班有效`, Cancelname:"暂不截止", Savesname:"立即截止", Cancel:this.publishcanner, @@ -603,7 +604,6 @@ class GraduationTasks extends Component{ {/*立即发布*/} this.getcourse_groupslist(id)} + /> diff --git a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js index bfc316ae8..e74fe8204 100644 --- a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js +++ b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js @@ -1,269 +1,269 @@ -import React,{ Component } from "react"; - - -import Modals from '../../../modals/Modals' -import { WordsBtn } from 'educoder' -import HomeworkModal from "../../coursesPublic/HomeworkModal"; - -import axios from 'axios' -import moment from 'moment'; - - -class ImmediatelyEnd extends Component{ - constructor(props){ - super(props) - this.state={ - modalname:undefined, - modaltype:undefined, - visible:false, - Topval:undefined, - Topvalright:undefined, - Botvalleft:undefined, - Botval:undefined, - starttime:undefined, - endtime:undefined, - Cancelname:undefined, - Savesname:undefined, - Cancel:undefined, - Saves:undefined, - course_groups:undefined, - - modalsType:false, - modalsTopval:"", - loadtype:false, - chooseId:undefined - } - } - //立即截止 - homeworkstart=()=>{ - let {checkBoxValues}=this.props - if(checkBoxValues.length==0){ - this.props.showNotification("请先在列表中选择数据"); - // this.setState({ - // modalsType:true, - // modalsTopval:"请先在列表中选择数据", - // loadtype:true - // }) - }else{ - let coursesId=this.props.match.params.coursesId; - if(this.props.Exercisetype==="exercise"){ - let url=`/courses/${coursesId}/exercises/end_modal.json`; - axios.get(url,{ - params:{ - check_ids:checkBoxValues - } - }).then((response) => { - if(response.status===200){ - let list=[]; - if(response.data.course_info){ - for(var i=0;i 0 ? 1 : 2, - visible:true, - Topval:"本操作只对“提交中”的对象生效", - Botvalleft:"暂不截止", - Botval:"则将根据已设置的截止时间,定时截止", - // starttime:"发布时间:"+getNowFormatDate(1), - // endtime:"截止时间:"+getNowFormatDate(2), - Cancelname:"暂不截止", - Savesname:"立即截止", - Cancel:this.homeworkhide, - Saves:this.homeworkstartend, - }) - } - }).catch((error) => { - console.log(error) - }); - - - - }else{ - let url=`/courses/${coursesId}/polls/end_poll_modal.json`; - - axios.get(url,{ - params:{ - check_ids:checkBoxValues - } - }).then((response) => { - if(response.status===200){ - let list=[]; - if(response.data.course_info){ - for(var i=0;i 0 ? 1 : 2, - visible:true, - Topval:"本操作只对“提交中”的对象生效", - Botvalleft:"暂不截止", - Botval:"则将根据已设置的截止时间,定时截止", - // starttime:"发布时间:"+getNowFormatDate(1), - // endtime:"截止时间:"+getNowFormatDate(2), - Cancelname:"暂不截止", - Savesname:"立即截止", - Cancel:this.homeworkhide, - Saves:this.homeworkstartend, - }) - } - }).catch((error) => { - console.log(error) - }); - } - - - } - } - - //取消提示弹框 - modalCancel=()=>{ - this.setState({ - modalsType:false, - modalsTopval:"", - loadtype:false - }) - } - //暂不发布 - homeworkhide=()=>{ - this.setState({ - modalname:undefined, - modaltype:undefined, - visible:false, - Topval:undefined, - Topvalright:undefined, - Botvalleft:undefined, - Botval:undefined, - starttime:undefined, - endtime:undefined, - Cancelname:undefined, - Savesname:undefined, - Cancel:undefined, - Saves:undefined, - StudentList_value:undefined, - addname:undefined, - addnametype:false, - addnametab:undefined - }) - } - // 确定立即截止 - homeworkstartend=()=>{ - - let {checkBoxValues}=this.props - let {chooseId}=this.state; - let coursesId=this.props.match.params.coursesId; - if(this.props.Exercisetype==="exercise"){ - let url=`/courses/${coursesId}/exercises/end_exercise.json` - axios.post(url,{ - check_ids:checkBoxValues, - group_ids:chooseId - }).then((result)=>{ - if(result){ - this.props.showNotification(result.data.message); - this.homeworkhide(); - // 调用父级公共头部的接口刷新 - this.props.action() - } - }).catch((error)=>{ - console.log(error); - }) - }else{ - let url=`/courses/${coursesId}/polls/end_poll.json` - axios.post(url,{ - check_ids:checkBoxValues, - group_ids:chooseId - }).then((result)=>{ - if(result){ - this.props.showNotification(result.data.message); - this.homeworkhide(); - // 调用父级公共头部的接口刷新 - this.props.action() - } - }).catch((error)=>{ - console.log(error); - }) - } - - - - } - - getcourse_groupslist=(id)=>{ - this.setState({ - chooseId:id - }) - } - - render(){ - let{ - modalname, - modaltype, - visible, - Topval, - Topvalright, - Botvalleft, - Botval, - starttime, - endtime, - Cancelname, - Savesname, - Cancel, - Saves, - course_groups, - - modalsType, - modalsTopval, - loadtype, - }=this.state - return( - - this.getcourse_groupslist(id)} - /> - {/* 公用的提示弹框 */} - - - 立即截止 - - ) - } -} +import React,{ Component } from "react"; + + +import Modals from '../../../modals/Modals' +import { WordsBtn } from 'educoder' +import HomeworkModal from "../../coursesPublic/HomeworkModal"; + +import axios from 'axios' +import moment from 'moment'; + + +class ImmediatelyEnd extends Component{ + constructor(props){ + super(props) + this.state={ + modalname:undefined, + modaltype:undefined, + visible:false, + Topval:undefined, + Topvalright:undefined, + Botvalleft:undefined, + Botval:undefined, + starttime:undefined, + endtime:undefined, + Cancelname:undefined, + Savesname:undefined, + Cancel:undefined, + Saves:undefined, + course_groups:undefined, + + modalsType:false, + modalsTopval:"", + loadtype:false, + chooseId:undefined + } + } + //立即截止 + homeworkstart=()=>{ + let {checkBoxValues}=this.props + if(checkBoxValues.length==0){ + this.props.showNotification("请先在列表中选择数据"); + // this.setState({ + // modalsType:true, + // modalsTopval:"请先在列表中选择数据", + // loadtype:true + // }) + }else{ + let coursesId=this.props.match.params.coursesId; + if(this.props.Exercisetype==="exercise"){ + let url=`/courses/${coursesId}/exercises/end_modal.json`; + axios.get(url,{ + params:{ + check_ids:checkBoxValues + } + }).then((response) => { + if(response.status===200){ + let list=[]; + if(response.data.course_info){ + for(var i=0;i 0 ? 1 : 2, + visible:true, + Topval:"学生将不能再提交试卷", + // Botvalleft:"暂不截止", + Botval:`本操作只对"提交中"的分班有效`, + // starttime:"发布时间:"+getNowFormatDate(1), + // endtime:"截止时间:"+getNowFormatDate(2), + Cancelname:"暂不截止", + Savesname:"立即截止", + Cancel:this.homeworkhide, + Saves:this.homeworkstartend, + }) + } + }).catch((error) => { + console.log(error) + }); + + + + }else{ + let url=`/courses/${coursesId}/polls/end_poll_modal.json`; + + axios.get(url,{ + params:{ + check_ids:checkBoxValues + } + }).then((response) => { + if(response.status===200){ + let list=[]; + if(response.data.course_info){ + for(var i=0;i 0 ? 1 : 2, + visible:true, + Topval:"学生将不能再提交问卷", + // Botvalleft:"暂不截止", + Botval:`本操作只对"提交中"的分班有效`, + // starttime:"发布时间:"+getNowFormatDate(1), + // endtime:"截止时间:"+getNowFormatDate(2), + Cancelname:"暂不截止", + Savesname:"立即截止", + Cancel:this.homeworkhide, + Saves:this.homeworkstartend, + }) + } + }).catch((error) => { + console.log(error) + }); + } + + + } + } + + //取消提示弹框 + modalCancel=()=>{ + this.setState({ + modalsType:false, + modalsTopval:"", + loadtype:false + }) + } + //暂不发布 + homeworkhide=()=>{ + this.setState({ + modalname:undefined, + modaltype:undefined, + visible:false, + Topval:undefined, + Topvalright:undefined, + Botvalleft:undefined, + Botval:undefined, + starttime:undefined, + endtime:undefined, + Cancelname:undefined, + Savesname:undefined, + Cancel:undefined, + Saves:undefined, + StudentList_value:undefined, + addname:undefined, + addnametype:false, + addnametab:undefined + }) + } + // 确定立即截止 + homeworkstartend=()=>{ + + let {checkBoxValues}=this.props + let {chooseId}=this.state; + let coursesId=this.props.match.params.coursesId; + if(this.props.Exercisetype==="exercise"){ + let url=`/courses/${coursesId}/exercises/end_exercise.json` + axios.post(url,{ + check_ids:checkBoxValues, + group_ids:chooseId + }).then((result)=>{ + if(result){ + this.props.showNotification(result.data.message); + this.homeworkhide(); + // 调用父级公共头部的接口刷新 + this.props.action() + } + }).catch((error)=>{ + console.log(error); + }) + }else{ + let url=`/courses/${coursesId}/polls/end_poll.json` + axios.post(url,{ + check_ids:checkBoxValues, + group_ids:chooseId + }).then((result)=>{ + if(result){ + this.props.showNotification(result.data.message); + this.homeworkhide(); + // 调用父级公共头部的接口刷新 + this.props.action() + } + }).catch((error)=>{ + console.log(error); + }) + } + + + + } + + getcourse_groupslist=(id)=>{ + this.setState({ + chooseId:id + }) + } + + render(){ + let{ + modalname, + modaltype, + visible, + Topval, + Topvalright, + Botvalleft, + Botval, + starttime, + endtime, + Cancelname, + Savesname, + Cancel, + Saves, + course_groups, + + modalsType, + modalsTopval, + loadtype, + }=this.state + return( + + this.getcourse_groupslist(id)} + /> + {/* 公用的提示弹框 */} + + + 立即截止 + + ) + } +} export default ImmediatelyEnd \ No newline at end of file diff --git a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js index 95e5ba2ad..8c472b417 100644 --- a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js +++ b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js @@ -78,9 +78,9 @@ class Immediatelypublish extends Component{ modalname:"立即发布", modaltype:response.data.un_publish > 0 ? 1 : 2, visible:true, - Topval:"本操作只对“未发布”的对象生效", - Botvalleft:"暂不发布", - Botval:"则通过后续手动设置,定时发布", + Topval:"学生将立即收到试卷", + // Botvalleft:"暂不发布", + Botval:`本操作只对"未发布"的分班有效`, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:this.props.getNowFormatDates(1), endtime:"截止时间:"+this.props.getNowFormatDates(2), @@ -117,9 +117,9 @@ class Immediatelypublish extends Component{ modalname:"立即发布", modaltype:response.data.un_publish > 0 ? 1 : 2, visible:true, - Topval:"本操作只对“未发布”的对象生效", - Botvalleft:"暂不发布", - Botval:"则通过后续手动设置,定时发布", + Topval:"学生将立即收到问卷", + // Botvalleft:"暂不发布", + Botval:`本操作只对"未发布"的分班有效`, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:this.props.getNowFormatDates(1), endtime:"截止时间:"+this.props.getNowFormatDates(2), diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index ba3c34c51..3e3bf95c4 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -818,9 +818,9 @@ class Listofworks extends Component { modalname: "立即发布", modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, svisible: true, - Topval: "本操作只对“未发布”的对象生效", - Botvalleft: "暂不发布", - Botval: "则通过后续手动设置,定时发布", + Topval:"学生将立即收到作业", + // Botvalleft:"暂不发布", + Botval:`本操作只对"未发布"的分班有效`, starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), endtime: "截止时间:" + endtime, starttimes:starttime, @@ -850,9 +850,9 @@ class Listofworks extends Component { modalname: "立即截止", modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, svisible: true, - Topval: "本操作只对“提交中”的对象生效", - Botvalleft: "暂不截止", - Botval: "则将根据已设置的截止时间,定时截止", + Topval:"学生将不能再提交作业", + // Botvalleft:"暂不截止", + Botval:`本操作只对"提交中"的分班有效`, Cancelname: "暂不截止", Savesname: "立即截止", Cancel: this.homeworkhide, diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index a62e815ef..ea368d478 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -301,9 +301,9 @@ class ShixunStudentWork extends Component { modalname:"立即发布", modaltype:response.data.course_groups===null||response.data.course_groups.length===0?2:1, visible:true, - Topval:"本操作只对“未发布”的对象生效", - Botvalleft:"暂不发布", - Botval:"则通过后续手动设置,定时发布", + Topval:"学生将立即收到作业", + // Botvalleft:"暂不发布", + Botval:`本操作只对"未发布"的分班有效`, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), endtime:"截止时间:"+endtime, Cancelname:"暂不发布", @@ -335,9 +335,9 @@ class ShixunStudentWork extends Component { modalname:"立即截止", modaltype:response.data.course_groups===null||response.data.course_groups.length===0?2:1, visible:true, - Topval:"本操作只对“提交中”的对象生效", - Botvalleft:"暂不截止", - Botval:"则将根据已设置的截止时间,定时截止", + Topval:"学生将不能再提交作业", + // Botvalleft:"暂不截止", + Botval:`本操作只对"提交中"的分班有效`, Cancelname:"暂不截止", Savesname:"立即截止", Cancel:this.homeworkhide, diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 4c11ab072..a15fd16b1 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1237,9 +1237,9 @@ class Trainingjobsetting extends Component { modalname: "立即发布", modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, visible: true, - Topval: "本操作只对“未发布”的对象生效", - Botvalleft: "暂不发布", - Botval: "则通过后续手动设置,定时发布", + Topval:"学生将立即收到作业", + // Botvalleft:"暂不发布", + Botval:`本操作只对"未发布"的分班有效`, starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:starttime, typs:"start", @@ -1269,9 +1269,9 @@ class Trainingjobsetting extends Component { modalname: "立即截止", modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, visible: true, - Topval: "本操作只对“提交中”的对象生效", - Botvalleft: "暂不截止", - Botval: "则将根据已设置的截止时间,定时截止", + Topval:"学生将不能再提交作业", + // Botvalleft:"暂不截止", + Botval:`本操作只对"提交中"的分班有效`, Cancelname: "暂不截止", Savesname: "立即截止", Cancel: this.homeworkhide, diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 7808355e8..02107b912 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -145,9 +145,9 @@ class Workquestionandanswer extends Component { modalname: "立即发布", modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, visible: true, - Topval: "本操作只对“未发布”的对象生效", - Botvalleft: "暂不发布", - Botval: "则通过后续手动设置,定时发布", + Topval:"学生将立即收到作业", + // Botvalleft:"暂不发布", + Botval:`本操作只对"未发布"的分班有效`, starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), endtime: "截止时间:" + endtime, Cancelname: "暂不发布", @@ -177,9 +177,9 @@ class Workquestionandanswer extends Component { modalname: "立即截止", modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, visible: true, - Topval: "本操作只对“提交中”的对象生效", - Botvalleft: "暂不截止", - Botval: "则将根据已设置的截止时间,定时截止", + Topval:"学生将不能再提交作业", + // Botvalleft:"暂不截止", + Botval:`本操作只对"提交中"的分班有效`, Cancelname: "暂不截止", Savesname: "立即截止", Cancel: this.homeworkhide, diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 5970a8907..1933f1ad7 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -8,7 +8,7 @@ import ShixunModal from "../coursesPublic/ShixunModal"; import PathModal from "../coursesPublic/PathModal"; import AddcoursesNav from "../coursesPublic/AddcoursesNav"; import Modals from '../../modals/Modals'; - +import moment from 'moment'; import '../css/members.css'; import '../css/busyWork.css' import ShixunhomeWorkItem from "./ShixunhomeWorkItem"; @@ -206,9 +206,9 @@ class ShixunHomework extends Component{ modaltype:response.data.course_groups===null||response.data.course_groups.length===0?2:1, visible:true, typs:"start", - Topval:"本操作只对“未发布”的对象生效", - Botvalleft:"暂不发布", - Botval:"则通过后续手动设置,定时发布", + Topval:"学生将立即收到作业", + // Botvalleft:"暂不发布", + Botval:`本操作只对"未发布"的分班有效`, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:starttime, endtime:"截止时间:"+endtime, @@ -301,9 +301,9 @@ class ShixunHomework extends Component{ modalname:"立即截止", modaltype:response.data.course_groups===null||response.data.course_groups.length===0?2:1, visible:true, - Topval:"本操作只对“提交中”的对象生效", - Botvalleft:"暂不截止", - Botval:"则将根据已设置的截止时间,定时截止", + Topval:"学生将不能再提交作业", + // Botvalleft:"暂不截止", + Botval:`本操作只对"提交中"的分班有效`, Cancelname:"暂不截止", Savesname:"立即截止", Cancel:this.homeworkhide, @@ -400,9 +400,9 @@ class ShixunHomework extends Component{ course_groups:response.data.course_groups, modaltype:response.data.course_groups===null||response.data.course_groups.length===0?2:1, visible:true, - Topval:"本操作只对“未发布”的对象生效", - Botvalleft:"暂不发布", - Botval:"则通过后续手动设置,定时发布", + Topval:"学生将立即收到作业", + // Botvalleft:"暂不发布", + Botval:`本操作只对"未发布"的分班有效`, starttime:"发布时间:"+ moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:starttime, typs:"start", From b297855e7bce976cd46b80e084d85e517c63156d Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 09:35:31 +0800 Subject: [PATCH 059/964] top --- public/react/src/modules/courses/boards/TopicDetail.js | 4 ++-- public/react/src/modules/forums/MemoDetailMDEditor.js | 10 ++++++---- public/react/src/modules/forums/Post.css | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js index 5d4a434a5..0b7c0935c 100644 --- a/public/react/src/modules/courses/boards/TopicDetail.js +++ b/public/react/src/modules/courses/boards/TopicDetail.js @@ -661,8 +661,8 @@ class TopicDetail extends Component { {/* onClick={ this.createNewComment } enableReplyTo={true} */} -
    +
    全部回复 {memo.total_replies_count} diff --git a/public/react/src/modules/forums/MemoDetailMDEditor.js b/public/react/src/modules/forums/MemoDetailMDEditor.js index ebb61b1b7..454a40a51 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditor.js +++ b/public/react/src/modules/forums/MemoDetailMDEditor.js @@ -178,10 +178,12 @@ class MemoDetailMDEditor extends Component {
    调整高度
    { errorMsg && {errorMsg} } - - {this.props.buttonText || '发送'} - +
    ); diff --git a/public/react/src/modules/forums/Post.css b/public/react/src/modules/forums/Post.css index e85ba38d0..51d88dfe1 100644 --- a/public/react/src/modules/forums/Post.css +++ b/public/react/src/modules/forums/Post.css @@ -18,7 +18,7 @@ } #forum_list .return_btn { line-height: 38px; - margin-right: 15px; + /* margin-right: 15px; */ font-size: 14px; cursor: pointer; } From 58bf03e694d827e3c39db93f3708acdc4663bbe6 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 22 Jun 2019 09:42:12 +0800 Subject: [PATCH 060/964] =?UTF-8?q?=E6=98=8E=E6=97=A5=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E7=9A=84=E9=87=91=E5=B8=81=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/ExerciseReviewAndAnswer.js | 18 +++++++++++------- .../courses/exercise/question/shixunAnswer.js | 4 ++-- .../react/src/modules/user/usersInfo/Infos.js | 14 ++++++++++---- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index 58569554f..06291a8d6 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -73,8 +73,9 @@ class ExerciseReviewAndAnswer extends Component{ setScoreReason:undefined, setTip:"", - Id:undefined - + Id:undefined, + // 试卷总分 + exerciseTotalScore:undefined } } componentDidUpdate (prevProps) { @@ -185,7 +186,8 @@ class ExerciseReviewAndAnswer extends Component{ exercise_answer_user:result.data.exercise_answer_user, exercise_questions:result.data.exercise_questions, user_exercise_status:1, - Id:result.data.exercise_answer_user.user_id + Id:result.data.exercise_answer_user.user_id, + exerciseTotalScore:result.data.exercise_answer_user.score }) } }).catch((error)=>{ @@ -207,7 +209,8 @@ class ExerciseReviewAndAnswer extends Component{ exercise_scores:result.data.exercise_scores, exercise_questions:result.data.exercise_questions, user_exercise_status:result.data.exercise.user_exercise_status, - time:result.data.exercise.left_time + time:result.data.exercise.left_time, + exerciseTotalScore:result.data.user_score }) if(result.data.exercise.left_time != null){ this.remainTime(); @@ -490,7 +493,8 @@ class ExerciseReviewAndAnswer extends Component{ modalsBottomval, ModalCancel, ModalSave, - Loadtype + Loadtype, + exerciseTotalScore }=this.state let isAdmin = this.props.isAdmin(); let isStudent =this.props.isStudent(); @@ -579,8 +583,8 @@ class ExerciseReviewAndAnswer extends Component{ exercise_start_at && 开始答题时间:{ exercise_start_at && moment(exercise_start_at).format(format) } } { - exercise_answer_user && !!exercise_answer_user.score && - 总分: { exercise_answer_user.score } + (isAdmin || (isStudent && exercise && exercise.exercise_status == 3)) && exerciseTotalScore && + 总分: { exerciseTotalScore } } { diff --git a/public/react/src/modules/courses/exercise/question/shixunAnswer.js b/public/react/src/modules/courses/exercise/question/shixunAnswer.js index 40dc11ed6..0ce4b3084 100644 --- a/public/react/src/modules/courses/exercise/question/shixunAnswer.js +++ b/public/react/src/modules/courses/exercise/question/shixunAnswer.js @@ -269,7 +269,7 @@ class shixunAnswer extends Component{ } { item.operation ? - this.scrollToAnchor(`${index+1}`)}>查看 + this.scrollToAnchor(`${questionType.question_id}${index+1}`)}>查看 : -- } @@ -292,7 +292,7 @@ class shixunAnswer extends Component{ { challenge.map((item,key)=>{ return( -
    +

    diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 201d5b43a..026ebc06b 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -46,7 +46,8 @@ class Infos extends Component{ type:0, login:undefined, isRenders:false, - moduleName:"courses" + moduleName:"courses", + next_gold:undefined } } componentDidMount =()=>{ @@ -75,7 +76,8 @@ class Infos extends Component{ data:result.data, followed:result.data.followed, sign:result.data.brief_introduction, - id:result.data.id + id:result.data.id, + next_gold:result.data.tomorrow_attendance_gold }) } }).catch((error)=>{ @@ -133,6 +135,9 @@ class Infos extends Component{ data : update(prevState.data, {attendance_signed: {$set: true} }) }) ) + this.setState({ + next_gold:result.data.next_gold + }) } }).catch((error)=>{ console.log(error); @@ -195,7 +200,8 @@ class Infos extends Component{ id, login, isRenders, - moduleName + moduleName, + next_gold }=this.state; let {username}= this.props.match.params; @@ -291,7 +297,7 @@ class Infos extends Component{ data.attendance_signed ? 已签到 - 明日签到 +{data && data.tomorrow_attendance_gold} 金币 + 明日签到 +{next_gold} 金币 : 签到 From 698ee3271245c9bc565c1540928d10d3297b91f4 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 10:01:49 +0800 Subject: [PATCH 061/964] css --- .../react/src/modules/courses/boards/TopicDetail.js | 10 ++++++---- .../courses/busyWork/reply/CommonWorkAppraiseReply.js | 4 ++-- .../src/modules/courses/common/courseMessage.css | 11 ++++++++--- public/react/src/modules/forums/MemoDetailMDEditor.js | 8 ++++++-- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js index 0b7c0935c..0c25910f5 100644 --- a/public/react/src/modules/courses/boards/TopicDetail.js +++ b/public/react/src/modules/courses/boards/TopicDetail.js @@ -413,6 +413,7 @@ class TopicDetail extends Component { // md editor.setValue && editor.setValue('') + const user = this._getUser(); this.setState({ comments: addNewComment(comments, _id, content, user) @@ -423,6 +424,7 @@ class TopicDetail extends Component { memo: newMemo2 }) this.refs.editor.showEditor(); + this.refs.editor.close(); } @@ -661,11 +663,11 @@ class TopicDetail extends Component { {/* onClick={ this.createNewComment } enableReplyTo={true} */} -

    +
    - 全部回复 - {memo.total_replies_count} + 全部回复 + ({memo.total_replies_count})
    }
    - -
    {/* diff --git a/public/react/src/modules/courses/common/courseMessage.css b/public/react/src/modules/courses/common/courseMessage.css index e521b24f5..a7bbd8f1a 100644 --- a/public/react/src/modules/courses/common/courseMessage.css +++ b/public/react/src/modules/courses/common/courseMessage.css @@ -13,7 +13,8 @@ /* 评论 */ /* 改宽度 */ .course-message .panel-comment_item .comment_orig_content { - width: 1024px; + /* width: 1024px; */ + width: 1046px; } /* 子回复按钮 */ .course-message .reply_to_message a.commentsbtn.task-btn-blue { @@ -34,7 +35,7 @@ } .course-message .comment_item_cont:last-child { /* 作品评阅需要 */ - /* border-bottom: none; */ + border-bottom: none; } .course-message .memoMore { @@ -44,4 +45,8 @@ .course-message .memoMore .writeCommentBtn { right: 35px; top: 2px; - } \ No newline at end of file + } + +.panel-comment_item .comment_content { + margin-top: 4px; +} \ No newline at end of file diff --git a/public/react/src/modules/forums/MemoDetailMDEditor.js b/public/react/src/modules/forums/MemoDetailMDEditor.js index 454a40a51..e1811ed8a 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditor.js +++ b/public/react/src/modules/forums/MemoDetailMDEditor.js @@ -128,7 +128,8 @@ class MemoDetailMDEditor extends Component { - -
    -
    - 找回密码 -
    -
    - - this.inputOnBlur(e)} - onChange={this.loginInputonChange} style={{marginTop: '10px'}}> - { - Phonenumberisnotco && Phonenumberisnotco != "" ? -

    - {Phonenumberisnotco} -

    - :
    - } - - - - -
    - - - { - getverificationcodes === undefined ? - - : getverificationcodes === true ? - - : - - } - - -
    - - -
    -
    - -
    - ); - } -} - -export default (LoginRegisterComponent); +import React, {Component} from 'react'; + +import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; + +import {getImageUrl, DragValidator} from 'educoder'; +import {Tabs, Input, Checkbox, Button, notification} from 'antd'; +import axios from 'axios'; +import './common.css' + +const TabPane = Tabs.TabPane +const loginInputsyl = { + "width": " 100%", + "height": "40px", +} + +//父组件 EducoderLogin.js +class LoginRegisterComponent extends Component { + constructor(props) { + super(props) + this.state = { + login: "", + password: "", + passwords: "", + seconds: 60, + codes: "", + getverificationcodes: true, + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: false, + s: 'text', + classpass: "text", + readonlyInput: true, + } + } + + + openNotification = (messge) => { + notification.open({ + message: "提示", + description: + messge, + onClick: () => { + console.log('Notification Clicked!'); + }, + }); + }; + StudyMakeMoney = () => { // 调用父组件方法 + this.props.Setshowbool(); + + } + + // 点击表单后,改变type + changeType = () => { + this.setState({classpass: 'password'}); + } + changeTypey = () => { + + } + //倒计时 + getverificationcode = () => { + if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) { + if (this.state.login&&this.state.login.length === 0) { + this.openNotification("请输入手机号或邮箱"); + return + } else { + this.openNotification("请输入正确的手机号或邮箱"); + } + return; + } + if (this.state.getverificationcodes === true) { + this.setState({ + getverificationcodes: undefined, + }) + let timer = setInterval(() => { + this.setState((preState) => ({ + seconds: preState.seconds - 1, + }), () => { + if (this.state.seconds == 0) { + clearInterval(timer); + this.setState({ + getverificationcodes: false, + seconds: 60, + }) + } + }); + }, 1000) + this.SMSverification(); + } else { + this.setState({ + getverificationcodes: undefined, + }) + let timer = setInterval(() => { + this.setState((preState) => ({ + seconds: preState.seconds - 1, + }), () => { + if (this.state.seconds == 0) { + clearInterval(timer); + this.setState({ + getverificationcodes: false, + seconds: 60, + + }) + } + }); + }, 1000) + this.SMSverification(); + } + } + //短信验证 + SMSverification = () => { + var url = `/accounts/get_verification_code.json`; + axios.get((url), { + params: { + login: this.state.login, + type: 2, + } + }).then((result) => { + //验证有问题{"status":1,"message":"success"} + console.log(result); + + + }).catch((error) => { + console.log(error); + + }) + } + + cancelReadOnly = () => { + this.setState({ + readonlyInput: false, + }) + } + //找回密码 + Retrievepassword = () => { + if (this.state.Phonenumberisnotcobool === false) { + if (this.state.login.length === 0) { + this.openNotification("请输入手机号或邮箱"); + return + } + this.openNotification("请输入正确的手机号或邮箱"); + return; + } + + if (this.state.login === undefined || this.state.login == "") { + this.openNotification(`请输入登录手机号码或邮箱`); + return + } else if (this.state.password === undefined || this.state.password == "") { + this.openNotification(`请输入密码`); + return + } else if (this.state.passwords === undefined || this.state.passwords == "") { + this.openNotification(`请输入密码`); + return + } else if (this.state.password !== this.state.passwords) { + this.openNotification(`两次密码不相同`); + return + } else if (this.state.codes === undefined || this.state.codes == "") { + this.openNotification(`请输入验证码`); + return + } + var url = "/accounts/reset_password.json"; + axios.post(url, { + login: this.state.login, + code: this.state.codes, + new_password: this.state.password, + new_password_confirmation: this.state.passwords, + }).then((result) => { + // console.log(result); + //登录成功,会生成session + this.openNotification("找回密码成功,请重新登入。"); + window.location.href = "/login" + }).catch((error) => { + + }) + + + } + openNotification = (messge) => { + notification.open({ + message: "提示", + description: + messge, + onClick: () => { + console.log('Notification Clicked!'); + }, + }); + }; + loginInputonChange = (e) => { + // console.log(e.target.value); + this.setState({ + login: e.target.value, + }) + + + } + loginInputonChanges = (e) => { + // console.log(e.target.value); + this.setState({ + password: e.target.value, + }) + + + } + loginInputonChangess = (e) => { + // console.log(e.target.value); + this.setState({ + passwords: e.target.value, + }) + + + } + //获取code + codesonChange = (e) => { + this.setState({ + codes: e.target.value + }) + } + inputOnBlur = (e) => { + this.isCorrectname(e.target.value); + // this.Emailphonenumberverification(e.target.value, id); + } + isCorrectname = (value) => { + console.log(value.length); + if (value.length === 0) { + this.setState({ + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: false, + }) + return; + } + // var telephone = $("#telephoneAdd.tianjia_phone").val(); + var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/; + // var email = $("#add_email.tianjia_email").val(); + var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/; + + // [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。 + var stringdata = undefined; + if (!regph.test(value)) { + stringdata = "手机号格式不正确"; + this.setState({ + Phonenumberisnotco: stringdata, + Phonenumberisnotcobool: false, + }) + } else { + this.setState({ + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: true, + }) + return + } + + if (!regemail.test(value)) { + if ((value.indexOf("@") != -1) === true) { + stringdata = "邮箱格式不正确"; + } else { + stringdata = "手机号格式不正确"; + + } + this.setState({ + Phonenumberisnotco: stringdata, + Phonenumberisnotcobool: false, + }) + + this.Emailphonenumberverification(value) + return + } else { + this.setState({ + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: true, + }) + return + } + } + //邮箱手机号验证 + Emailphonenumberverification = (value) => { + var url = `/accounts/valid_email_and_phone.json`; + axios.get((url), { + params: { + login: value, + type: 2, + } + }).then((result) => { + //验证有问题{"status":1,"message":"success"} + console.log(result); + + + }).catch((error) => { + console.log(error); + // this.setState({ + // login:"", + // logins:"", + // }) + }) + } + + render() { + const { + activeKey, + // 登录 + autoLogin, + // 注册 + readAgreement, dragOk, + login, + password, + passwords, + classpass, + seconds, + getverificationcodes, + Phonenumberisnotco, + readonlyInput, + codes, + } = this.state + // height: 346px; + return ( + +
    + + + + +
    +
    + 找回密码 +
    +
    + + this.inputOnBlur(e)} + onChange={this.loginInputonChange} style={{marginTop: '10px',height: "38px"}}> + { + Phonenumberisnotco && Phonenumberisnotco != "" ? +

    + {Phonenumberisnotco} +

    + :
    + } + + + + +
    + + + { + getverificationcodes === undefined ? + + : getverificationcodes === true ? + + : + + } + + +
    + + +
    +
    + +
    + ); + } +} + +export default (LoginRegisterComponent); diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 846000984..d314effca 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -10,8 +10,12 @@ import axios from 'axios'; import './common.css' const { TabPane } = Tabs; const loginInputsyl = { - "width": " 100%", - "height": "40px", +"width":"434px", +"height": "462px", +"-webkit-box-shadow": "3px 10px 21px 0px rgba(76,76,76,0.15)", +"box-shadow": "3px 10px 21px 0px rgba(76,76,76,0.15)", +"border-radius": "6px", +"background": "#fff" } //父组件EducoderLogin.js @@ -135,6 +139,7 @@ class LoginRegisterComponent extends Component { ; StudyMakeMoney = () => { // 调用父组件方法 this.props.Setshowbool(); + // this.props.Setlogins(3); this.setState({ login: "", password: "", @@ -407,8 +412,9 @@ class LoginRegisterComponent extends Component { //倒计时 getverificationcode = () => { - if (this.state.Phonenumberisnotcobool === false) { - if (this.state.logins.length === 0) { + debugger + if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) { + if (this.state.logins&&this.state.logins.length === 0) { this.openNotification("请输入手机号或邮箱",2); return }else { @@ -503,6 +509,13 @@ class LoginRegisterComponent extends Component { this.setState({ tab:e.key }) + // console.log(e.key); + // if(e.key === 0){ + // this.props.Setlogins(1); + // }else{ + // this.props.Setlogins(2); + // + // } // this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key) @@ -532,7 +545,7 @@ class LoginRegisterComponent extends Component { // console.log(activeKey); return ( -
    +
    @@ -576,62 +589,65 @@ class LoginRegisterComponent extends Component { + className="font-14 color-grey-9" + style={{marginTop: '30px', height: '38px'}}> { Phonenumberisnotco && Phonenumberisnotco != "" ?

    {Phonenumberisnotco}

    - :
    + :
    } - -
    +
    下次自动登录 - 找回密码 + 找回密码
    -
    } { parseInt(tab[0])==1 &&
    - this.inputOnBlur(e, 2)} - style={{marginTop: '30px'}}> + style={{marginTop: '30px' , height: '38px',color:'#999999',fontSize:"14px"}}> { Phonenumberisnotcos && Phonenumberisnotcos != "" ? -

    +

    + {/*{Phonenumberisnotcos}*/} - {Phonenumberisnotcos} + 请输入手机号码

    - :
    + :
    } -
    - + { getverificationcodes === undefined ? - : getverificationcodes === true ? - + : - } @@ -655,8 +671,9 @@ class LoginRegisterComponent extends Component { {/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/} {/**/} - 我已阅读并同意服务协议条款 - + >我已阅读并同意服务协议条款 +
    From cfb6a0d16a366b20d0b02ca48c7d8c09beed7477 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, 22 Jun 2019 13:56:36 +0800 Subject: [PATCH 069/964] =?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 --- .../tasks/GraduationTaskssettinglist.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index c842d02f2..b681388f8 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -697,7 +697,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)} + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} ), @@ -709,7 +709,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)} + 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating} ), @@ -721,7 +721,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)} + 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore} ), @@ -838,7 +838,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)} + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} ), @@ -850,7 +850,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)} + 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating} ), @@ -862,7 +862,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)} + 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore} ), @@ -995,7 +995,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)} + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} ), @@ -1007,7 +1007,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)} + 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating} ), @@ -1019,7 +1019,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)} + 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore} ), @@ -1138,7 +1138,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":parseInt(record.teacherrating)} + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} ), @@ -1150,7 +1150,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":parseInt(record.crossrating)} + 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating} ), @@ -1162,7 +1162,7 @@ class GraduationTaskssettinglist extends Component{ render: (text, record) => ( - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":parseInt(record.finalscore)} + 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore} ), From 7aa347713674e43270c70286ce61353af38ef2dd Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 13:57:21 +0800 Subject: [PATCH 070/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/EducoderLogin.js | 2 +- public/react/src/modules/login/Trialapplication.js | 5 +++++ public/react/src/modules/tpm/TPMIndexHOC.js | 9 ++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index 6df53d63e..3c3f47c87 100644 --- a/public/react/src/modules/login/EducoderLogin.js +++ b/public/react/src/modules/login/EducoderLogin.js @@ -151,7 +151,7 @@ class EducoderLogin extends Component { }}>
    + Setshowbool={this.Setshowbool} >
    diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index d2b942ce7..aa3a942dd 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -77,13 +77,18 @@ class Trialapplication extends Component { //TODO 这里如果样式变了会出现css不加载的情况 }); + console.log(this.props.isRenders); console.log("89"); + console.log(this.state.props.user_phone_binded ); try { if (this.state.props.user_phone_binded !== undefined) { console.log(this.state.props.user_phone_binded); this.setState({ user_phone_binded: this.state.props.user_phone_binded, }) + if(this.state.props.user_phone_binded === true){ + this.props.setTrialapplication(); + } } } catch (e) { diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 7723af4fc..9d8adb920 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -213,6 +213,13 @@ export function TPMIndexHOC(WrappedComponent) { return this.state.coursedata&&this.state.coursedata.course_identity === 6 } + setTrialapplication = ()=>{ + this.setState({ + isRenders:true + }) + + } + /** 课堂权限相关方法,暂时写这里了 ----------------------------------------END @@ -285,7 +292,7 @@ export function TPMIndexHOC(WrappedComponent) { user_phone_binded === undefined? "" : - + } From 1ee43431d0418018cbc07a2369c56c3999de5e18 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 14:04:54 +0800 Subject: [PATCH 071/964] =?UTF-8?q?=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Index.js | 6 +++--- .../react/src/modules/courses/ListPageIndex.js | 16 +++++++++++++++- .../react/src/modules/courses/Resource/index.js | 6 ++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index c385af3b7..840d1d617 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -442,14 +442,14 @@ class CoursesIndex extends Component{ {/* 资源列表页 */} - () + (props) => () } > () + (props) => () } > + + () + } + > + () + } + > + + + {/* 默认 */} () } > - +
    diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 1cae3d559..6476ef2bb 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -573,7 +573,7 @@ class Fileslists extends Component{ return( -
    + {/*发送*/} @@ -647,7 +647,6 @@ class Fileslists extends Component{ has_course_groups={this.state.has_course_groups} />:""} - - -
    + ) } } From 12a0bcaf4555a8322adb3a88943ad9a0231a74eb Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 14:13:05 +0800 Subject: [PATCH 072/964] =?UTF-8?q?=E6=AF=95=E8=AE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Index.js | 8 ++++---- .../react/src/modules/courses/ListPageIndex.js | 18 +++++++++++++++++- .../modules/courses/graduation/tasks/index.js | 4 ++-- .../modules/courses/graduation/topics/index.js | 4 ++-- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index 840d1d617..3dcdb1c18 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -491,9 +491,9 @@ class CoursesIndex extends Component{ > {/* 毕设选题列表 */} - () + (props) => () }> @@ -559,9 +559,9 @@ class CoursesIndex extends Component{ {/* 毕设任务列表 https://www.trustie.net/issues/19981 */} - () + (props) => () } > diff --git a/public/react/src/modules/courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js index abb8a8528..1f8bf6b29 100644 --- a/public/react/src/modules/courses/ListPageIndex.js +++ b/public/react/src/modules/courses/ListPageIndex.js @@ -56,6 +56,14 @@ const ShixunHomework= Loadable({ loading: Loading, }) +const GraduationTopics= Loadable({ + loader: () => import('./graduation/topics'), + loading: Loading, +}) +const GraduationTasks= Loadable({ + loader: () => import('./graduation/tasks'), + loading: Loading, +}) class ListPageIndex extends Component{ constructor(props) { super(props) @@ -181,7 +189,15 @@ class ListPageIndex extends Component{ } > - + () + }> + () + } + > {/* 默认 */} + {/*提示*/} - + ) } } diff --git a/public/react/src/modules/courses/graduation/topics/index.js b/public/react/src/modules/courses/graduation/topics/index.js index aaba86e9e..391bcac18 100644 --- a/public/react/src/modules/courses/graduation/topics/index.js +++ b/public/react/src/modules/courses/graduation/topics/index.js @@ -341,7 +341,7 @@ onBoardsNew=()=>{ // let {course_identity}=this.props.coursedata const isAdmin =this.props.isAdmin(); return( - + {
    -
    + ) } } From 710ef90cd12b601d208bdd19df97e5af89c14675 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 14:14:21 +0800 Subject: [PATCH 073/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/Trialapplication.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index aa3a942dd..e9a801f74 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -71,6 +71,7 @@ class Trialapplication extends Component { this.setState({ isRenders: true }) + this.props.setTrialapplication(); } return response; }, (error) => { @@ -86,9 +87,6 @@ class Trialapplication extends Component { this.setState({ user_phone_binded: this.state.props.user_phone_binded, }) - if(this.state.props.user_phone_binded === true){ - this.props.setTrialapplication(); - } } } catch (e) { From cc290824bd4e438adbe4f6a1ddc11341677e1854 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 14:29:20 +0800 Subject: [PATCH 074/964] =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0=20?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=A1=86=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../graduation/tasks/GraduationTasksSubmitnew.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index fd383eabf..1f49804e5 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -84,8 +84,20 @@ class GraduationTasksSubmitnew extends Component{ handleSubmit=(e) => { - let {fileList,selectmemberslist,workslist}=this.state; + + if(fileList.length === 0){ + this.setState({ + Modalstype:true, + Modalstopval:'请上传附件!', + Loadtype:true, + ModalCancel:this.cancelAttachment + }) + + + return + } + let userids=[]; From df009248ea2b92c067c350f9012207ff291297e6 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 14:47:15 +0800 Subject: [PATCH 075/964] =?UTF-8?q?=E6=AF=94=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/page/MainContent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/MainContent.js b/public/react/src/modules/page/MainContent.js index bfe53f0ac..2aef78e1b 100644 --- a/public/react/src/modules/page/MainContent.js +++ b/public/react/src/modules/page/MainContent.js @@ -57,7 +57,7 @@ class MainContent extends Component { `}
    + id="game_left_contents" style={{ width: '35%'}}> {/* style={{width: '694px'}} */} {/* 左侧任务说明等功能的区域 */} From c3ca98a64422b990f7e29a2240a9a0fb42a4d276 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 14:51:20 +0800 Subject: [PATCH 076/964] "@novnc/novnc": "^1.1.0", --- public/react/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/react/package.json b/public/react/package.json index 7b00881d5..19b8286d9 100644 --- a/public/react/package.json +++ b/public/react/package.json @@ -3,6 +3,8 @@ "version": "0.1.0", "private": true, "dependencies": { + "@novnc/novnc": "^1.1.0", + "@flatten/array": "^1.1.7", "@icedesign/base": "^0.2.5", "antd": "^3.6.5", From e196f5b066d54f32c90c4f9b667d29c8c84fd60b Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 15:02:37 +0800 Subject: [PATCH 077/964] VNCDisplay --- public/react/src/modules/page/Index.js | 4 + public/react/src/modules/page/MainContent.js | 10 +- .../src/modules/page/MainContentContainer.js | 4 + public/react/src/modules/page/VNCDisplay.js | 154 ++++++++++++++++++ 4 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 public/react/src/modules/page/VNCDisplay.js diff --git a/public/react/src/modules/page/Index.js b/public/react/src/modules/page/Index.js index 7d89462b9..5a37c8c66 100644 --- a/public/react/src/modules/page/Index.js +++ b/public/react/src/modules/page/Index.js @@ -223,6 +223,10 @@ class Index extends Component { challenge={context.challenge} myshixun={context.myshixun} shixun={context.shixun} + + vnc_url={context.vnc_url} + zip_path={context.zip_path} + loading={context.loading} discusses_count={context.discusses_count} hide_code={context.hide_code} diff --git a/public/react/src/modules/page/MainContent.js b/public/react/src/modules/page/MainContent.js index 2aef78e1b..c49b037f9 100644 --- a/public/react/src/modules/page/MainContent.js +++ b/public/react/src/modules/page/MainContent.js @@ -13,6 +13,7 @@ import ChooseEvaluateView from './main/ChooseEvaluateView' import { CircularProgress } from 'material-ui/Progress'; import Button from 'material-ui/Button'; +import VNCDisplay from './VNCDisplay' import './tpiPage.css'; import './tpiPageForMobile.css'; @@ -32,7 +33,7 @@ class MainContent extends Component { } render() { const { challenge, output_sets, onRunCodeTest, latest_output, record, st, readRepoTimeout, - onTestSetHeaderClick, loading, codeLoading } = this.props + onTestSetHeaderClick, loading, codeLoading, shixun} = this.props // if (output_sets && output_sets.test_sets) { // const test_sets_array = JSON.parse("[" + output_sets.test_sets + "]"); @@ -47,6 +48,9 @@ class MainContent extends Component { } const newProps = Object.assign({}, this.props); delete newProps.testSetsExpandedArray + + const showIframeContent = shixun && shixun.vnc == true + return (
    +//
    +//
    Loading
    +//
    Send CtrlAltDel
    +//
    +//
    +//
    +// ); +// } +// } + +// export default VNCDisplay; From b6e36fd02ef40f0b609fbefa361e325a8bb45e53 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 22 Jun 2019 15:05:31 +0800 Subject: [PATCH 078/964] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=EF=BC=9Afix=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/ExerciseReviewAndAnswer.js | 28 +++++++++++++----- public/react/src/modules/courses/poll/Poll.js | 1 + .../courses/poll/PollDetailTabFirst.js | 7 ++++- .../react/src/modules/user/usersInfo/Infos.js | 29 ++++++++++++------- 4 files changed, 47 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index 0893a5e23..ce9c00a21 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -240,11 +240,15 @@ class ExerciseReviewAndAnswer extends Component{ ) } // 调分 - showSetScore=(key,flag)=>{ + showSetScore=(key,flag,setId)=>{ this.setState( (prevState) => ({ exercise_questions : update(prevState.exercise_questions, {[key]: { setScore: {$set: flag == undefined || flag==false ? true : false}}}) - }) + }),()=>{ + if (setId && (flag == undefined || flag==false)) { + $("html").animate({ scrollTop: $("#Anchor_"+setId).offset().top - 150 }) + } + } ) this.setState({ score:undefined @@ -502,6 +506,18 @@ class ExerciseReviewAndAnswer extends Component{ console.log(data&&data.exercise.user_name) return(
    +

    this.showSetScore(key,item.setScore)}>调分:"" + this.showSetScore(key,item.setScore,item.q_position+"_"+item.question_type)}>调分:"" } { // 简答题,未评分的显示未批 @@ -767,11 +783,10 @@ class ExerciseReviewAndAnswer extends Component{
    } - { // 调分输入部分 isAdmin && ((item.setScore && item.question_type == 3) || ((item.setScore || parseInt(item.answer_status) == 0) && item.question_type == 4))? -
    +
    *调分:
  • @@ -783,8 +798,7 @@ class ExerciseReviewAndAnswer extends Component{ value={score} step={0.1} precision={1} - className={ setTip !="" ? "edu-txt-center winput-115-40 fl mt3 noticeTip" : "edu-txt-center winput-115-40 fl mt3"} - style={{height:"30px",width:"115px"}} + className={ setTip !="" ? "edu-txt-center winput-115-40 fl mt3 noticeTip inputNumber30" : "edu-txt-center winput-115-40 fl mt3 inputNumber30"} onChange={this.inputScore} > diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js index 9f9291b61..3a7cd6aec 100644 --- a/public/react/src/modules/courses/poll/Poll.js +++ b/public/react/src/modules/courses/poll/Poll.js @@ -13,6 +13,7 @@ import '../css/members.css'; import '../css/busyWork.css'; import Modals from '../../modals/Modals'; import axios from 'axios'; +import moment from 'moment'; const Search = Input.Search; diff --git a/public/react/src/modules/courses/poll/PollDetailTabFirst.js b/public/react/src/modules/courses/poll/PollDetailTabFirst.js index 6a5be2e8d..ceca9b291 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabFirst.js +++ b/public/react/src/modules/courses/poll/PollDetailTabFirst.js @@ -181,7 +181,12 @@ class PollDetailTabFirst extends Component{ title: '学号', dataIndex: 'StudentNo', key: 'StudentNo', - className:"edu-txt-center" + className:"edu-txt-center", + render:(StudentNo,item,index)=>{ + return( + item.StudentNo ? {item.StudentNo} : "--" + ) + } }, { title: '分班', key: 'classes', diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 81198b45c..941217750 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -130,14 +130,15 @@ class Infos extends Component{ let url=`/users/attendance.json` axios.post(url).then((result)=>{ if(result){ - this.setState( - (prevState) => ({ - data : update(prevState.data, {attendance_signed: {$set: true} }) - }) - ) - this.setState({ - next_gold:result.data.next_gold - }) + // this.setState( + // (prevState) => ({ + // data : update(prevState.data, {attendance_signed: {$set: true} }) + // }) + // ) + // this.setState({ + // next_gold:result.data.next_gold + // }) + this.getInfo(this.props.match.params.username); } }).catch((error)=>{ console.log(error); @@ -245,6 +246,9 @@ class Infos extends Component{
  • + { + data && is_current == false && data.identity =="学生" ?"" : {data && data.identity} + } {data && data.identity} @@ -314,7 +318,7 @@ class Infos extends Component{
    -
  • +
  • this.setState({moduleName: 'courses'})} to={`/users/${username}/courses`}>课堂 @@ -348,7 +352,7 @@ class Infos extends Component{ {/* 课堂 */} {/* http://localhost:3007/courses/1309/homework/9300/setting */} - () } @@ -374,6 +378,11 @@ class Infos extends Component{ (props) => () } > + () + } + >
  • From 0f1211f555a0cb5b481d977a1e8f0946f30fe15a Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 15:06:34 +0800 Subject: [PATCH 079/964] =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0=20?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=A1=86=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesDetail/CoursesBanner.js | 477 +++++++++--------- .../src/modules/login/Trialapplication.js | 1 - public/react/src/modules/tpm/TPMIndexHOC.js | 24 +- 3 files changed, 262 insertions(+), 240 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 43e44c500..e0333c333 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -9,7 +9,7 @@ import '../css/Courses.css'; import Modals from "../../modals/Modals"; import AddStudentModal from '../members/modal/AddStudentModal' import AddTeacherModal from '../members/modal/AddTeacherModal' - +import Trialapplication from "../../login/Trialapplication"; // 点击按钮复制功能 // function jsCopy(){ @@ -43,13 +43,20 @@ class CoursesBanner extends Component { metype: 0, modalsBottomval: "", antIcon:false, - coursedata:undefined + coursedata:undefined, + user_phone_binded:false, + isRenders:false, + showTrial:false, } + console.log("CoursesBanner"); + console.log("48"); + console.log(props); } - - componentDidMount() { this.updatabanner() + this.setState({ + user_phone_binded :this.props.user_phone_binded, + }) } updatabanner=()=>{ let courseId = this.props.match.params.coursesId; @@ -57,9 +64,19 @@ class CoursesBanner extends Component { axios.get(url).then((result) => { if( result!=undefined){ let data = result.data; - this.setState({ - coursedata: data - }) + if(result.data.status === 407){ + this.setState({ + isRenders:true, + coursedata: data, + showTrial:false, + }) + }else{ + this.setState({ + coursedata: data, + showTrial:true, + + }) + } } }) } @@ -315,265 +332,271 @@ class CoursesBanner extends Component { } render() { - let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon} = this.state; + let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state; return ( +
    + - coursedata === undefined || coursedata.status===401?
    :
    + { + coursedata === undefined || coursedata.status===401?
    :
    {Addcoursestypes === true ? this.tojoinclass(2)} + Addcoursestype={Addcoursestypes} + hideAddcoursestype={() => this.tojoinclass(2)} /> : ""} - -
    -
    +
    - { - coursedata===undefined || coursedata.status===401 || coursedata.status===407?"": - - {coursedata.name} - + { + coursedata===undefined || coursedata.status===401 || coursedata.status===407?"": + + {coursedata.name} + - } - {/*私有:私有课堂,非课堂成员不能访问 + } + {/*私有:私有课堂,非课堂成员不能访问 公开:公开课堂,非课堂成员可以访问*/} - + + typelist={coursedata.course_end === true ? ["已结束"] : coursedata.is_public === true ? ["公开"] : ["私有"]} + typesylename={"mt10"} tipval={coursedata.is_public === true?"":"私有课堂,非课堂成员不能访问"}/> +
    + +
    +
    + + + 头像 + + + + +
    +

    {coursedata.teacher_school}

    +
    +
    -
    -
    - - - 头像 - - - - -
    -

    {coursedata.teacher_school}

    -
    - -
    - - -
    - {coursedata.switch_to_student === true ? - - this.switchidentity(1)} - > 切换为学生 - - :""} - - {coursedata.switch_to_teacher === true ? - - this.switchidentity(2)} - > 切换为老师 - :""} - - - {coursedata.switch_to_assistant === true ? - - this.switchidentity(3)} - > 切换为助教 - :""} - - - {coursedata.course_identity === 6&&coursedata.educoder_teacher===false? - this.tojoinclass(1)}>加入课堂: ""} - - {coursedata.course_identity === 6&&coursedata.educoder_teacher===true? - this.tojoinclass(1)}>加入课堂: ""} - - {coursedata.course_identity === 6&&coursedata.educoder_teacher===true? - this.ActionPoll(5)}> 复制课堂 : ""} - - {this.props.isStudent()? this.exitclass()} - > 退出课堂 :""} - -
    - - -
    - +
    + {coursedata.switch_to_student === true ? + + this.switchidentity(1)} + > 切换为学生 + + :""} + + {coursedata.switch_to_teacher === true ? + + this.switchidentity(2)} + > 切换为老师 + :""} + + + {coursedata.switch_to_assistant === true ? + + this.switchidentity(3)} + > 切换为助教 + :""} - {this.props.isAdmin()?
    + + +
    + + + + {this.props.isAdmin()? - } trigger="hover"> - - + } + + + {coursedata.is_public === true?coursedata.course_identity <3? +
    this.ActionPoll(2)}>设为私有
    : "" : ""} + + {coursedata.is_public === false?coursedata.course_identity <3? +
    this.ActionPoll(3)}>设为公开
    : "": ""} + + {coursedata.course_identity <3?
    this.ActionPoll(4)}> + {coursedata.code_halt === true ?"启用邀请码":"停用邀请码"} +
    :""} + +
    设置
    + +
    this.ActionPoll(5)}>复制 +
    + + {coursedata.is_admin===true?coursedata.course_identity <3?
    this.ActionPoll(1)}>删除
    + :"":""} + + } trigger="hover"> + +
    - + - :""} + :""} -
    +
    -
    +
    -
    +
    + } +
    + ) } } diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index e9a801f74..9285bd1f0 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -71,7 +71,6 @@ class Trialapplication extends Component { this.setState({ isRenders: true }) - this.props.setTrialapplication(); } return response; }, (error) => { diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 9d8adb920..77d2e13bb 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -213,12 +213,12 @@ export function TPMIndexHOC(WrappedComponent) { return this.state.coursedata&&this.state.coursedata.course_identity === 6 } - setTrialapplication = ()=>{ - this.setState({ - isRenders:true - }) - - } + // setTrialapplication = ()=>{ + // this.setState({ + // isRenders:true + // }) + // + // } /** @@ -288,13 +288,13 @@ export function TPMIndexHOC(WrappedComponent) { } return (
    - { - user_phone_binded === undefined? - "" - : - + {/*{*/} + {/* user_phone_binded === undefined?*/} + {/* ""*/} + {/* :*/} + {/* */} - } + {/*}*/} Date: Sat, 22 Jun 2019 15:11:10 +0800 Subject: [PATCH 080/964] isAdminOrTeacher --- public/react/src/modules/courses/members/teacherList.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 509bf56c1..478a94ec2 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -28,6 +28,7 @@ const pageSize = 20; function buildColumns(that) { const isAdmin = that.props.isAdmin() const isAdminOrCreator = that.props.isAdminOrCreator(); + const isAdminOrTeacher = that.props.isAdminOrTeacher() const { course_groups } = that.state const columns = [{ title: '', @@ -121,7 +122,7 @@ function buildColumns(that) { ), }) } - if (isAdminOrCreator) { + if (isAdminOrTeacher) { columns.push({ title: '操作', key: 'action', From b8fab1e9a004db5721a59c2956f237c410120930 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 15:53:07 +0800 Subject: [PATCH 081/964] =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0=20?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=A1=86=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/exercise/Studentshavecompletedthelist.js | 9 +++++---- .../courses/graduation/tasks/GraduationTasksSubmitnew.js | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index 4317950f2..64cfaee64 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -2030,7 +2030,7 @@ class Studentshavecompletedthelist extends Component { //===0 不包括主观题 if (indexi === exercise_users.length) { //都没评论 不显示评论 - if (response.data.course_groups.length > 0) { + if (response.data.poll_types.groups_count > 0) { // console.log("77771111111"); //分班大于0显示分班 //7ge @@ -2272,7 +2272,8 @@ class Studentshavecompletedthelist extends Component { } else { //已经评论 - if (response.data.course_groups.length > 0) { + // response.data.course_groups.length + if (response.data.poll_types.groups_count > 0) { //显示分班 //8ge this.setState({ @@ -2545,7 +2546,7 @@ class Studentshavecompletedthelist extends Component { //包括主观题 if (indexi === exercise_users.length) { console.log("2548包含主观题不包含分班"); - if (response.data.course_groups.length > 0){ + if (response.data.poll_types.groups_count> 0){ this.setState({ data: datalist, teacherlist: teacherlist, @@ -2836,7 +2837,7 @@ class Studentshavecompletedthelist extends Component { } } else { console.log("2699包含主观题包含分班"); - if (response.data.course_groups.length > 0) { + if (response.data.poll_types.groups_count> 0) { this.setState({ data: datalist, teacherlist: teacherlist, diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index 1f49804e5..a9ea6d002 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -85,7 +85,7 @@ class GraduationTasksSubmitnew extends Component{ handleSubmit=(e) => { let {fileList,selectmemberslist,workslist}=this.state; - + if(fileList.length === 0){ this.setState({ Modalstype:true, From 8eee96f7c2ed07b82f9346d1bf8205d8785f81b9 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 16:13:41 +0800 Subject: [PATCH 082/964] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/members/teacherList.js | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 478a94ec2..261bfab85 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -5,6 +5,7 @@ import CourseLayoutcomponent from '../common/CourseLayoutComponent' import Titlesearchsection from '../common/titleSearch/TitleSearchSection' import ColorCountText from '../common/titleSearch/ColorCountText' +import update from 'immutability-helper' import { WordsBtn, ConditionToolTip, on, off } from 'educoder' import axios from 'axios' @@ -71,7 +72,7 @@ function buildColumns(that) { const noGroups = (!course_groups || course_groups.length == 0); return ( - + { arg_course_groups.length == 0 ? '不限' : arg_course_groups.map(item => item.name).join(', ') } { isAdmin && @@ -84,7 +85,7 @@ function buildColumns(that) {

    ): '' } - that.joinCourseGroup(checkedValues, item)} + that.joinCourseGroup(checkedValues, item, index)} value={arg_course_groups.map(item => item.id)} disabled={!isAdminOrCreator} > @@ -137,11 +138,12 @@ function buildColumns(that) { } else { return ( - that.onDelete(record)} style={'grey'}>删除 - + {record.role != ROLE_ADMIN && that.onDelete(record)} style={'grey'}>删除} + {(record.role == ROLE_TEACHER || record.role == ROLE_TEACHER_ASSISTANT || isAdminOrCreator) && record.role != ROLE_ADMIN + && } { record.role == ROLE_TEACHER ? that.changeToAssistant(record)}>变更为助教 : '' } { record.role == ROLE_TEACHER_ASSISTANT ? that.changeToTeacher(record)}>变更为教师 : '' } - { record.role == ROLE_ADMIN ? that.showChangeAdminModal(record)}>更换管理员 : '' } + { record.role == ROLE_ADMIN && isAdminOrCreator ? that.showChangeAdminModal(record)}>更换管理员 : '' } ) } @@ -238,8 +240,13 @@ class studentsList extends Component{ }) .then((response) => { if (response.data.course_groups && response.data.course_groups.length) { + let course_groups_map = {} + response.data.course_groups.forEach(item => { + course_groups_map[item.id] = item.name + }) this.setState({ course_groups: response.data.course_groups, + course_groups_map }) } else { } @@ -248,7 +255,7 @@ class studentsList extends Component{ console.log(error); }); } - joinCourseGroup = (ids, item) => { + joinCourseGroup = (ids, item, index) => { console.log('join ', ids, item) const courseId = this.props.match.params.coursesId @@ -263,7 +270,12 @@ class studentsList extends Component{ .then((response) => { if (response.data.status == 0) { this.props.showNotification('修改成功') - this.fetchAll() + const newArray = ids.map((item) => {return {id: item, name: this.state.course_groups_map[item]}}); + this.setState( + (prevState) => ({ + teachers : update(prevState.teachers, {[ this.state.page == 1 ? index - this.state.application_list.length : index]: { course_groups: {$set: newArray }}}) + })) + // this.fetchAll() } else { } }) From 71ccf425b68d776e2e5134abc64cd1b0b9847ae5 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 16:17:31 +0800 Subject: [PATCH 083/964] hasGraduationModule --- public/react/src/modules/courses/members/teacherList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 261bfab85..4432ecc60 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -573,7 +573,7 @@ class studentsList extends Component{
    • this.onSortTypeChange(ORDER_BY_NAME)} >姓名排序
    • this.onSortTypeChange(ORDER_BY_DATE)} style={{width: '125px'}}>加入时间排序
    • -
    • this.onSortTypeChange(ORDER_BY_GRADUATION_GROUP)} >答辩组排序
    • + {this.hasGraduationModule() &&
    • this.onSortTypeChange(ORDER_BY_GRADUATION_GROUP)} >答辩组排序
    • }
    } From 9011592e755394a40605dba1ce6defb7052a8967 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 16:22:46 +0800 Subject: [PATCH 084/964] 0 --- public/react/src/modules/courses/members/teacherList.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 4432ecc60..ac9d22119 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -57,7 +57,8 @@ function buildColumns(that) { title: '角色', dataIndex: 'role', key: 'role', - }, { + }] + that.course_groups && that.course_groups.length && columns.push({ title: 管理权限, width: 230, key: 'course_groups', @@ -110,7 +111,7 @@ function buildColumns(that) { ) } , - }]; + }); if (that.hasGraduationModule()) { columns.push({ title: '答辩组', From 425c19f3ea1ae9841b0055ff737996c2f4dbbf99 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 16:30:22 +0800 Subject: [PATCH 085/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/user/FindPasswordComponent.js | 5 +-- .../modules/user/LoginRegisterComponent.js | 34 ++++++++++--------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 41b8ec464..8dea3e521 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -279,7 +279,8 @@ class LoginRegisterComponent extends Component { } }).then((result) => { //验证有问题{"status":1,"message":"success"} - console.log(result); + // console.log(result); + this.openNotification("验证码已发送,请注意查收!",2); }).catch((error) => { @@ -370,7 +371,7 @@ class LoginRegisterComponent extends Component { { Phonenumberisnotco && Phonenumberisnotco != "" ?

    - {Phonenumberisnotco} + {Phonenumberisnotco}

    :
    } diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index d314effca..38ecbac45 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -361,11 +361,11 @@ class LoginRegisterComponent extends Component { } }).then((result) => { //验证有问题{"status":1,"message":"success"} - console.log(result); + // console.log(result); }).catch((error) => { - console.log(error); + // console.log(error); // this.setState({ // login:"", // logins:"", @@ -374,7 +374,6 @@ class LoginRegisterComponent extends Component { } //短信验证 SMSverification = () => { - var url = `/accounts/get_verification_code.json`; axios.get((url), { params: { @@ -383,7 +382,8 @@ class LoginRegisterComponent extends Component { } }).then((result) => { //验证有问题{"status":1,"message":"success"} - console.log(result); + // console.log(result); + this.openNotification("验证码已发送,请注意查收!",2); }).catch((error) => { @@ -412,7 +412,6 @@ class LoginRegisterComponent extends Component { //倒计时 getverificationcode = () => { - debugger if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) { if (this.state.logins&&this.state.logins.length === 0) { this.openNotification("请输入手机号或邮箱",2); @@ -509,13 +508,17 @@ class LoginRegisterComponent extends Component { this.setState({ tab:e.key }) - // console.log(e.key); - // if(e.key === 0){ - // this.props.Setlogins(1); - // }else{ - // this.props.Setlogins(2); - // - // } + console.log(e.key); + if(e.key === 0){ + this.setState({ + Phonenumberisnotcos:undefined + }) + }else{ + this.setState({ + Phonenumberisnotco:undefined + }) + + } // this.props.history.push(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/student_exercise_list?tab=`+e.key) @@ -590,12 +593,13 @@ class LoginRegisterComponent extends Component { onChange={this.loginInputonChange} name="username" className="font-14 color-grey-9" + onBlur={(e) => this.inputOnBlur(e, 1)} style={{marginTop: '30px', height: '38px'}}> { Phonenumberisnotco && Phonenumberisnotco != "" ?

    - {Phonenumberisnotco} + {Phonenumberisnotco}

    :
    } @@ -629,9 +633,7 @@ class LoginRegisterComponent extends Component { { Phonenumberisnotcos && Phonenumberisnotcos != "" ?

    - {/*{Phonenumberisnotcos}*/} - - 请输入手机号码 + {Phonenumberisnotcos}

    :
    From 7dcf103598c8eff8e7074626df030844ed488220 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 22 Jun 2019 16:52:34 +0800 Subject: [PATCH 086/964] fix --- .../tasks/GraduationTasksappraise.js | 17 ++-- .../tasks/GraduationTaskssettinglist.js | 99 ++++++++++--------- 2 files changed, 61 insertions(+), 55 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index 7807e7265..47f38746c 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -163,8 +163,8 @@ class GraduationTasksappraise extends Component{

    - {/* {datalist&&datalist.course_name}*/} - {/*>*/} + {datalist&&datalist.course_name} + > {datalist&&datalist.graduation_name} > 任务详情 @@ -182,23 +182,22 @@ class GraduationTasksappraise extends Component{ ` } -

    -

    {datalist&&datalist.task_name}

    +
    +

    {datalist&&datalist.task_name}

    - 返回 + 返回 {this.props.isStudent()? datalist&&datalist.task_status===2? - 补交附件:"" + 补交附件:"" :""}
    -
    +
    内容 @@ -251,7 +250,7 @@ class GraduationTasksappraise extends Component{ {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.length===0?"":
    -
    +
    补交附件
    diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index b681388f8..752d61d33 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -621,17 +621,17 @@ class GraduationTaskssettinglist extends Component{ title: '序号', dataIndex: 'number', key: 'number', - + className:'edu-txt-center' }, { title: '姓名', dataIndex: 'name', key: 'name', - + className:'edu-txt-center' }, { title: '学号', dataIndex: 'stduynumber', key: 'stduynumber', - + className:'edu-txt-center', render: (text, record) => ( {record.stduynumber} @@ -641,7 +641,7 @@ class GraduationTaskssettinglist extends Component{ title: '分班', key: 'classroom', dataIndex: 'classroom', - + className:'edu-txt-center', render: (text, record) => ( {record.classroom==="未分班"?"--":record.classroom} @@ -650,7 +650,8 @@ class GraduationTaskssettinglist extends Component{ }, { title: '分组', key: 'grouping', - dataIndex: 'grouping', + dataIndex: 'grouping', + className:'edu-txt-center', render: (text, record) => ( {record.grouping} @@ -659,7 +660,7 @@ class GraduationTaskssettinglist extends Component{ title: '关联项目', dataIndex: 'associationitems', key: 'associationitems', - + className:'edu-txt-center', render: (text, record) => (
    @@ -671,7 +672,7 @@ class GraduationTaskssettinglist extends Component{ title: '提交状态', dataIndex: 'submitstate', key: 'submitstate', - + className:'edu-txt-center', render: (text, record) => ( {record.submitstate} @@ -681,7 +682,7 @@ class GraduationTaskssettinglist extends Component{ title: '更新时间', dataIndex: 'turnovertime', key: 'turnovertime', - + className:'edu-txt-center', render: (text, record) => ( @@ -693,7 +694,7 @@ class GraduationTaskssettinglist extends Component{ title: '教师评分', key: 'teacherrating', dataIndex: 'teacherrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -705,7 +706,7 @@ class GraduationTaskssettinglist extends Component{ title: '交叉评分', key: 'crossrating', dataIndex: 'crossrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -717,7 +718,7 @@ class GraduationTaskssettinglist extends Component{ title: '最终成绩', key: 'finalscore', dataIndex: 'finalscore', - + className:'edu-txt-center', render: (text, record) => ( @@ -728,7 +729,8 @@ class GraduationTaskssettinglist extends Component{ }, { title: '操作', key: 'operation', - dataIndex: 'operation', + dataIndex: 'operation', + className:'edu-txt-center', render: operation => (
    {this.props.isAdmin()?operation.map((tag,key) => { @@ -772,17 +774,17 @@ class GraduationTaskssettinglist extends Component{ title: '序号', dataIndex: 'number', key: 'number', - + className:'edu-txt-center', }, { title: '姓名', dataIndex: 'name', key: 'name', - + className:'edu-txt-center', }, { title: '学号', dataIndex: 'stduynumber', key: 'stduynumber', - + className:'edu-txt-center', render: (text, record) => ( {record.stduynumber} @@ -791,7 +793,8 @@ class GraduationTaskssettinglist extends Component{ },{ title: '分组', key: 'grouping', - dataIndex: 'grouping', + dataIndex: 'grouping', + className:'edu-txt-center', render: (text, record) => ( {record.grouping} @@ -800,7 +803,7 @@ class GraduationTaskssettinglist extends Component{ title: '关联项目', dataIndex: 'associationitems', key: 'associationitems', - + className:'edu-txt-center', render: (text, record) => (
    @@ -812,7 +815,7 @@ class GraduationTaskssettinglist extends Component{ title: '提交状态', dataIndex: 'submitstate', key: 'submitstate', - + className:'edu-txt-center', render: (text, record) => ( {record.submitstate} @@ -822,7 +825,7 @@ class GraduationTaskssettinglist extends Component{ title: '更新时间', dataIndex: 'turnovertime', key: 'turnovertime', - + className:'edu-txt-center', render: (text, record) => ( @@ -834,7 +837,7 @@ class GraduationTaskssettinglist extends Component{ title: '教师评分', key: 'teacherrating', dataIndex: 'teacherrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -846,7 +849,7 @@ class GraduationTaskssettinglist extends Component{ title: '交叉评分', key: 'crossrating', dataIndex: 'crossrating', - className:'none', + className:'none edu-txt-center', render: (text, record) => ( @@ -858,7 +861,7 @@ class GraduationTaskssettinglist extends Component{ title: '最终成绩', key: 'finalscore', dataIndex: 'finalscore', - + className:'edu-txt-center', render: (text, record) => ( @@ -870,6 +873,7 @@ class GraduationTaskssettinglist extends Component{ title: '操作', key: 'operation', dataIndex: 'operation', + className:'edu-txt-center', render: operation => (
    {this.props.isAdmin()?operation.map((tag,key) => { @@ -918,17 +922,17 @@ class GraduationTaskssettinglist extends Component{ title: '序号', dataIndex: 'number', key: 'number', - + className:'edu-txt-center', }, { title: '姓名', dataIndex: 'name', key: 'name', - + className:'edu-txt-center', }, { title: '学号', dataIndex: 'stduynumber', key: 'stduynumber', - + className:'edu-txt-center', render: (text, record) => ( {record.stduynumber} @@ -938,7 +942,7 @@ class GraduationTaskssettinglist extends Component{ title: '分班', key: 'classroom', dataIndex: 'classroom', - + className:'edu-txt-center', render: (text, record) => ( {record.classroom==="未分班"?"--":record.classroom} @@ -948,6 +952,7 @@ class GraduationTaskssettinglist extends Component{ title: '分组', key: 'grouping', dataIndex: 'grouping', + className:'edu-txt-center', render: (text, record) => ( {record.grouping} @@ -956,7 +961,7 @@ class GraduationTaskssettinglist extends Component{ title: '关联项目', dataIndex: 'associationitems', key: 'associationitems', - + className:'edu-txt-center', render: (text, record) => (
    @@ -969,7 +974,7 @@ class GraduationTaskssettinglist extends Component{ title: '提交状态', dataIndex: 'submitstate', key: 'submitstate', - + className:'edu-txt-center', render: (text, record) => ( {record.submitstate} @@ -979,7 +984,7 @@ class GraduationTaskssettinglist extends Component{ title: '更新时间', dataIndex: 'turnovertime', key: 'turnovertime', - + className:'edu-txt-center', render: (text, record) => ( @@ -991,7 +996,7 @@ class GraduationTaskssettinglist extends Component{ title: '教师评分', key: 'teacherrating', dataIndex: 'teacherrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -1003,7 +1008,7 @@ class GraduationTaskssettinglist extends Component{ title: '交叉评分', key: 'crossrating', dataIndex: 'crossrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -1015,7 +1020,7 @@ class GraduationTaskssettinglist extends Component{ title: '最终成绩', key: 'finalscore', dataIndex: 'finalscore', - + className:'edu-txt-center', render: (text, record) => ( @@ -1027,6 +1032,7 @@ class GraduationTaskssettinglist extends Component{ title: '操作', key: 'operation', dataIndex: 'operation', + className:'edu-txt-center', render: operation => (
    {this.props.isAdmin()?operation.map((tag,key) => { @@ -1070,17 +1076,17 @@ class GraduationTaskssettinglist extends Component{ title: '序号', dataIndex: 'number', key: 'number', - + className:'edu-txt-center', }, { title: '姓名', dataIndex: 'name', key: 'name', - + className:'edu-txt-center', }, { title: '学号', dataIndex: 'stduynumber', key: 'stduynumber', - + className:'edu-txt-center', render: (text, record) => ( {record.stduynumber} @@ -1090,6 +1096,7 @@ class GraduationTaskssettinglist extends Component{ title: '分组', key: 'grouping', dataIndex: 'grouping', + className:'edu-txt-center', render: (text, record) => ( {record.grouping} @@ -1098,7 +1105,7 @@ class GraduationTaskssettinglist extends Component{ title: '关联项目', dataIndex: 'associationitems', key: 'associationitems', - + className:'edu-txt-center', render: (text, record) => (
    @@ -1112,7 +1119,7 @@ class GraduationTaskssettinglist extends Component{ title: '提交状态', dataIndex: 'submitstate', key: 'submitstate', - + className:'edu-txt-center', render: (text, record) => ( {record.submitstate} @@ -1122,7 +1129,7 @@ class GraduationTaskssettinglist extends Component{ title: '更新时间', dataIndex: 'turnovertime', key: 'turnovertime', - + className:'edu-txt-center', render: (text, record) => ( @@ -1134,7 +1141,7 @@ class GraduationTaskssettinglist extends Component{ title: '教师评分', key: 'teacherrating', dataIndex: 'teacherrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -1146,7 +1153,7 @@ class GraduationTaskssettinglist extends Component{ title: '交叉评分', key: 'crossrating', dataIndex: 'crossrating', - + className:'edu-txt-center', render: (text, record) => ( @@ -1158,7 +1165,7 @@ class GraduationTaskssettinglist extends Component{ title: '最终成绩', key: 'finalscore', dataIndex: 'finalscore', - + className:'edu-txt-center', render: (text, record) => ( @@ -1170,6 +1177,7 @@ class GraduationTaskssettinglist extends Component{ title: '操作', key: 'operation', dataIndex: 'operation', + className:'edu-txt-center', render: operation => (
    {this.props.isAdmin()?operation.map((tag,key) => { @@ -1359,13 +1367,12 @@ class GraduationTaskssettinglist extends Component{ 任务详情

    -
    -

    {taskslistdata.task_name}

    +
    @@ -1448,7 +1455,7 @@ class GraduationTaskssettinglist extends Component{ {taskslistdata.search_assistants && taskslistdata.search_assistants.teacher_comment && taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ return( - {item.name} + {item.name} ({item.count}) From fe5f2e4cb2c3c03c9a943ef8a9fd0fdb18b8a853 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 22 Jun 2019 17:04:34 +0800 Subject: [PATCH 087/964] =?UTF-8?q?tpi=E5=B7=A6=E5=8F=B3=E6=AF=94=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/context/TPIContextProvider.js | 2 +- public/react/src/modules/page/MainContent.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index c272df699..d5d8715f5 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -417,7 +417,7 @@ pop_box_new(htmlvalue, 480, 182); */ let user = resData.user; user.username = resData.user.name; - // user.user_url = resData.user_url; + user.user_url = `/user/${resData.user.login}`; // user.image_url = resData.image_url; user.is_teacher = resData.is_teacher; resData.user = user; diff --git a/public/react/src/modules/page/MainContent.js b/public/react/src/modules/page/MainContent.js index c49b037f9..bb1cd11fc 100644 --- a/public/react/src/modules/page/MainContent.js +++ b/public/react/src/modules/page/MainContent.js @@ -61,7 +61,7 @@ class MainContent extends Component { `}
    + id="game_left_contents" style={{ width: '40%'}}> {/* style={{width: '694px'}} */} {/* 左侧任务说明等功能的区域 */} From adfdb8e35731c1b0751beb76efcc456fa627fded Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 17:20:38 +0800 Subject: [PATCH 088/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/graduation/tasks/GraduationTasksSubmitnew.js | 2 +- public/react/src/modules/tpm/NewHeader.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index a9ea6d002..fd0e265c5 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -627,7 +627,7 @@ render(){
    - + 取消
    diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index ecbc8570b..2d1451d6b 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -330,14 +330,15 @@ class NewHeader extends Component { }) } educoderlogin=()=>{ - //登出账号 + //退出账号 var url = `/accounts/logout.json`; axios.get((url)).then((result) => { if(result!==undefined){ - this.setState({ - isRender:true - }) + // this.setState({ + // isRender:true + // }) + window.location.href = "/"; } }).catch((error) => { console.log(error); From 9ab9cc7ce27a4879b716fdb2d0dadf32bde471ac 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, 22 Jun 2019 17:30:37 +0800 Subject: [PATCH 089/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTasksSubmitedit.js | 48 ++++++++-- .../tasks/GraduationTasksSubmitnew.js | 53 ++++++++--- .../tasks/GraduationTaskssettinglist.js | 2 +- .../modules/user/LoginRegisterComponent.js | 3 +- public/react/src/modules/user/common.css | 94 ++++++++++--------- 5 files changed, 128 insertions(+), 72 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index ec1cf4e48..cad289855 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -1,5 +1,5 @@ import React,{Component} from "React"; -import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Spin} from "antd"; +import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Spin,Tooltip} from "antd"; import {Link} from 'react-router-dom'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import { WordsBtn,getUrl } from 'educoder'; @@ -571,7 +571,7 @@ class GraduationTasksSubmitedit extends Component{
    成员要求:2~5人
    - + -
    +
    - {memberslist&&memberslist.members.map((item,key)=>{ + {memberslist===undefined?"":memberslist.members.length===0?
    +
    + +

    未找到包含{search}的学生

    +
    +
    :memberslist&&memberslist.members.map((item,key)=>{ return(
    - -
    {item.user_name}
    -
    {item.group_name}
    -
    {item.student_id}
    -
    {item.commit_status===true?已提交 :""}
    + { + return parseInt(task_status[key])===item.user_id?true:false + }) + } + disabled={item.commit_status===true?true:false} className="fl "> + +
    {item.user_name}
    +
    +
    {item.group_name}
    +
    {item.student_id}
    +
    {item.commit_status===false?已提交 :""}
    ) })} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index e1284832c..1c72433b6 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -2,7 +2,7 @@ import React,{Component} from "React"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Tooltip,Spin} from "antd"; import {Link} from 'react-router-dom'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; -import { WordsBtn,getUrl } from 'educoder'; +import { WordsBtn,getUrl,getImageUrl} from 'educoder'; import axios from 'axios'; import Modals from '../../../modals/Modals'; const Search = Input.Search; @@ -354,7 +354,6 @@ class GraduationTasksSubmitnew extends Component{ let newlist =memberslist.members; let newcheckedValues=checkedValues; let selects=[]; - selects.push(selectobjct) for(var i=0; i成员要求:2~5人
    @@ -548,17 +558,31 @@ render(){
    - {memberslist&&memberslist.members.map((item,key)=>{ + {memberslist===undefined?"":memberslist.members.length===0? +
    +
    + +

    未找到包含{search}的学生

    +
    +
    :memberslist&&memberslist.members.map((item,key)=>{ + return(
    - -
    {item.user_name}
    -
    {item.group_name}
    -
    {item.student_id}
    -
    {item.commit_status===true?已提交 :""}
    + { + return parseInt(task_status[key])===item.user_id?true:false + }) + } + disabled={item.commit_status===true?true:false} className="fl "> + +
    {item.user_name}
    +
    +
    {item.group_name}
    +
    {item.student_id}
    +
    {item.commit_status===true?已提交 :""}
    ) })} @@ -584,12 +608,13 @@ render(){ height: '30px', display:item.user_name===undefined?"none":"" }}> - -
    {item.user_name}
    + +
    {item.user_name}
    -
    {item.group_name}
    -
    {item.student_id}
    - {key>0?
    this.delecttask_status(item.user_id)}>
    :""} +
    {item.group_name}
    +
    {item.student_id}
    + {key>0?
    this.delecttask_status(item.user_id)}>
    :""} +
    ) })} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 3971cab0f..52c12d069 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -92,7 +92,7 @@ class GraduationTaskssettinglist extends Component{ for (var i = 0; i < worklists.length; i++) { datalist.push({ name: worklists[i].name, - number: (parseInt(page)-1)*parseInt(limit)+(i+1), + number: (parseInt(pages)-1)*parseInt(limit)+(i+1), stduynumber: worklists[i].student_id, classroom: worklists[i].class_grouping_name, grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null, diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 846000984..800453b36 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -576,6 +576,7 @@ class LoginRegisterComponent extends Component { { @@ -605,7 +606,7 @@ class LoginRegisterComponent extends Component { { parseInt(tab[0])==1 &&
    - Date: Sat, 22 Jun 2019 17:41:20 +0800 Subject: [PATCH 090/964] =?UTF-8?q?=E6=88=91=E7=9A=84=E5=AE=9E=E8=AE=AD-im?= =?UTF-8?q?ages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTaskssettinglist.js | 32 +++++++++++-------- .../src/modules/user/usersInfo/InfosShixun.js | 2 +- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 752d61d33..5907674b5 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1279,6 +1279,9 @@ class GraduationTaskssettinglist extends Component{ text-overflow: ellipsis; white-space: nowrap; } + .ant-table-tbody > tr:last-child > td{ + border:none!important; + } ` } @@ -1545,21 +1548,22 @@ class GraduationTaskssettinglist extends Component{
    - {this.props.isAdmin()?{taskslistdata&&taskslistdata.work_count}个检索结果({taskslistdata&&taskslistdata.work_count} 学生) :""} - {this.props.isAdmin()?
    -

    - - {order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序 -

    -
      -
    • this.funorder("updated_at")}>更新时间 -
    • -
    • this.funorder("work_score" )}>最终成绩 -
    • -
    • this.funorder("student_id" )}>学生学号 + {this.props.isAdmin()?{taskslistdata&&taskslistdata.work_count}个检索结果({taskslistdata&&taskslistdata.work_count} 学生) :""} + { + this.props.isAdmin() ? +
      +
    • + {order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序 + +
    • -
    -
    :""} +
    + :"" + }
    diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js index d6835098a..2a1210faf 100644 --- a/public/react/src/modules/user/usersInfo/InfosShixun.js +++ b/public/react/src/modules/user/usersInfo/InfosShixun.js @@ -171,7 +171,7 @@ class InfosShixun extends Component{ item.tag &&
    {item.tag}
    } - Shixun6 + Shixun6

    From e3e5db246c3716893c767fe96e607ae1fed07348 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 17:47:54 +0800 Subject: [PATCH 091/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 1 + .../exercise/Studentshavecompletedthelist.js | 8 +- public/react/src/modules/login/LoginDialog.js | 1175 +++++++++-------- public/react/src/modules/tpm/NewHeader.js | 25 +- 4 files changed, 607 insertions(+), 602 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 94a1f5e44..bd3bb68fa 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -114,6 +114,7 @@ export function initAxiosInterceptors(props) { notification.open({ message:"提示", description: response.data.message || '服务器异常,请联系管理员。', + }); // notification['error']({ // message:"提示", diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index 64cfaee64..7d0a0b54e 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -2030,7 +2030,7 @@ class Studentshavecompletedthelist extends Component { //===0 不包括主观题 if (indexi === exercise_users.length) { //都没评论 不显示评论 - if (response.data.poll_types.groups_count > 0) { + if (response.data.exercise_types.groups_count > 0) { // console.log("77771111111"); //分班大于0显示分班 //7ge @@ -2273,7 +2273,7 @@ class Studentshavecompletedthelist extends Component { } else { //已经评论 // response.data.course_groups.length - if (response.data.poll_types.groups_count > 0) { + if (response.data.exercise_types.groups_count > 0) { //显示分班 //8ge this.setState({ @@ -2546,7 +2546,7 @@ class Studentshavecompletedthelist extends Component { //包括主观题 if (indexi === exercise_users.length) { console.log("2548包含主观题不包含分班"); - if (response.data.poll_types.groups_count> 0){ + if (response.data.exercise_types.groups_count> 0){ this.setState({ data: datalist, teacherlist: teacherlist, @@ -2837,7 +2837,7 @@ class Studentshavecompletedthelist extends Component { } } else { console.log("2699包含主观题包含分班"); - if (response.data.poll_types.groups_count> 0) { + if (response.data.exercise_types.groups_count> 0) { this.setState({ data: datalist, teacherlist: teacherlist, diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 28198216c..1dcfd1386 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -1,587 +1,588 @@ -import React, { Component } from 'react'; -import { Redirect } from 'react-router'; - -import Dialog, { - DialogActions, - DialogContent, - DialogContentText, - DialogTitle, -} from 'material-ui/Dialog'; - - -import axios from 'axios'; - -import './LoginDialog.css'; -import { broadcastChannelPostMessage } from 'educoder' - -const $ = window.$; -var wait = 60; -function time(btn){ - if (wait==0) { - $(btn).addClass("btn_orange_bg"); - btn.removeAttribute("disabled"); - btn.innerHTML = "获取验证码"; - wait = 60; - return; - }else{ - $(btn).removeClass("btn_orange_bg"); - btn.setAttribute("disabled", "disabled"); - btn.innerHTML = wait + "s后重试"; - wait--; - } - setTimeout(function(){ - time(btn); - },1000); -} -function get_login_verification_code(btn) { - if($(btn).attr("disabled")) { - return false; - } else { - if (/^1\d{10}$/.test($("#pass_name_input").val()) || /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test($("#pass_name_input").val())){ - if(!window.IsPC() || $('#quick-drag .drag_text').html() == "验证通过") { - $("#passlogin_error_notice").hide(); - btn.setAttribute("disabled", "disabled"); - var val = ''; - var type = 6; - if(/^1\d{10}$/.test($("#pass_name_input").val())){ - type = 6; - } else if(/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test($("#pass_name_input").val())){ - type = 7; - } - $.get( - 'https://www.educoder.net/account/get_verification_code', - { value: $('#pass_name_input').val().trim(), - type: type}, - function (data) { - if (data.status == "2") { - if(type == 6){ - $("#pass_name_input").next().find("p").html("该手机号尚未注册,你可以去注册").show(); - } else{ - $("#pass_name_input").next().find("p").html("该邮箱尚未绑定,你可以登录后去绑定").show(); - } - } else { - $("#pass_name_input").next().find("p").hide(); - if(type == 6){ - $("#send_code_notice").html(data.msg).show(); - } else{ - var uurl = window.gotoEmail(data.link); - $("#send_code_notice").html("验证码已经发送到您的邮箱,去查收").show(); - } - time(btn); - } - }); - } else{ - $("#passlogin_error_notice").show(); - } - } - } -} - - -class LoginDialog extends Component { - constructor(props) { - super(props) - this.state = { - open: true, - login:0, - speedy:1, - regular:0, - loginValue:'', - passValue:'', - isGoing:true, - isGoingValue:1, - disabled:true, - bottonclass:'log-botton mt5', - dialogBox:'dialogBox', - shortcutValue:'', - shortcutnum:1, - disabledType:true, - gaincode:'gain-code', - authCodeType:true, - authCodeclass:'log-botton mt5', - isRender: false, - - }; - } - enter=(num) =>{ - this.setState({login:num,speedy:1,dialogBox:'dialogBox'}); - } - - register=(num) =>{ - this.setState({login:1,speedy:num,dialogBox:'dialogBox2'}); - } - - loginChange = () =>{ - let reg = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/; - let reg1 = /^1\d{10}$/; - let reg2=/^[a-zA-z]\w{3,14}$/; - let value=this.refs.loginPassText.value; - let valuenum= value.length; - if(valuenum>0){ - if(!reg.test(value)&&!reg1.test(value)&&!reg2.test(value)){ - this.setState({regular:1}) - return - }else{ - this.setState({loginValue:value}) - this.setState({regular:0}) - } - }else{ - this.setState({loginValue:value}) - } - } - - passwordChange = () =>{ - let value =this.refs.passwordText.value; - - let valuenum= value.length; - this.setState({disabled:false}) - this.setState({bottonclass:'log-botton mt5 edu-back-blue'}) - if(valuenum==0){ - this.setState({bottonclass:'log-botton mt5'}) - this.setState({disabled:true}) - } - this.setState({passValue:value}) - } - - handleInputChange =(event)=> { - const target = event.target; - const value = target.type === 'checkbox' ? target.checked : target.value; - const name = target.name; - - this.setState({[name]:value}) - - if(value===true){ - this.setState({isGoingValue:1}) - }else{ - this.setState({isGoingValue:0}) - } - - } - - // 快捷注册 - shortcutIdChange=()=>{ - let reg = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/; - let reg1 = /^1\d{10}$/; - let reg2=/^[a-zA-z]\w{3,14}$/; - let value=this.refs.shortcutText.value; - let valuenum= value.length; - if(valuenum>0){ - if(!reg.test(value)&&!reg1.test(value)&&!reg2.test(value)){ - this.setState({shortcutnum:0}) - this.setState({disabledType:true}) - this.setState({gaincode : 'gain-code'}) - return - }else{ - this.setState({gaincode : 'gain-code edu-back-blue'}) - this.setState({shortcutValue:value}) - this.setState({shortcutnum:1}) - this.setState({disabledType:false}) - } - - - }else{ - this.setState({shortcutValue:value}) - - } - - } - authCodeChange=()=>{ - - let value=this.refs.authCodeText.value; - let valuenum= value.length; - if(valuenum>3){ - this.setState({authCodeType:false}) - this.setState({authCodeclass:'log-botton mt5 edu-back-blue'}) - }else if(valuenum==0){ - this.setState({authCodeType:true}) - this.setState({authCodeclass:'log-botton mt5'}) - } - } - get_login_verification_code=()=>{ - get_login_verification_code($('#get_verification_code')[0]) - } - dragWrapper=() =>{ - const $ = window.$ - $.fn.drag = function(options) { - - var x, drag = this, isMove = false, defaults = { - }; - var options = $.extend(defaults, options); - var handler = drag.find('.handler'); - var drag_bg = drag.find('.drag_bg'); - var text = drag.find('.drag_text'); - var maxWidth = 100 - //鼠标按下时候的x轴的位置 - handler.mousedown(function(e) { - isMove = true; - x = e.pageX - parseInt(handler.css('left'), 10); - maxWidth = drag.width() - handler.width() - 2; //能滑动的最大间距 - }); - $(document).mousemove(function(e) { - var _x = e.pageX - x;// _x = e.pageX - (e.pageX - parseInt(handler.css('left'), 10)) = x - if (isMove) { - - if (_x > 0 && _x <= maxWidth) { - handler.css({'left': _x}); - drag_bg.css({'width': _x}); - } else if (_x > maxWidth) { //鼠标指针移动距离达到最大时清空事件 - dragOk(); - } - } - }).mouseup(function(e) { - isMove = false; - var _x = e.pageX - x; - if (_x < maxWidth) { //鼠标松开时,如果没有达到最大距离位置,滑块就返回初始位置 - handler.css({'left': 0}); - drag_bg.css({'width': 0}); - } - }); - - //清空事件 - function dragOk() { - handler.removeClass('handler_bg').addClass('handler_ok_bg'); - text.removeClass('slidetounlock').text('验证通过').css({'color':'#fff'}); //modify - // drag.css({'color': '#fff !important'}); - - handler.css({'left': maxWidth}); // add - drag_bg.css({'width': maxWidth}); // add - - handler.unbind('mousedown'); - $(document).unbind('mousemove'); - $(document).unbind('mouseup'); - - } - } - - setTimeout(()=>{ - $('#quick-drag').drag(); - }, 4000) - } - - componentWillReceiveProps(nextProps) { - - this.setState({ - isRender:nextProps.isRender - }) - // console.log(nextProps.isRender); - - } - - componentDidMount() { - - if(this.props.isRender!=undefined){ - this.setState({ - isRender:this.props.isRender - }) - } - - // $(document).on("showLoginDialog", (e, args)=>{ - // this.setState({ - // isRender: true - // }) - // }) - - this.dragWrapper(); - - axios.interceptors.response.use((response) => { - if(response!=undefined) - if (response&&response.data.status === 401) { - this.setState({ - isRender: true - }) - } - return response; - }, (error) => { - // // if (error.response && error.response.data.error === '401 Unauthorized') { - // // this.back_url = window.location.href; - // // this.setState({ - // // isRender: true - // // }) - // // // TODO 这里如果样式变了会出现css不加载的情况 - // // const $ = window.$; - // // const isCssLoaded = window.getComputedStyle($('.log_nav li.active')[0], null) - // // .getPropertyValue('border-bottom') - // // == "2px solid rgb(69, 155, 229)" - // // if (!isCssLoaded) { - // // const isPort3007 = window.location.port == 3007; - // // let _url_origin = isPort3007 ? 'http://localhost:3000' : '' - // // - // // $('head').append( $('') - // // .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css`) ); - // // $('head').append( $('') - // // .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css`) ); - // // } - // // } - // // return Promise.reject(error); - }); - } - handleDialogClose() { - this.setState({ - isRender: false - }) - window.location.href="/"; - } - - loginEDU=()=>{ - let {loginValue,passValue,regular,isGoingValue}=this.state; - if(regular===1){ - return - } - let newloginValue=loginValue.replace(/(^\s*)|(\s*$)/g, ""); - let newpassValue=passValue.replace(/(^\s*)|(\s*$)/g, ""); - - let url='/accounts/login.json' - axios.post(url, { - login:newloginValue, - password:newpassValue, - autologin:isGoingValue - } - ).then((response) => { - if(response===undefined){ - return - } - if(response.status===200){ - if (response.data.status === 402) { - window.location.href = response.data.url; - }else{ - broadcastChannelPostMessage('refreshPage') - this.setState({ - isRender:false - }) - window.location.reload(); - } - } - - }).catch((error) => { - console.log(error) - }) - } - onKeydowns=(e)=>{ - let {disabled}=this.state; - if( disabled===false&& e.keyCode === 13){ - this.loginEDU() - console.log(1) - } - } - render() { - let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass, - dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender}=this.state; - - if (isRender === undefined) { - isRender = false - } - - return ( -

    this.handleDialogClose()} - > -
    -
    {this.handleDialogClose()}}> - -
    - -
    -
      -
    • {this.enter(0)}}>登录
    • - {/*
    • {this.register(0)}}>快捷登录
    • */} -
    - - -
    -
    - -
    - - -
    - - - - -

    请输入有效的手机号/邮箱号/用户名

    - -
    - - -
    -

    - 请输入密码 -

    -
    -
    - - - {/**/} - -
    - 登录 -
    - -

    - - - - - - - - 忘记密码 - 注册 - - -

    - -
    -
    - - {/*快捷登录*/} - - - -
    -
    - -
    - - ); - } - -} - -export default LoginDialog ; - - -// onkeypress="user_login_keypress(event);" - -// onkeypress="user_login_keypress(event);" - - -{/*
    -
    -
    -

    -
    -
    } - - - -{/*第三方账号登录*/} - -{/*
    -

    第三方账号登录

    -
    - - - -
    -
    } - -// -// {/*
    */} -// {/*
    */} -// {/*
    */} -// {/**/} -// {/**/} -// {/*
    */} -// {/**/} -// {/**/} -// {/**/} -// {/*
    */} -// {/*

    请输入有效的手机号/邮箱号*/} -// {/*

    */} -// {/*
    */} -// -// {/*
    */} -// {/*/!*drag*/ }*/} -// {/*
    */} -// {/*
    */} -// {/*
    */} -// {/*请按住滑块,拖动到最右边*/} -// {/*
    */} -// {/*
    */} -// {/*
    */} -// {/*
    */} -// {/*

    请先拖动滑块完成验证

    */} -// {/*
    */} -// {/*
    */} -// -// {/*

    */} -// {/**/} -// {/**/} -// {/**/} -// {/*

    */} -// -// {/*
    */} -// {/*

    */} -// {/*请输入验证码*/} -// {/*

    */} -// {/*
    */} -// -// {/**/} -// -// {/*

    */} -// -// {/**/} -// {/**/} -// {/**/} -// {/**/} -// -// {/**/} -// {/*忘记密码*/} -// {/*注册*/} -// {/**/} -// -// {/*

    */} -// {/**/} -// {/*
    */} +import React, { Component } from 'react'; +import { Redirect } from 'react-router'; + +import Dialog, { + DialogActions, + DialogContent, + DialogContentText, + DialogTitle, +} from 'material-ui/Dialog'; + + +import axios from 'axios'; + +import './LoginDialog.css'; +import { broadcastChannelPostMessage } from 'educoder' + +const $ = window.$; +var wait = 60; +function time(btn){ + if (wait==0) { + $(btn).addClass("btn_orange_bg"); + btn.removeAttribute("disabled"); + btn.innerHTML = "获取验证码"; + wait = 60; + return; + }else{ + $(btn).removeClass("btn_orange_bg"); + btn.setAttribute("disabled", "disabled"); + btn.innerHTML = wait + "s后重试"; + wait--; + } + setTimeout(function(){ + time(btn); + },1000); +} +function get_login_verification_code(btn) { + if($(btn).attr("disabled")) { + return false; + } else { + if (/^1\d{10}$/.test($("#pass_name_input").val()) || /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test($("#pass_name_input").val())){ + if(!window.IsPC() || $('#quick-drag .drag_text').html() == "验证通过") { + $("#passlogin_error_notice").hide(); + btn.setAttribute("disabled", "disabled"); + var val = ''; + var type = 6; + if(/^1\d{10}$/.test($("#pass_name_input").val())){ + type = 6; + } else if(/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test($("#pass_name_input").val())){ + type = 7; + } + $.get( + 'https://www.educoder.net/account/get_verification_code', + { value: $('#pass_name_input').val().trim(), + type: type}, + function (data) { + if (data.status == "2") { + if(type == 6){ + $("#pass_name_input").next().find("p").html("该手机号尚未注册,你可以去注册").show(); + } else{ + $("#pass_name_input").next().find("p").html("该邮箱尚未绑定,你可以登录后去绑定").show(); + } + } else { + $("#pass_name_input").next().find("p").hide(); + if(type == 6){ + $("#send_code_notice").html(data.msg).show(); + } else{ + var uurl = window.gotoEmail(data.link); + $("#send_code_notice").html("验证码已经发送到您的邮箱,去查收").show(); + } + time(btn); + } + }); + } else{ + $("#passlogin_error_notice").show(); + } + } + } +} + + +class LoginDialog extends Component { + constructor(props) { + super(props) + this.state = { + open: true, + login:0, + speedy:1, + regular:0, + loginValue:'', + passValue:'', + isGoing:true, + isGoingValue:1, + disabled:true, + bottonclass:'log-botton mt5', + dialogBox:'dialogBox', + shortcutValue:'', + shortcutnum:1, + disabledType:true, + gaincode:'gain-code', + authCodeType:true, + authCodeclass:'log-botton mt5', + isRender: false, + + }; + } + enter=(num) =>{ + this.setState({login:num,speedy:1,dialogBox:'dialogBox'}); + } + + register=(num) =>{ + this.setState({login:1,speedy:num,dialogBox:'dialogBox2'}); + } + + loginChange = () =>{ + let reg = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/; + let reg1 = /^1\d{10}$/; + let reg2=/^[a-zA-z]\w{3,14}$/; + let value=this.refs.loginPassText.value; + let valuenum= value.length; + if(valuenum>0){ + if(!reg.test(value)&&!reg1.test(value)&&!reg2.test(value)){ + this.setState({regular:1}) + return + }else{ + this.setState({loginValue:value}) + this.setState({regular:0}) + } + }else{ + this.setState({loginValue:value}) + } + } + + passwordChange = () =>{ + let value =this.refs.passwordText.value; + + let valuenum= value.length; + this.setState({disabled:false}) + this.setState({bottonclass:'log-botton mt5 edu-back-blue'}) + if(valuenum==0){ + this.setState({bottonclass:'log-botton mt5'}) + this.setState({disabled:true}) + } + this.setState({passValue:value}) + } + + handleInputChange =(event)=> { + const target = event.target; + const value = target.type === 'checkbox' ? target.checked : target.value; + const name = target.name; + + this.setState({[name]:value}) + + if(value===true){ + this.setState({isGoingValue:1}) + }else{ + this.setState({isGoingValue:0}) + } + + } + + // 快捷注册 + shortcutIdChange=()=>{ + let reg = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/; + let reg1 = /^1\d{10}$/; + let reg2=/^[a-zA-z]\w{3,14}$/; + let value=this.refs.shortcutText.value; + let valuenum= value.length; + if(valuenum>0){ + if(!reg.test(value)&&!reg1.test(value)&&!reg2.test(value)){ + this.setState({shortcutnum:0}) + this.setState({disabledType:true}) + this.setState({gaincode : 'gain-code'}) + return + }else{ + this.setState({gaincode : 'gain-code edu-back-blue'}) + this.setState({shortcutValue:value}) + this.setState({shortcutnum:1}) + this.setState({disabledType:false}) + } + + + }else{ + this.setState({shortcutValue:value}) + + } + + } + authCodeChange=()=>{ + + let value=this.refs.authCodeText.value; + let valuenum= value.length; + if(valuenum>3){ + this.setState({authCodeType:false}) + this.setState({authCodeclass:'log-botton mt5 edu-back-blue'}) + }else if(valuenum==0){ + this.setState({authCodeType:true}) + this.setState({authCodeclass:'log-botton mt5'}) + } + } + get_login_verification_code=()=>{ + get_login_verification_code($('#get_verification_code')[0]) + } + dragWrapper=() =>{ + const $ = window.$ + $.fn.drag = function(options) { + + var x, drag = this, isMove = false, defaults = { + }; + var options = $.extend(defaults, options); + var handler = drag.find('.handler'); + var drag_bg = drag.find('.drag_bg'); + var text = drag.find('.drag_text'); + var maxWidth = 100 + //鼠标按下时候的x轴的位置 + handler.mousedown(function(e) { + isMove = true; + x = e.pageX - parseInt(handler.css('left'), 10); + maxWidth = drag.width() - handler.width() - 2; //能滑动的最大间距 + }); + $(document).mousemove(function(e) { + var _x = e.pageX - x;// _x = e.pageX - (e.pageX - parseInt(handler.css('left'), 10)) = x + if (isMove) { + + if (_x > 0 && _x <= maxWidth) { + handler.css({'left': _x}); + drag_bg.css({'width': _x}); + } else if (_x > maxWidth) { //鼠标指针移动距离达到最大时清空事件 + dragOk(); + } + } + }).mouseup(function(e) { + isMove = false; + var _x = e.pageX - x; + if (_x < maxWidth) { //鼠标松开时,如果没有达到最大距离位置,滑块就返回初始位置 + handler.css({'left': 0}); + drag_bg.css({'width': 0}); + } + }); + + //清空事件 + function dragOk() { + handler.removeClass('handler_bg').addClass('handler_ok_bg'); + text.removeClass('slidetounlock').text('验证通过').css({'color':'#fff'}); //modify + // drag.css({'color': '#fff !important'}); + + handler.css({'left': maxWidth}); // add + drag_bg.css({'width': maxWidth}); // add + + handler.unbind('mousedown'); + $(document).unbind('mousemove'); + $(document).unbind('mouseup'); + + } + } + + setTimeout(()=>{ + $('#quick-drag').drag(); + }, 4000) + } + + componentWillReceiveProps(nextProps) { + + this.setState({ + isRender:nextProps.isRender + }) + // console.log(nextProps.isRender); + + } + + componentDidMount() { + + if(this.props.isRender!=undefined){ + this.setState({ + isRender:this.props.isRender + }) + } + + // $(document).on("showLoginDialog", (e, args)=>{ + // this.setState({ + // isRender: true + // }) + // }) + + this.dragWrapper(); + + axios.interceptors.response.use((response) => { + if(response!=undefined) + if (response&&response.data.status === 401) { + this.setState({ + isRender: true + }) + } + return response; + }, (error) => { + // // if (error.response && error.response.data.error === '401 Unauthorized') { + // // this.back_url = window.location.href; + // // this.setState({ + // // isRender: true + // // }) + // // // TODO 这里如果样式变了会出现css不加载的情况 + // // const $ = window.$; + // // const isCssLoaded = window.getComputedStyle($('.log_nav li.active')[0], null) + // // .getPropertyValue('border-bottom') + // // == "2px solid rgb(69, 155, 229)" + // // if (!isCssLoaded) { + // // const isPort3007 = window.location.port == 3007; + // // let _url_origin = isPort3007 ? 'http://localhost:3000' : '' + // // + // // $('head').append( $('') + // // .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css`) ); + // // $('head').append( $('') + // // .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css`) ); + // // } + // // } + // // return Promise.reject(error); + }); + } + handleDialogClose() { + this.setState({ + isRender: false + }) + window.location.href="/"; + } + + loginEDU=()=>{ + let {loginValue,passValue,regular,isGoingValue}=this.state; + if(regular===1){ + return + } + let newloginValue=loginValue.replace(/(^\s*)|(\s*$)/g, ""); + let newpassValue=passValue.replace(/(^\s*)|(\s*$)/g, ""); + + let url='/accounts/login.json' + axios.post(url, { + login:newloginValue, + password:newpassValue, + autologin:isGoingValue + } + ).then((response) => { + if(response===undefined){ + return + } + if(response.status===200){ + if (response.data.status === 402) { + window.location.href = response.data.url; + }else{ + broadcastChannelPostMessage('refreshPage') + this.setState({ + isRender:false + }) + window.location.reload(); + } + } + + }).catch((error) => { + console.log("356"); + console.log(error) + }) + } + onKeydowns=(e)=>{ + let {disabled}=this.state; + if( disabled===false&& e.keyCode === 13){ + this.loginEDU() + console.log(1) + } + } + render() { + let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass, + dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender}=this.state; + + if (isRender === undefined) { + isRender = false + } + + return ( + this.handleDialogClose()} + > +
    +
    {this.handleDialogClose()}}> + +
    + +
    +
      +
    • {this.enter(0)}}>登录
    • + {/*
    • {this.register(0)}}>快捷登录
    • */} +
    + + +
    +
    + +
    + + +
    + + + + +

    请输入有效的手机号/邮箱号/用户名

    + +
    + + +
    +

    + 请输入密码 +

    +
    +
    + + + {/**/} + +
    + 登录 +
    + +

    + + + + + + + + 忘记密码 + 注册 + + +

    + +
    +
    + + {/*快捷登录*/} + + + +
    +
    + +
    + + ); + } + +} + +export default LoginDialog ; + + +// onkeypress="user_login_keypress(event);" + +// onkeypress="user_login_keypress(event);" + + +{/*
    +
    +
    +

    +
    +
    } + + + +{/*第三方账号登录*/} + +{/*
    +

    第三方账号登录

    +
    + + + +
    +
    } + +// +// {/*
    */} +// {/*
    */} +// {/*
    */} +// {/**/} +// {/**/} +// {/*
    */} +// {/**/} +// {/**/} +// {/**/} +// {/*
    */} +// {/*

    请输入有效的手机号/邮箱号*/} +// {/*

    */} +// {/*
    */} +// +// {/*
    */} +// {/*/!*drag*/ }*/} +// {/*
    */} +// {/*
    */} +// {/*
    */} +// {/*请按住滑块,拖动到最右边*/} +// {/*
    */} +// {/*
    */} +// {/*
    */} +// {/*
    */} +// {/*

    请先拖动滑块完成验证

    */} +// {/*
    */} +// {/*
    */} +// +// {/*

    */} +// {/**/} +// {/**/} +// {/**/} +// {/*

    */} +// +// {/*
    */} +// {/*

    */} +// {/*请输入验证码*/} +// {/*

    */} +// {/*
    */} +// +// {/**/} +// +// {/*

    */} +// +// {/**/} +// {/**/} +// {/**/} +// {/**/} +// +// {/**/} +// {/*忘记密码*/} +// {/*注册*/} +// {/**/} +// +// {/*

    */} +// {/**/} +// {/*
    */} diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 2d1451d6b..da73b6282 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -331,18 +331,21 @@ class NewHeader extends Component { } educoderlogin=()=>{ //退出账号 - var url = `/accounts/logout.json`; - - axios.get((url)).then((result) => { - if(result!==undefined){ - // this.setState({ - // isRender:true - // }) - window.location.href = "/"; - } - }).catch((error) => { - console.log(error); + this.setState({ + isRender:true }) + // var url = `/accounts/logout.json`; + // + // axios.get((url)).then((result) => { + // if(result!==undefined){ + // // this.setState({ + // // isRender:true + // // }) + // window.location.href = "/"; + // } + // }).catch((error) => { + // console.log(error); + // }) } onKeywordSearch = () => { From 0f544ac5d98d956ba29a9db003caa56735c0703a Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 17:49:33 +0800 Subject: [PATCH 092/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/NewHeader.js | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index da73b6282..bdb6b2a09 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -331,21 +331,21 @@ class NewHeader extends Component { } educoderlogin=()=>{ //退出账号 - this.setState({ - isRender:true - }) - // var url = `/accounts/logout.json`; - // - // axios.get((url)).then((result) => { - // if(result!==undefined){ - // // this.setState({ - // // isRender:true - // // }) - // window.location.href = "/"; - // } - // }).catch((error) => { - // console.log(error); + // this.setState({ + // isRender:true // }) + var url = `/accounts/logout.json`; + + axios.get((url)).then((result) => { + if(result!==undefined){ + // this.setState({ + // isRender:true + // }) + window.location.href = "/"; + } + }).catch((error) => { + console.log(error); + }) } onKeywordSearch = () => { From 1f9c6b833b705c2369aa64314964782b25d88f8b Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 18:13:20 +0800 Subject: [PATCH 093/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/EducoderLogin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index 3c3f47c87..df5b5f8b8 100644 --- a/public/react/src/modules/login/EducoderLogin.js +++ b/public/react/src/modules/login/EducoderLogin.js @@ -177,7 +177,8 @@ class EducoderLogin extends Component { "align-items": "center", "width": "100%", }}> -
    © 2019 EduCoder湘ICP备17009477号Trustie & IntelliDE inside.
    +
    © 2019 EduCoder 湘ICP备17009477号 Trustie & IntelliDE inside
    +
    From 7472189ee9677e002d8d6561d9065dcf2dfb3b33 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 22 Jun 2019 18:17:55 +0800 Subject: [PATCH 094/964] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/usersInfo/Infos.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 941217750..58c0b3c4e 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -247,9 +247,8 @@ class Infos extends Component{
    { - data && is_current == false && data.identity =="学生" ?"" : {data && data.identity} + data && is_current == false && data.identity =="学生" ? "" : {data && data.identity} } - {data && data.identity} @@ -300,8 +299,8 @@ class Infos extends Component{ data && data.can_apply_trial == false ? data.attendance_signed ? - 已签到 - 明日签到 +{next_gold} 金币 + 已签到 +

    明日签到 +{next_gold} 金币

    :
    签到 From 90c935f68c8d1e80e25591504060bc4a7dc3415c 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, 22 Jun 2019 18:39:39 +0800 Subject: [PATCH 095/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTasksSubmitedit.js | 10 +- .../src/modules/user/FindPasswordComponent.js | 66 +++++++------ .../modules/user/LoginRegisterComponent.js | 96 ++++++++++++------- public/react/src/modules/user/common.css | 6 +- 4 files changed, 112 insertions(+), 66 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index cad289855..97eebc59e 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -650,10 +650,12 @@ class GraduationTasksSubmitedit extends Component{ height: '30px', display:item.user_name===undefined?"none":"" }}> -
    {item.user_name}
    -
    {item.group_name}
    -
    {item.student_id}
    - {key>0?
    this.delecttask_status(item.user_id)}>
    :""} + +
    {item.user_name}
    +
    +
    {item.group_name}
    +
    {item.student_id}
    + {key>0?
    this.delecttask_status(item.user_id)}>
    :""}
    ) })} diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 8dea3e521..ae2b427d8 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -329,8 +329,17 @@ class LoginRegisterComponent extends Component { color: #05101A; line-height: 69px; } + .loginInputzhuche{ + width: 100%; + background-color: #fff!important; + height: 45px !important; + padding: 5px; + + } `} + +
    找回密码 @@ -340,32 +349,33 @@ class LoginRegisterComponent extends Component { { ` .ant-input { - font-family: "Monospaced Number", "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; - -webkit-box-sizing: border-box; - box-sizing: border-box; - margin: 0; - padding: 0; - list-style: none; - position: relative; - display: inline-block; - padding: 4px 11px; - width: 100%; - height: 38px; - font-size: 14px; - line-height: 1.5; - color: rgba(0, 0, 0, 0.65); - background-color: #fff; - background-image: none; - border: 1px solid #d9d9d9; - border-radius: 4px; - -webkit-transition: all .3s; - -o-transition: all .3s; - transition: all .3s; -} - ` + font-family: "Monospaced Number", "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin: 0; + padding: 0; + list-style: none; + position: relative; + display: inline-block; + padding: 4px 11px; + width: 100%; + height: 38px; + font-size: 14px; + line-height: 1.5; + color: rgba(0, 0, 0, 0.65); + background-color: #fff; + background-image: none; + border: 1px solid #d9d9d9; + border-radius: 4px; + -webkit-transition: all .3s; + -o-transition: all .3s; + transition: all .3s; + } + ` } this.inputOnBlur(e)} onChange={this.loginInputonChange} style={{marginTop: '10px',height: "38px"}}> { @@ -381,16 +391,18 @@ class LoginRegisterComponent extends Component { dragOkCallback={this.dragOkCallback} >
    - 重新发送{seconds}s : getverificationcodes === true ? : } diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 5627890ee..587d77375 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -563,36 +563,45 @@ class LoginRegisterComponent extends Component { + this.inputOnBlur(e, 1)} style={{marginTop: '30px', height: '38px'}}> @@ -606,7 +615,7 @@ class LoginRegisterComponent extends Component { @@ -621,10 +630,33 @@ class LoginRegisterComponent extends Component { size={"large"}>登录
    } + + { parseInt(tab[0])==1 &&
    -
    - { getverificationcodes === undefined ? - : getverificationcodes === true ? - : - } @@ -673,13 +705,13 @@ class LoginRegisterComponent extends Component { {/* style={{height: '0', width: '0', border: 'none', display: "none"}}/>*/} {/**/} - this.Showandhide(key)}> + this.Showandhide(key)}> }> Date: Sat, 22 Jun 2019 18:54:03 +0800 Subject: [PATCH 096/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 5 +- public/react/src/index.css | 3 + .../courses/coursesPublic/Startshixuntask.js | 330 ++++---- public/react/src/modules/page/tpiPage.css | 751 +++++++++--------- public/react/src/modules/tpm/NewHeader.js | 28 +- 5 files changed, 565 insertions(+), 552 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index bd3bb68fa..aa99f16f5 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -4,6 +4,7 @@ import axios from 'axios'; import { requestProxy } from "./indexEduplus2RequestProxy"; import { broadcastChannelOnmessage } from 'educoder' import { notification } from 'antd'; +import './index.css' broadcastChannelOnmessage('refreshPage', () => { window.location.reload() }) @@ -114,7 +115,9 @@ export function initAxiosInterceptors(props) { notification.open({ message:"提示", description: response.data.message || '服务器异常,请联系管理员。', - + style: { + zIndex: 99999999 + }, }); // notification['error']({ // message:"提示", diff --git a/public/react/src/index.css b/public/react/src/index.css index 6249aa94a..5b7639ce3 100644 --- a/public/react/src/index.css +++ b/public/react/src/index.css @@ -33,4 +33,7 @@ body { } .anticon anticon-paper-clip{ color: #29bd8b !important; +} +.notificationmystyle{ + z-index: 99999999; } \ No newline at end of file diff --git a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js index 064ec645a..3a7b7408c 100644 --- a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js +++ b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js @@ -1,163 +1,169 @@ -import React,{ Component } from "react"; -import { WordsBtn } from 'educoder'; -import {Tooltip,message,Modal} from 'antd'; -import {Link} from 'react-router-dom'; -import axios from 'axios'; -import Modals from '../../modals/Modals'; - - - -class Startshixuntask extends Component{ - constructor(props){ - super(props); - this.state = { - startbtn:false - } - - } - - componentDidMount() { - - } - - taskoperationId=(list)=>{ - this.setState({ - startbtn:true, - }) - let url= list+".json"; - axios.get(url).then((response) => { - - if(response.status===200){ - if(response.data.status===-2){ - - this.setState({ - startbtn:false, - shixunsreplace:true, - hidestartshixunsreplacevalue:response.data.message+".json" - }) - }else if(response.data.status===-1){ - console.log(response) - }else if(response.data.status===-3){ - this.setState({ - shixunsmessage:response.data.message, - startshixunCombattype:true, - startbtn:false - }) - }else{ - - if(response.data.status!=401&&response.data.status!=403){ - window.location.href = "/tasks/"+response.data.game_identifier; - } - - } - } - }).catch((error) => { - this.setState({ - startbtn:false - }) - }); - - } - - hidestartshixunsreplace=(url)=>{ - axios.get(url).then((response) => { - if(response.status===200){ - - this.setState({ - shixunsreplace:false - }) - message.success('重置成功,正在进入实训!'); - let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; - this.props.history.push(path); - - }} - ).catch((error) => { - this.setState({ - startbtn:false, - shixunsreplace:false - }) - }); - - } - - hidestartshixunCombattype=()=>{ - this.setState({ - startshixunCombattype:false - }) - } - - render(){ - let { - Modalstype, - Modalstopval, - Modalsbottomval, - cardsModalcancel, - cardsModalsavetype, - loadtype, - shixunsreplace, - hidestartshixunsreplacevalue, - startshixunCombattype, - shixunsmessage, - startbtn - } = this.state; - - return( - - - - - -
    -

    实训已经更新了,正在为您重置!

    -
    -
    - - -
    -

    本实训的开启时间:{shixunsmessage}
    开启时间之前不能挑战 -

    -
    -
    - {/*取消*/} - 知道啦 -
    - {/*

    */} - {/*知道了*/} - {/*

    */} -
    - - {this.props.isStudent? - - {this.props.data.task_operation&&this.props.data.task_operation?startbtn===false?this.taskoperationId( this.props.data.task_operation[1])}> - {this.props.data.task_operation[0]} - :"开启中":""} - :"" - } - - - ) - } -} +import React,{ Component } from "react"; +import { WordsBtn } from 'educoder'; +import {Tooltip,message,Modal,Spin} from 'antd'; +import {Link} from 'react-router-dom'; +import axios from 'axios'; +import Modals from '../../modals/Modals'; + + +class Startshixuntask extends Component{ + constructor(props){ + super(props); + this.state = { + startbtn:false, + isSpin:false, + } + + } + + componentDidMount() { + + } + + taskoperationId=(list)=>{ + this.setState({ + startbtn:true, + }) + let url= list+".json"; + axios.get(url).then((response) => { + + if(response.status===200){ + if(response.data.status===-2){ + + this.setState({ + startbtn:false, + shixunsreplace:true, + hidestartshixunsreplacevalue:response.data.message+".json" + }) + }else if(response.data.status===-1){ + console.log(response) + }else if(response.data.status===-3){ + this.setState({ + shixunsmessage:response.data.message, + startshixunCombattype:true, + startbtn:false + }) + }else{ + + if(response.data.status!=401&&response.data.status!=403){ + window.location.href = "/tasks/"+response.data.game_identifier; + } + + } + } + }).catch((error) => { + this.setState({ + startbtn:false + }) + }); + + } + + hidestartshixunsreplace=(url)=>{ + this.setState({ + isSpin:true + }) + axios.get(url).then((response) => { + if(response.status===200){ + + this.setState({ + shixunsreplace:false, + isSpin:false, + }) + message.success('重置成功,正在进入实训!'); + let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; + this.props.history.push(path); + + }} + ).catch((error) => { + this.setState({ + startbtn:false, + shixunsreplace:false + }) + }); + + } + + hidestartshixunCombattype=()=>{ + this.setState({ + startshixunCombattype:false + }) + } + + render(){ + let { + Modalstype, + Modalstopval, + Modalsbottomval, + cardsModalcancel, + cardsModalsavetype, + loadtype, + shixunsreplace, + hidestartshixunsreplacevalue, + startshixunCombattype, + shixunsmessage, + startbtn + } = this.state; + + return( + + + + + +
    +

    实训已经更新了,正在为您重置!

    +
    +
    + + +
    +

    本实训的开启时间:{shixunsmessage}
    开启时间之前不能挑战 +

    +
    +
    + {/*取消*/} + 知道啦 +
    + {/*

    */} + {/*知道了*/} + {/*

    */} +
    + + {this.props.isStudent? + + {this.props.data.task_operation&&this.props.data.task_operation?startbtn===false?this.taskoperationId( this.props.data.task_operation[1])}> + {this.props.data.task_operation[0]} + :"开启中":""} + :"" + } + + + ) + } +} export default Startshixuntask; \ No newline at end of file diff --git a/public/react/src/modules/page/tpiPage.css b/public/react/src/modules/page/tpiPage.css index e803ca51f..34274907e 100644 --- a/public/react/src/modules/page/tpiPage.css +++ b/public/react/src/modules/page/tpiPage.css @@ -1,375 +1,376 @@ - -.page--header { - z-index: 1399 !important; -} - -/* 左右分隔条 */ -.b-label { - background: #111c24; -} -.b-label>.resize-helper { - height: 30px; - position: relative; - margin-top: -20px; - margin-left: -17px; - left: 50%; - top: 50%; - z-index: 50; -} -.b-label>.resize-helper button{ - width: 24px; - height: 24px; - min-height: 24px; - opacity: 0.7; -} -.b-label>.resize-helper button:hover { - opacity: 1; -} - -.b-label>.resize-helper button path { - color: #666666; - fill: currentColor; -} - -/* 所有i都加上动画 */ -#game_right_contents i { - transition: transform .3s ease; -} - - -/* */ -.h-center { - height: 3px; - background: rgb(17, 28, 36); - border-top: 1px solid rgb(25, 82, 123); -} - - -/* */ -/* codemirror初始化的时候高度没100% */ -#codetab_con_1 { - /*display: flex;*/ -} -.CodeMirror{ - /*height: -webkit-fill-available !important;*/ - line-height: 1.2; - - /*height: auto !important; - flex: 1 1 auto;*/ -} - -/* LeftView markdown */ -#game_show_content #tab_con_1 .editormd-preview, #game_show_content #tab_con_2 .editormd-preview - ,#game_show_content #tab_con_3 .editormd-preview - ,#game_show_content #tab_con_5 .editormd-preview { - width: 100% !important; - height: 100% !important; -} - -/* tab 样式覆盖 */ -#blacktab_nav { - background-color: #111C24; - border-bottom: 1px solid #222C34; -} -.blacktab_hover { - -} -.blacktab_hover a:after { - content: ''; - position: absolute; - left: 50%; - margin-left: -10px; - top: auto; - bottom: 0; - right: auto; - height: 2px; - width: 20px; - background-color: #29BD8B; -} - -button.buttonHoverColor:hover a { - color: #FF7500!important; -} - -/*--------------------------------------------------- Header Start */ -.leftNavDrawer { - z-index: 8000 !important; -} -.leftNavDrawer>div:nth-child(2) { - /*left:80px !important;*/ - z-index: 8000 !important; - top: 54px; - overflow: hidden; -} -.leftNavDrawer .MuiDrawer-paper-2 { - width: 500px; -} - -.leftNavDrawer .page--over { - left: 0px; - position: static; -} -.leftNavDrawer .col-width-3 { - position: static; - width: 400px; - border: none; -} - - -#myshixun_top { - display: flex; - height: 54px; -} -.headerLeft { - flex: 0 0 400px; -} - #user_grade a { - color: white; - } - .-header-right { - right: inherit; - margin-left: 24px; - display: inline-block; - top: 10px; - height: 32px; - padding: 3px 15px - } - .userInfo { - display: inline-block; - top: 4px; - position: relative; - margin-left: 10px; - } - .userInfo img { - border-radius: 18px; - vertical-align: bottom; - } - .userInfo .userInfoName { - margin-left: 12px; - color: #fff; - font-size: 16px; - } - #user_grade { - margin-top: -1px; - } -.headerCenter { - flex: 1 1 auto; - text-align: center; - flex-direction: column; -} - .headerCenter h2 { - max-width: none; - width: 100%; - font-size: 16px; - flex: 0 0 24px; - } - .headerCenter .timeRecord { - font-size: 13px; - color: #CCCCCC; - width: 100px; - margin: auto; - } -.headerRight { - flex: 0 0 400px; -} - .headerRight a { - color: #1A3F5F; - font-size: 16px; - } - .headerRight .exitBtn { - color: #1a3f5f !important; - } - .headerRight a:hover { - color: #4CACFF !important; - } - .headerRight i { - font-size: 24px !important; - margin-right: 8px; - margin-top: 12px; - vertical-align: -4px; - } - - -/*--------------------------------------------------- Header End */ -/* picture_display 样式,language_display处理*/ -.photo_display { - padding-top: 54px; - padding-left: 0px; -} -.with33{ width: 33%;} -.with49{ width: 49%;} -.mr1precent{margin-right: 1%;} -.mr03precent{margin-right: 0.3%;} -/*TPI输出TXT文件显示*/ -.output-txt{padding: 10px;box-shadow:1px 6px 24px rgba(17,28,36,0.2);min-height: 500px;width: 100%;box-sizing: border-box;outline: none;} - -/* -------------------------------------- m design 控件样式修改*/ -.rootSnackbar { - top: 60px !important; - z-index: 99999999 !important; -} -.rootSnackbar>div>div { - margin: 0 auto; -} - -/* Dialog */ -#alert-dialog-title>h2 { - text-align: center; -} - #alert-dialog-title { - border-bottom: 1px solid #eee; - margin-bottom: 18px; - } -body>div[role=dialog]>div[role=document]>div:nth-child(3) { - justify-content: center; -} -body>div[role=dialog]>div { - /* tpi dialog按钮改成平铺的大按钮 */ - /* padding-bottom: 10px; */ -} -/* tpi 窗口宽度*/ -body>div[role=dialog] div[role=document] { - min-width: 400px; -} -#alert-dialog-title + div { - text-align: center; -} - -body>div>div[role=tooltip] { - font-size: 12px; -} - -/* -------------------------------------- m design 控件样式修改 END*/ - -/*rc-tree样式*/ -.repoFilesDrawer .rc-tree li span.rc-tree-checkbox, .rc-tree li span.rc-tree-iconEle, .rc-tree li span.rc-tree-switcher { - background-image:url('../../images/component/rc-tree.png'); -} -.rc-tree li span.rc-tree-node-selected .rc-tree-iconEle { - background-image:url('../../images/component/selectFile.png'); - background-position: 0; - margin-bottom: 4px; -} -.repoFilesDrawer .rc-tree li span.rc-tree-icon_loading { - margin-right: 2px; - vertical-align: top; - background: url(data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7) no-repeat scroll 0 0 transparent; -} - -/*去除选中的颜色*/ -.repoFilesDrawer .rc-tree-node-selected { - background-color: #4CACFF; - border: 1px solid #4CACFF; - opacity: 1; - height: 26px !important; -} -.repoFilesDrawer .rc-tree-node-selected span.rc-tree-title { - color: #fff; -} - -/* - - Name: Railscasts - Author: Ryan Bates (http://railscasts.com) - - CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) - Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) - -*/ - -.cm-s-railscasts.CodeMirror {background: #2b2b2b;color: #f4f1ed;line-height: 21px;} -.cm-s-railscasts div.CodeMirror-selected {background: #214283 !important;} -.cm-s-railscasts .CodeMirror-gutters {/*background: #2b2b2b; */border-right: 0px;} -.cm-s-railscasts .CodeMirror-linenumber {color: #5a647e;} -.cm-s-railscasts .CodeMirror-cursor {border-left: 1px solid #d4cfc9 !important;} - -.cm-s-railscasts span.cm-comment {color: #bc9458;} -.cm-s-railscasts span.cm-atom {color: #b6b3eb;} -.cm-s-railscasts span.cm-number {color: #b6b3eb;} - -.cm-s-railscasts span.cm-property, .cm-s-railscasts span.cm-attribute {color: #a5c261;} -.cm-s-railscasts span.cm-keyword {color: #da4939;} -.cm-s-railscasts span.cm-string {color: #ffc66d;} - -.cm-s-railscasts span.cm-variable {color: #a5c261;} -.cm-s-railscasts span.cm-variable-2 {color: #6d9cbe;} -.cm-s-railscasts span.cm-def {color: #cc7833;} -/*.cm-s-railscasts span.cm-error {background: #da4939; color: #d4cfc9;}*/ -.cm-s-railscasts span.cm-bracket {color: #f4f1ed;} -.cm-s-railscasts span.cm-tag {color: #da4939;} -.cm-s-railscasts span.cm-link {color: #b6b3eb;} - -.cm-s-railscasts .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} -.cm-s-railscasts .CodeMirror-activeline-background { background: #303040; } - - - - -/* evaluateView*/ - -.CodeMirror-lines{padding: 0px!important;} -.cm-s-blackboard.CodeMirror {background: #0C1021; color: #F8F8F8; } -.cm-s-blackboard div.CodeMirror-selected { background: #253B76; } -.cm-s-blackboard .CodeMirror-line::selection, .cm-s-blackboard .CodeMirror-line > span::selection, .cm-s-blackboard .CodeMirror-line > span > span::selection { background: rgba(37, 59, 118, .99); } -.cm-s-blackboard .CodeMirror-line::-moz-selection, .cm-s-blackboard .CodeMirror-line > span::-moz-selection, .cm-s-blackboard .CodeMirror-line > span > span::-moz-selection { background: rgba(37, 59, 118, .99); } -.cm-s-blackboard .CodeMirror-gutters { background: #585858; border-right: 0; } -.cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; } -.cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; } -.cm-s-blackboard .CodeMirror-linenumber { color: #888;/*background: #585858;*/ } -.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7; } - -.cm-s-blackboard .cm-keyword { color: #FBDE2D; } -.cm-s-blackboard .cm-atom { color: #D8FA3C; } -.cm-s-blackboard .cm-number { color: #D8FA3C; } -.cm-s-blackboard .cm-def { color: #8DA6CE; } -.cm-s-blackboard .cm-variable { color: #FF6400; } -.cm-s-blackboard .cm-operator { color: #FBDE2D; } -.cm-s-blackboard .cm-comment { color: #AEAEAE; } -.cm-s-blackboard .cm-string { color: #61CE3C; } -.cm-s-blackboard .cm-string-2 { color: #61CE3C; } -.cm-s-blackboard .cm-meta { color: #D8FA3C; } -.cm-s-blackboard .cm-builtin { color: #8DA6CE; } -.cm-s-blackboard .cm-tag { color: #8DA6CE; } -.cm-s-blackboard .cm-attribute { color: #8DA6CE; } -.cm-s-blackboard .cm-header { color: #FF6400; } -.cm-s-blackboard .cm-hr { color: #AEAEAE; } -.cm-s-blackboard .cm-link { color: #8DA6CE; } -.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; } - -.cm-s-blackboard .CodeMirror-activeline-background { background: #3C3636; } -.cm-s-blackboard .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; } - -.cm-s-railscasts span.cm-error { - color: #bc9458; -} - -/* 弹框 */ -.popupAll{width: 100%;height: 100%;position: fixed;z-index: 99998;background-color: rgba(5,16,26,0.6);left: 0;top:0;} -.task-popup{ width: 30%;background: #fff; border:1px solid #e8e8e8; border-radius:10px; -webkit-box-shadow:0 0 10px #ccc; -moz-box-shadow:0 0 10px #ccc; box-shadow:0 0 10px #ccc;} -.task-popup-text-center{ text-align: center; color: #333;} -.task-popup-title{ border-bottom: 1px solid #eee; padding:0px 15px;text-align: center;box-sizing: border-box;line-height: 70px;height: 70px; border-radius: 10px 10px 0px 0px;font-size: 16px; } -.task-popup-content{ padding:15px;} -/*注释这个地方是因为会影响到实训哪块合作者删除的样式*/ -/*.task-popup-submit{ margin:0px auto 15px; width: 120px;}*/ -.task-popup-sure{ margin:0px auto 15px; width: 54px;} -.task-popup-right-sure{margin:0px auto 15px;text-align: center} -.task-popup-OK{ margin:15px auto; text-align: center} -.task-popup-bggrey{ background:#fff; color:#333;} -a.task-btn-orange{background: #4CACFF; color:#fff!important;} -a:hover.task-btn-orange{background: #4CACFF; color:#fff!important;} - - -/* 代码区域样式 */ -#games_repository_contents .readRepoFailed { - color: #fff; - width: 100%; - text-align: center; - margin-top: 120px; -} - #games_repository_contents .readRepoFailed .retry { - color:#4CACFF; - } - - - - + +.page--header { + z-index: 1399 !important; +} + +/* 左右分隔条 */ +.b-label { + background: #111c24; +} +.b-label>.resize-helper { + height: 30px; + position: relative; + margin-top: -20px; + margin-left: -17px; + left: 50%; + top: 50%; + z-index: 50; +} +.b-label>.resize-helper button{ + width: 24px; + height: 24px; + min-height: 24px; + opacity: 0.7; +} +.b-label>.resize-helper button:hover { + opacity: 1; +} + +.b-label>.resize-helper button path { + color: #666666; + fill: currentColor; +} + +/* 所有i都加上动画 */ +#game_right_contents i { + transition: transform .3s ease; +} + + +/* */ +.h-center { + height: 3px; + background: rgb(17, 28, 36); + border-top: 1px solid rgb(25, 82, 123); +} + + +/* */ +/* codemirror初始化的时候高度没100% */ +#codetab_con_1 { + /*display: flex;*/ +} +.CodeMirror{ + /*height: -webkit-fill-available !important;*/ + line-height: 1.2; + + /*height: auto !important; + flex: 1 1 auto;*/ +} + +/* LeftView markdown */ +#game_show_content #tab_con_1 .editormd-preview, #game_show_content #tab_con_2 .editormd-preview + ,#game_show_content #tab_con_3 .editormd-preview + ,#game_show_content #tab_con_5 .editormd-preview { + width: 100% !important; + height: 100% !important; +} + +/* tab 样式覆盖 */ +#blacktab_nav { + background-color: #111C24; + border-bottom: 1px solid #222C34; +} +.blacktab_hover { + +} +.blacktab_hover a:after { + content: ''; + position: absolute; + left: 50%; + margin-left: -10px; + top: auto; + bottom: 0; + right: auto; + height: 2px; + width: 20px; + background-color: #29BD8B; +} + +button.buttonHoverColor:hover a { + color: #FF7500!important; +} + +/*--------------------------------------------------- Header Start */ +.leftNavDrawer { + z-index: 8000 !important; +} +.leftNavDrawer>div:nth-child(2) { + /*left:80px !important;*/ + z-index: 8000 !important; + top: 54px; + overflow: hidden; +} +.leftNavDrawer .MuiDrawer-paper-2 { + width: 500px; +} + +.leftNavDrawer .page--over { + left: 0px; + position: static; +} +.leftNavDrawer .col-width-3 { + position: static; + width: 400px; + border: none; +} + + +#myshixun_top { + display: flex; + height: 54px; +} +.headerLeft { + flex: 0 0 400px; +} + #user_grade a { + color: white; + } + .-header-right { + right: inherit; + margin-left: 24px; + display: inline-block; + top: 10px; + height: 32px; + padding: 3px 15px + } + .userInfo { + display: inline-block; + top: 4px; + position: relative; + margin-left: 10px; + } + .userInfo img { + border-radius: 18px; + vertical-align: bottom; + } + .userInfo .userInfoName { + margin-left: 12px; + color: #fff; + font-size: 16px; + } + #user_grade { + margin-top: -1px; + } +.headerCenter { + flex: 1 1 auto; + text-align: center; + flex-direction: column; +} + .headerCenter h2 { + max-width: none; + width: 100%; + font-size: 16px; + flex: 0 0 24px; + } + .headerCenter .timeRecord { + font-size: 13px; + color: #CCCCCC; + width: 100px; + margin: auto; + } +.headerRight { + flex: 0 0 400px; +} + .headerRight a { + color: #1A3F5F; + font-size: 16px; + } + .headerRight .exitBtn { + color: #1a3f5f !important; + } + .headerRight a:hover { + color: #4CACFF !important; + } + .headerRight i { + font-size: 24px !important; + margin-right: 8px; + margin-top: 12px; + vertical-align: -4px; + } + + +/*--------------------------------------------------- Header End */ +/* picture_display 样式,language_display处理*/ +.photo_display { + padding-top: 54px; + padding-left: 0px; +} +.with33{ width: 33%;} +.with49{ width: 49%;} +.mr1precent{margin-right: 1%;} +.mr03precent{margin-right: 0.3%;} +/*TPI输出TXT文件显示*/ +.output-txt{padding: 10px;box-shadow:1px 6px 24px rgba(17,28,36,0.2);min-height: 500px;width: 100%;box-sizing: border-box;outline: none;} + +/* -------------------------------------- m design 控件样式修改*/ +.rootSnackbar { + top: 60px !important; + z-index: 99999999 !important; +} +.rootSnackbar>div>div { + margin: 0 auto; +} + + +/* Dialog */ +#alert-dialog-title>h2 { + text-align: center; +} + #alert-dialog-title { + border-bottom: 1px solid #eee; + margin-bottom: 18px; + } +body>div[role=dialog]>div[role=document]>div:nth-child(3) { + justify-content: center; +} +body>div[role=dialog]>div { + /* tpi dialog按钮改成平铺的大按钮 */ + /* padding-bottom: 10px; */ +} +/* tpi 窗口宽度*/ +body>div[role=dialog] div[role=document] { + min-width: 400px; +} +#alert-dialog-title + div { + text-align: center; +} + +body>div>div[role=tooltip] { + font-size: 12px; +} + +/* -------------------------------------- m design 控件样式修改 END*/ + +/*rc-tree样式*/ +.repoFilesDrawer .rc-tree li span.rc-tree-checkbox, .rc-tree li span.rc-tree-iconEle, .rc-tree li span.rc-tree-switcher { + background-image:url('../../images/component/rc-tree.png'); +} +.rc-tree li span.rc-tree-node-selected .rc-tree-iconEle { + background-image:url('../../images/component/selectFile.png'); + background-position: 0; + margin-bottom: 4px; +} +.repoFilesDrawer .rc-tree li span.rc-tree-icon_loading { + margin-right: 2px; + vertical-align: top; + background: url(data:image/gif;base64,R0lGODlhEAAQAKIGAMLY8YSx5HOm4Mjc88/g9Ofw+v///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAGACwAAAAAEAAQAAADMGi6RbUwGjKIXCAA016PgRBElAVlG/RdLOO0X9nK61W39qvqiwz5Ls/rRqrggsdkAgAh+QQFCgAGACwCAAAABwAFAAADD2hqELAmiFBIYY4MAutdCQAh+QQFCgAGACwGAAAABwAFAAADD1hU1kaDOKMYCGAGEeYFCQAh+QQFCgAGACwKAAIABQAHAAADEFhUZjSkKdZqBQG0IELDQAIAIfkEBQoABgAsCgAGAAUABwAAAxBoVlRKgyjmlAIBqCDCzUoCACH5BAUKAAYALAYACgAHAAUAAAMPaGpFtYYMAgJgLogA610JACH5BAUKAAYALAIACgAHAAUAAAMPCAHWFiI4o1ghZZJB5i0JACH5BAUKAAYALAAABgAFAAcAAAMQCAFmIaEp1motpDQySMNFAgA7) no-repeat scroll 0 0 transparent; +} + +/*去除选中的颜色*/ +.repoFilesDrawer .rc-tree-node-selected { + background-color: #4CACFF; + border: 1px solid #4CACFF; + opacity: 1; + height: 26px !important; +} +.repoFilesDrawer .rc-tree-node-selected span.rc-tree-title { + color: #fff; +} + +/* + + Name: Railscasts + Author: Ryan Bates (http://railscasts.com) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-railscasts.CodeMirror {background: #2b2b2b;color: #f4f1ed;line-height: 21px;} +.cm-s-railscasts div.CodeMirror-selected {background: #214283 !important;} +.cm-s-railscasts .CodeMirror-gutters {/*background: #2b2b2b; */border-right: 0px;} +.cm-s-railscasts .CodeMirror-linenumber {color: #5a647e;} +.cm-s-railscasts .CodeMirror-cursor {border-left: 1px solid #d4cfc9 !important;} + +.cm-s-railscasts span.cm-comment {color: #bc9458;} +.cm-s-railscasts span.cm-atom {color: #b6b3eb;} +.cm-s-railscasts span.cm-number {color: #b6b3eb;} + +.cm-s-railscasts span.cm-property, .cm-s-railscasts span.cm-attribute {color: #a5c261;} +.cm-s-railscasts span.cm-keyword {color: #da4939;} +.cm-s-railscasts span.cm-string {color: #ffc66d;} + +.cm-s-railscasts span.cm-variable {color: #a5c261;} +.cm-s-railscasts span.cm-variable-2 {color: #6d9cbe;} +.cm-s-railscasts span.cm-def {color: #cc7833;} +/*.cm-s-railscasts span.cm-error {background: #da4939; color: #d4cfc9;}*/ +.cm-s-railscasts span.cm-bracket {color: #f4f1ed;} +.cm-s-railscasts span.cm-tag {color: #da4939;} +.cm-s-railscasts span.cm-link {color: #b6b3eb;} + +.cm-s-railscasts .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} +.cm-s-railscasts .CodeMirror-activeline-background { background: #303040; } + + + + +/* evaluateView*/ + +.CodeMirror-lines{padding: 0px!important;} +.cm-s-blackboard.CodeMirror {background: #0C1021; color: #F8F8F8; } +.cm-s-blackboard div.CodeMirror-selected { background: #253B76; } +.cm-s-blackboard .CodeMirror-line::selection, .cm-s-blackboard .CodeMirror-line > span::selection, .cm-s-blackboard .CodeMirror-line > span > span::selection { background: rgba(37, 59, 118, .99); } +.cm-s-blackboard .CodeMirror-line::-moz-selection, .cm-s-blackboard .CodeMirror-line > span::-moz-selection, .cm-s-blackboard .CodeMirror-line > span > span::-moz-selection { background: rgba(37, 59, 118, .99); } +.cm-s-blackboard .CodeMirror-gutters { background: #585858; border-right: 0; } +.cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; } +.cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; } +.cm-s-blackboard .CodeMirror-linenumber { color: #888;/*background: #585858;*/ } +.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7; } + +.cm-s-blackboard .cm-keyword { color: #FBDE2D; } +.cm-s-blackboard .cm-atom { color: #D8FA3C; } +.cm-s-blackboard .cm-number { color: #D8FA3C; } +.cm-s-blackboard .cm-def { color: #8DA6CE; } +.cm-s-blackboard .cm-variable { color: #FF6400; } +.cm-s-blackboard .cm-operator { color: #FBDE2D; } +.cm-s-blackboard .cm-comment { color: #AEAEAE; } +.cm-s-blackboard .cm-string { color: #61CE3C; } +.cm-s-blackboard .cm-string-2 { color: #61CE3C; } +.cm-s-blackboard .cm-meta { color: #D8FA3C; } +.cm-s-blackboard .cm-builtin { color: #8DA6CE; } +.cm-s-blackboard .cm-tag { color: #8DA6CE; } +.cm-s-blackboard .cm-attribute { color: #8DA6CE; } +.cm-s-blackboard .cm-header { color: #FF6400; } +.cm-s-blackboard .cm-hr { color: #AEAEAE; } +.cm-s-blackboard .cm-link { color: #8DA6CE; } +.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; } + +.cm-s-blackboard .CodeMirror-activeline-background { background: #3C3636; } +.cm-s-blackboard .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; } + +.cm-s-railscasts span.cm-error { + color: #bc9458; +} + +/* 弹框 */ +.popupAll{width: 100%;height: 100%;position: fixed;z-index: 99998;background-color: rgba(5,16,26,0.6);left: 0;top:0;} +.task-popup{ width: 30%;background: #fff; border:1px solid #e8e8e8; border-radius:10px; -webkit-box-shadow:0 0 10px #ccc; -moz-box-shadow:0 0 10px #ccc; box-shadow:0 0 10px #ccc;} +.task-popup-text-center{ text-align: center; color: #333;} +.task-popup-title{ border-bottom: 1px solid #eee; padding:0px 15px;text-align: center;box-sizing: border-box;line-height: 70px;height: 70px; border-radius: 10px 10px 0px 0px;font-size: 16px; } +.task-popup-content{ padding:15px;} +/*注释这个地方是因为会影响到实训哪块合作者删除的样式*/ +/*.task-popup-submit{ margin:0px auto 15px; width: 120px;}*/ +.task-popup-sure{ margin:0px auto 15px; width: 54px;} +.task-popup-right-sure{margin:0px auto 15px;text-align: center} +.task-popup-OK{ margin:15px auto; text-align: center} +.task-popup-bggrey{ background:#fff; color:#333;} +a.task-btn-orange{background: #4CACFF; color:#fff!important;} +a:hover.task-btn-orange{background: #4CACFF; color:#fff!important;} + + +/* 代码区域样式 */ +#games_repository_contents .readRepoFailed { + color: #fff; + width: 100%; + text-align: center; + margin-top: 120px; +} + #games_repository_contents .readRepoFailed .retry { + color:#4CACFF; + } + + + + diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index bdb6b2a09..5498866cd 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -331,21 +331,21 @@ class NewHeader extends Component { } educoderlogin=()=>{ //退出账号 - // this.setState({ - // isRender:true - // }) - var url = `/accounts/logout.json`; - - axios.get((url)).then((result) => { - if(result!==undefined){ - // this.setState({ - // isRender:true - // }) - window.location.href = "/"; - } - }).catch((error) => { - console.log(error); + this.setState({ + isRender:true }) + // var url = `/accounts/logout.json`; + + // axios.get((url)).then((result) => { + // if(result!==undefined){ + // // this.setState({ + // // isRender:true + // // }) + // window.location.href = "/"; + // } + // }).catch((error) => { + // console.log(error); + // }) } onKeywordSearch = () => { From 3ec184008bfd80654c54a07720b8d2442d107412 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 18:56:29 +0800 Subject: [PATCH 097/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/Startshixuntask.js | 4 +- public/react/src/modules/tpm/TPMBanner.js | 1842 +++++++++-------- 2 files changed, 927 insertions(+), 919 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js index 3a7b7408c..b994e9005 100644 --- a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js +++ b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js @@ -124,15 +124,15 @@ class Startshixuntask extends Component{ footer={null} keyboard={false} > +

    实训已经更新了,正在为您重置!

    +
    { - var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 - var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器 - var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器 - var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; - if(isIE) { - var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); - reIE.test(userAgent); - var fIEVersion = parseFloat(RegExp["$1"]); - if(fIEVersion == 7) { - return 7; - } else if(fIEVersion == 8) { - return 8; - } else if(fIEVersion == 9) { - return 9; - } else if(fIEVersion == 10) { - return 10; - } else { - return 6;//IE版本<=7 - } - } else if(isEdge) { - return 'edge';//edge - } else if(isIE11) { - return 11; //IE11 - }else{ - return -1;//不是ie浏览器 - } - } - componentDidMount() { - let thiisie=this.IEVersion(); - if(thiisie!=-1){ - this.setState({ - isIE:true - }) - }else{ - this.setState({ - isIE:false - }) - } - } - /* - * Fork - * */ - copyForkvisible = () => { - let {shixunsDetails} = this.props; - if (shixunsDetails.can_fork === null) { - this.setState({ - Forkvisible: true - }) - } else { - this.setState({ - Forkvisible: false, - Forkauthentication: true, - can_fork: shixunsDetails.can_fork.can_fork, - certi_url: shixunsDetails.can_fork.certi_url, - }) - } - - } - - hideForkvisible = () => { - this.setState({ - Forkvisible: false, - Forkauthentication:false - }) - } - - addForkvisible = () => { - this.setState({ - Forkvisibletype: true, - }) - let id = this.props.match.params.shixunId; - let url = "/shixuns/" + id + "/copy.json"; - axios.post(url).then((response) => { - if(response.data.status===401){ - - }else{ - this.setState({ - Forkvisible: false, - Forkauthentication: false, - // Forkvisibletype:false - }) - window.location.href = "/shixuns/" + response.data.shixun + "/challenges"; - } - - }).catch((error) => { - console.log(error) - }); - - } - /* - * 发送至按钮 - * */ - Senttothe=()=>{ - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/search_user_courses.json"; - this.setState({ - Senttothetype:true - }) - - axios.get(url, { - params: { - page:1, - limit:10 - }}).then((response) => { - this.setState({ - courses_count:response.data.courses_count, - course_list:response.data.course_list - }) - }).catch((error) => { - console.log(error) - }); - } - - SenttotheSearch=(value)=>{ - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/search_user_courses.json?search="+value; - axios.get(url, { - params: { - page:1, - limit:10 - }}).then((response) => { - this.setState({ - courses_count:response.data.courses_count, - course_list:response.data.course_list, - pages:1, - Searchvalue:value - }) - }).catch((error) => { - console.log(error) - }); - } - - onChangeSenttothevcalue=(e)=>{ - this.setState({ - Senttothevcalue:e.target.value - }) - } - onChangesendeSenttothe=(pageNumber)=>{ - let{Searchvalue}=this.state; - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/search_user_courses.json?search="+Searchvalue; - axios.get(url, { - params: { - page:pageNumber, - limit:10 - }}).then((response) => { - this.setState({ - courses_count:response.data.courses_count, - course_list:response.data.course_list, - pagenum: pageNumber, - pages: pageNumber - }) - }).catch((error) => { - console.log(error) - }); - } - sendeSenttothevcalue=()=>{ - let {Senttothevcalue}=this.state; - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/send_to_course.json"; - axios.post(url,{ - course_id:Senttothevcalue - }).then((response) => { - this.props.showSnackbar(response.data.message); - this.setState({ - Senttothetype:false, - Searchvalue:"", - pages:1 - }) - window.location.href = response.data.url; - - }).catch((error) => { - console.log(error) - }); - - } - - hideSenttothevcalue=()=>{ - this.setState({ - Senttothetype:false, - Searchvalue:"", - pages:1 - }) - - - } - - /* - * 撤销发布按钮 - * */ - cancel_publish=()=>{ - - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/cancel_publish.json"; - axios.get(url).then((response) => { - this.props.showSnackbar(response.data.message); - window.location.reload() - }).catch((error) => { - console.log(error) - }); - } - - - /* - * 申请发布按钮 - * */ - applyrelease=()=>{ - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/publish.json"; - axios.get(url).then((response) => { - let evaluation_set_position - if(response.data.evaluation_set_position===null){ - evaluation_set_position=[] - }else{ - evaluation_set_position=response.data.evaluation_set_position - } - this.setState({ - Issuevisible:true, - tag_position:response.data.tag_position, - evaluation_set_position:evaluation_set_position, - publishboxstatus:response.data.status, - }) - }).catch((error) => { - console.log(error) - }); - }; - - hiddenIssuevisible=(val)=>{ - this.setState({ - Issuevisible:false - }) - if(val===0||val===1){ - window.location.reload() - } - - } - - //重置按钮 - // resetshixunCombat=(id)=>{ - // let zrl="/myshixuns/"+id+"/reset_my_game.json"; - // axios.get(zrl).then((response) => { - // window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges"; - // message.success('重置成功'); - // }).catch((error) => { - // console.log(error) - // }); - // } - - hidestartshixunsreplace=(url)=>{ - axios.get(url).then((response) => { - if(response.status===200){ - let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; - this.props.history.push(path); - this.setState({ - shixunsreplace:false - }) - message.success('重置成功,正在进入实训!'); - this.startshixunCombat(); - }} - ).catch((error) => { - this.setState({ - startbtn:false, - shixunsreplace:false - }) - }); - - } - //开始实战按钮 - startshixunCombat=()=>{ - let {shixunsDetails} = this.props - if( shixunsDetails.status>1){ - this.setState({ - startbtn:true, - hidestartshixunsreplacevalue:"" - }) - }else{ - this.setState({ - hidestartshixunsreplacevalue:"" - }) - } - - - let id = this.props.match.params.shixunId; - let url="/shixuns/"+id+"/shixun_exec.json"; - axios.get(url).then((response) => { - if(response.status===200){ - if(response.data.status===-2){ - // this.resetshixunCombat(response.data.message); - this.setState({ - startbtn:false, - shixunsreplace:true, - hidestartshixunsreplacevalue:response.data.message+".json" - }) - }else if(response.data.status===-1){ - console.log(response) - }else if(response.data.status===-3){ - this.setState({ - shixunsmessage:response.data.message, - startshixunCombattype:true, - startbtn:false - }) - }else{ - // let path="/tasks/"+response.data.game_identifier; - // this.props.history.push(path); - - - // this.context.router.history.push(path); - if(response.data.status!=401){ - window.location.href = "/tasks/"+response.data.game_identifier; - } - - } - } - }).catch((error) => { - this.setState({ - startbtn:false - }) - }); - } - - tocertification=()=>{ - let{certi_url}=this.state; - this.setState({ - Forkauthentication:false - }) - window.location.href=certi_url; - } - - SenttotheValue=(e)=>{ - this.setState({ - Searchvalue:e.target.value - }) - } - - hidestartshixunCombattype=()=>{ - this.setState({ - startshixunCombattype:false - }) - } - - - - render() { - let { - Forkvisible, - Senttothetype, - Senttothevcalue, - evaluation_set_position, - Forkauthentication, - can_fork, - certi_url, - tag_position, - courses_count, - course_list, - Issuevisible, - publishboxstatus, - showradios, - startbtn, - Searchvalue, - startshixunCombattype, - shixunsmessage, - pages, - shixunsreplace, - hidestartshixunsreplacevalue, - Forkvisibletype, - isIE} = this.state; - let {shixunsDetails, shixunId, star_info, star_infos} = this.props; - let challengeBtnTipText = ''; - let challengeBtnText = '模拟实战'; - // let star_info=[] - // if (shixunsDetails.status === 0) { - // - // } else if (shixunsDetails.status === 1) { - // - // } else if (shixunsDetails.status === 2) { - // challengeBtnTipText = '开始学习并完成实战任务' - // - // } - if(shixunsDetails!=undefined){ - if (shixunsDetails.status === 0 ) { - challengeBtnText = '继续实战' - } else if (shixunsDetails.status === 1) { - challengeBtnText = '查看实战' - } else if (shixunsDetails.status === 3) { - challengeBtnText = '继续实战' - }else{ - challengeBtnText = "开始实战" - } - } - - - // let list=shixunsDetails.task_operation; - // if(list!=undefined){ - // if (shixunsDetails.status === 0 ) { - // for(var i=0; i{ - $("#ratePanel").show(); - this.setState({ - showradios:true - }) - },()=>{ - $("#ratePanel").hide(); - this.setState({ - showradios:false - }) - }) - - const radioStyle = { - display: 'block', - height: '30px', - lineHeight: '30px', - }; - - - return ( - - shixunsDetails===undefined?"": -
    -
    - -
    -

    - {shixunsDetails.name} - { - shixunsDetails.fork_from === undefined || shixunsDetails.fork_from === null ? "" : - - - - } - -

    -
    -
      -
    • - 学习人数 - {shixunsDetails.stu_num} -
    • - {/*
    • */} - {/*经验值*/} - {/*{shixunsDetails.experience}*/} - {/*
    • */} -
    • - 难度系数 - {shixunsDetails.diffcult} - -
    • -
    - -
    - -
    - -
    -
    -
    - -
    -
    -
    - {star_infos[0]}分 - 总评分 -
    - {showradios === true ? - - : ""} -
    -
    -
    -
    -
    -
    - {showradios === true ? - - : ""} -
    - - {star_infos[1]}% -
    -
    -
    - {showradios === true ? - - : ""} -
    - - {star_infos[2]}% -
    -
    -
    - {showradios === true ? - - : ""} -
    - - {star_infos[3]}% -
    -
    -
    - {showradios === true ? - - : ""} -
    - - {star_infos[4]}% -
    -
    -
    - {showradios === true ? - - : ""} -
    - - {star_infos[5]}% -
    -
    -
    -
    -
    - -
    - - { - startbtn === false ? - - - {shixunsDetails.task_operation === undefined ? "" : shixunsDetails.status > 1 ? shixunsDetails.task_operation[0] : "模拟实战"} - - - : "" - } - - -
    -

    本实训的开启时间:{shixunsmessage}
    开启时间之前不能挑战 -

    -
    -
    - {/*取消*/} - 知道啦 -
    - {/*

    */} - {/*知道了*/} - {/*

    */} -
    - - -
    -

    实训已经更新了,正在为您重置!

    -
    - -
    - - - - - - { - startbtn === true ? - 开启中 : "" - } - - {/*{*/} - {/*shixunsDetails.status=== 3 && shixunsDetails.task_operation[0]==="开始实战"?*/} - {/*{shixunsDetails.task_operation===undefined?"":shixunsDetails.task_operation[0]}:""*/} - {/*}*/} - - {shixunsDetails.status === 0 && this.props.identity < 4 ? - 申请发布 : "" - } - - - { - publishboxstatus === 0 ?
    -

    - 发布申请已提交,请等待管理员的审核
    -

    -
    : publishboxstatus === 1 ? -
    -

    - 发布申请已提交,请等待管理员的审核
    - • 我们将在1-2个工作日内完成审核 -

    -
    : publishboxstatus === 2 ?
    -

    - 第 - { - evaluation_set_position.map((item, key) => { - return ( - {item}, - ) - }) - } - 关评测设置尚未完成,无法申请发布 -

    -
    : publishboxstatus === 3 ? -
    -

    - 每一个关卡至少需要一个技能标签
    - 第 - { - tag_position.map((item, key) => { - return ( - {item}, - ) - }) - } - 关尚未设置技能标签,请补充 -

    -
    : -
    -

    - 尚未创建任务的实训,不能申请发布 -

    -
    - } - - -
    - - {shixunsDetails.status === 1 && this.props.identity < 4 ? - 撤销发布 : "" - } - - { - - - 发送至 - - - } - - -
    -
    - -
    - 选择的实训将会发送到指定课堂 -
    - -
    - this.SenttotheSearch(value)} - style={{width: '100%'}} - /> -
    - -
    12?"cdefault mb20":"cdefault mb50"}> -
    -
      - - { - course_list === undefined ? "" : course_list.map((item, key) => { - return ( - {item.name} - ) - }) - } - -
    -
    -
    - -
    - 12 ? "block" : "none"}} - showQuickJumper defaultCurrent={1} current={pages} pageSize={12} - total={courses_count} onChange={this.onChangesendeSenttothe}/> - - 确定 - - 取消 -
    - -
    -
    -
    - - {shixunsDetails.status === 3 && - 已关闭 - } - -
    - - - Fork - - - - - {Forkvisibletype===true? - - : -
    -

    复制将在后台执行
    平台将为你创建一个新的同名实训和内容,请问是否继续?

    -
    -
    - 取消 - 确定 -
    -
    - } - - -
    - - -

    {can_fork}
    请问是否前往进行认证?

    -
    -
    - - -
    -
    - {!!shixunsDetails.fork_num && - - {shixunsDetails.fork_num} - - } - -
    - -
    - -
    - -
    -
    正在等待管理员的审核。在审核通过前,可以随时撤销发布
    -
    - - ); - } -} - -export default TPMBanner; - +import React, { Component } from 'react'; + +import { Redirect } from 'react-router'; + +import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; + +import PropTypes from 'prop-types'; + +import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip} from 'antd'; + +import 'antd/lib/pagination/style/index.css'; + +import axios from 'axios'; + +// import { Rating,Progress } from '@icedesign/base'; + +import Rating from '@icedesign/base/lib/rating'; + +import Progress from '@icedesign/base/lib/progress'; + +// 引入业务组件样式 +import '@icedesign/base/lib/rating/style.js'; + +import '@icedesign/base/lib/progress/style.js'; + +import './shixuns/css/TPMBanner.css'; + +let $ = window.$; + +const Search = Input.Search; + +const RadioGroup = Radio.Group; + +class TPMBanner extends Component { + constructor(props) { + super(props) + this.state={ + Forkvisible: false, + Senttothetype:false, + Senttothevcalue:1, + courses_count:1, + course_list:[], + pagenum:1, + publishbox:"", + publishboxstatus:0, + pages:1, + Issuevisible:false, + evaluation_set_position:[], + tag_position:[], + Forkauthentication:false, + can_fork:undefined, + certi_url:undefined, + showradios:false, + startbtn:false, + Searchvalue:"", + startshixunCombattype:false, + shixunsmessage:"", + shixunsreplace:false, + hidestartshixunsreplacevalue:"", + isIE:false, + Forkvisibletype: false, + isSpin:false, + } + } + + // star_info:[0, 0, 0, 0, 0, 0], + // star_infos:[0, 0, 0, 0, 0, 0], + // shixunsDetails:{}, + // shixunId: undefined, + // componentWillReceiveProps(newProps, newContext){ + // this.setState({ + // shixunsDetails: newProps.shixunsDetails + // }); + // } + + IEVersion=()=>{ + var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 + var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器 + var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器 + var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; + if(isIE) { + var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); + reIE.test(userAgent); + var fIEVersion = parseFloat(RegExp["$1"]); + if(fIEVersion == 7) { + return 7; + } else if(fIEVersion == 8) { + return 8; + } else if(fIEVersion == 9) { + return 9; + } else if(fIEVersion == 10) { + return 10; + } else { + return 6;//IE版本<=7 + } + } else if(isEdge) { + return 'edge';//edge + } else if(isIE11) { + return 11; //IE11 + }else{ + return -1;//不是ie浏览器 + } + } + componentDidMount() { + let thiisie=this.IEVersion(); + if(thiisie!=-1){ + this.setState({ + isIE:true + }) + }else{ + this.setState({ + isIE:false + }) + } + } + /* + * Fork + * */ + copyForkvisible = () => { + let {shixunsDetails} = this.props; + if (shixunsDetails.can_fork === null) { + this.setState({ + Forkvisible: true + }) + } else { + this.setState({ + Forkvisible: false, + Forkauthentication: true, + can_fork: shixunsDetails.can_fork.can_fork, + certi_url: shixunsDetails.can_fork.certi_url, + }) + } + + } + + hideForkvisible = () => { + this.setState({ + Forkvisible: false, + Forkauthentication:false + }) + } + + addForkvisible = () => { + this.setState({ + Forkvisibletype: true, + }) + let id = this.props.match.params.shixunId; + let url = "/shixuns/" + id + "/copy.json"; + axios.post(url).then((response) => { + if(response.data.status===401){ + + }else{ + this.setState({ + Forkvisible: false, + Forkauthentication: false, + // Forkvisibletype:false + }) + window.location.href = "/shixuns/" + response.data.shixun + "/challenges"; + } + + }).catch((error) => { + console.log(error) + }); + + } + /* + * 发送至按钮 + * */ + Senttothe=()=>{ + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/search_user_courses.json"; + this.setState({ + Senttothetype:true + }) + + axios.get(url, { + params: { + page:1, + limit:10 + }}).then((response) => { + this.setState({ + courses_count:response.data.courses_count, + course_list:response.data.course_list + }) + }).catch((error) => { + console.log(error) + }); + } + + SenttotheSearch=(value)=>{ + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/search_user_courses.json?search="+value; + axios.get(url, { + params: { + page:1, + limit:10 + }}).then((response) => { + this.setState({ + courses_count:response.data.courses_count, + course_list:response.data.course_list, + pages:1, + Searchvalue:value + }) + }).catch((error) => { + console.log(error) + }); + } + + onChangeSenttothevcalue=(e)=>{ + this.setState({ + Senttothevcalue:e.target.value + }) + } + onChangesendeSenttothe=(pageNumber)=>{ + let{Searchvalue}=this.state; + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/search_user_courses.json?search="+Searchvalue; + axios.get(url, { + params: { + page:pageNumber, + limit:10 + }}).then((response) => { + this.setState({ + courses_count:response.data.courses_count, + course_list:response.data.course_list, + pagenum: pageNumber, + pages: pageNumber + }) + }).catch((error) => { + console.log(error) + }); + } + sendeSenttothevcalue=()=>{ + let {Senttothevcalue}=this.state; + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/send_to_course.json"; + axios.post(url,{ + course_id:Senttothevcalue + }).then((response) => { + this.props.showSnackbar(response.data.message); + this.setState({ + Senttothetype:false, + Searchvalue:"", + pages:1 + }) + window.location.href = response.data.url; + + }).catch((error) => { + console.log(error) + }); + + } + + hideSenttothevcalue=()=>{ + this.setState({ + Senttothetype:false, + Searchvalue:"", + pages:1 + }) + + + } + + /* + * 撤销发布按钮 + * */ + cancel_publish=()=>{ + + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/cancel_publish.json"; + axios.get(url).then((response) => { + this.props.showSnackbar(response.data.message); + window.location.reload() + }).catch((error) => { + console.log(error) + }); + } + + + /* + * 申请发布按钮 + * */ + applyrelease=()=>{ + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/publish.json"; + axios.get(url).then((response) => { + let evaluation_set_position + if(response.data.evaluation_set_position===null){ + evaluation_set_position=[] + }else{ + evaluation_set_position=response.data.evaluation_set_position + } + this.setState({ + Issuevisible:true, + tag_position:response.data.tag_position, + evaluation_set_position:evaluation_set_position, + publishboxstatus:response.data.status, + }) + }).catch((error) => { + console.log(error) + }); + }; + + hiddenIssuevisible=(val)=>{ + this.setState({ + Issuevisible:false + }) + if(val===0||val===1){ + window.location.reload() + } + + } + + //重置按钮 + // resetshixunCombat=(id)=>{ + // let zrl="/myshixuns/"+id+"/reset_my_game.json"; + // axios.get(zrl).then((response) => { + // window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges"; + // message.success('重置成功'); + // }).catch((error) => { + // console.log(error) + // }); + // } + + hidestartshixunsreplace=(url)=>{ + this.setState({ + isSpin:true, + }) + axios.get(url).then((response) => { + if(response.status===200){ + let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; + this.props.history.push(path); + this.setState({ + shixunsreplace:false, + isSpin:false, + }) + message.success('重置成功,正在进入实训!'); + this.startshixunCombat(); + }} + ).catch((error) => { + this.setState({ + startbtn:false, + shixunsreplace:false + }) + }); + + } + //开始实战按钮 + startshixunCombat=()=>{ + let {shixunsDetails} = this.props + if( shixunsDetails.status>1){ + this.setState({ + startbtn:true, + hidestartshixunsreplacevalue:"" + }) + }else{ + this.setState({ + hidestartshixunsreplacevalue:"" + }) + } + + + let id = this.props.match.params.shixunId; + let url="/shixuns/"+id+"/shixun_exec.json"; + axios.get(url).then((response) => { + if(response.status===200){ + if(response.data.status===-2){ + // this.resetshixunCombat(response.data.message); + this.setState({ + startbtn:false, + shixunsreplace:true, + hidestartshixunsreplacevalue:response.data.message+".json" + }) + }else if(response.data.status===-1){ + console.log(response) + }else if(response.data.status===-3){ + this.setState({ + shixunsmessage:response.data.message, + startshixunCombattype:true, + startbtn:false + }) + }else{ + // let path="/tasks/"+response.data.game_identifier; + // this.props.history.push(path); + + + // this.context.router.history.push(path); + if(response.data.status!=401){ + window.location.href = "/tasks/"+response.data.game_identifier; + } + + } + } + }).catch((error) => { + this.setState({ + startbtn:false + }) + }); + } + + tocertification=()=>{ + let{certi_url}=this.state; + this.setState({ + Forkauthentication:false + }) + window.location.href=certi_url; + } + + SenttotheValue=(e)=>{ + this.setState({ + Searchvalue:e.target.value + }) + } + + hidestartshixunCombattype=()=>{ + this.setState({ + startshixunCombattype:false + }) + } + + + + render() { + let { + Forkvisible, + Senttothetype, + Senttothevcalue, + evaluation_set_position, + Forkauthentication, + can_fork, + certi_url, + tag_position, + courses_count, + course_list, + Issuevisible, + publishboxstatus, + showradios, + startbtn, + Searchvalue, + startshixunCombattype, + shixunsmessage, + pages, + shixunsreplace, + hidestartshixunsreplacevalue, + Forkvisibletype, + isIE} = this.state; + let {shixunsDetails, shixunId, star_info, star_infos} = this.props; + let challengeBtnTipText = ''; + let challengeBtnText = '模拟实战'; + // let star_info=[] + // if (shixunsDetails.status === 0) { + // + // } else if (shixunsDetails.status === 1) { + // + // } else if (shixunsDetails.status === 2) { + // challengeBtnTipText = '开始学习并完成实战任务' + // + // } + if(shixunsDetails!=undefined){ + if (shixunsDetails.status === 0 ) { + challengeBtnText = '继续实战' + } else if (shixunsDetails.status === 1) { + challengeBtnText = '查看实战' + } else if (shixunsDetails.status === 3) { + challengeBtnText = '继续实战' + }else{ + challengeBtnText = "开始实战" + } + } + + + // let list=shixunsDetails.task_operation; + // if(list!=undefined){ + // if (shixunsDetails.status === 0 ) { + // for(var i=0; i{ + $("#ratePanel").show(); + this.setState({ + showradios:true + }) + },()=>{ + $("#ratePanel").hide(); + this.setState({ + showradios:false + }) + }) + + const radioStyle = { + display: 'block', + height: '30px', + lineHeight: '30px', + }; + + + return ( + + shixunsDetails===undefined?"": +
    +
    + +
    +

    + {shixunsDetails.name} + { + shixunsDetails.fork_from === undefined || shixunsDetails.fork_from === null ? "" : + + + + } + +

    +
    +
      +
    • + 学习人数 + {shixunsDetails.stu_num} +
    • + {/*
    • */} + {/*经验值*/} + {/*{shixunsDetails.experience}*/} + {/*
    • */} +
    • + 难度系数 + {shixunsDetails.diffcult} + +
    • +
    + +
    + +
    + +
    +
    +
    + +
    +
    +
    + {star_infos[0]}分 + 总评分 +
    + {showradios === true ? + + : ""} +
    +
    +
    +
    +
    +
    + {showradios === true ? + + : ""} +
    + + {star_infos[1]}% +
    +
    +
    + {showradios === true ? + + : ""} +
    + + {star_infos[2]}% +
    +
    +
    + {showradios === true ? + + : ""} +
    + + {star_infos[3]}% +
    +
    +
    + {showradios === true ? + + : ""} +
    + + {star_infos[4]}% +
    +
    +
    + {showradios === true ? + + : ""} +
    + + {star_infos[5]}% +
    +
    +
    +
    +
    + +
    + + { + startbtn === false ? + + + {shixunsDetails.task_operation === undefined ? "" : shixunsDetails.status > 1 ? shixunsDetails.task_operation[0] : "模拟实战"} + + + : "" + } + + +
    +

    本实训的开启时间:{shixunsmessage}
    开启时间之前不能挑战 +

    +
    +
    + {/*取消*/} + 知道啦 +
    + {/*

    */} + {/*知道了*/} + {/*

    */} +
    + + + + +
    +

    实训已经更新了,正在为您重置!

    +
    + +
    +
    + + + + + + { + startbtn === true ? + 开启中 : "" + } + + {/*{*/} + {/*shixunsDetails.status=== 3 && shixunsDetails.task_operation[0]==="开始实战"?*/} + {/*{shixunsDetails.task_operation===undefined?"":shixunsDetails.task_operation[0]}:""*/} + {/*}*/} + + {shixunsDetails.status === 0 && this.props.identity < 4 ? + 申请发布 : "" + } + + + { + publishboxstatus === 0 ?
    +

    + 发布申请已提交,请等待管理员的审核
    +

    +
    : publishboxstatus === 1 ? +
    +

    + 发布申请已提交,请等待管理员的审核
    + • 我们将在1-2个工作日内完成审核 +

    +
    : publishboxstatus === 2 ?
    +

    + 第 + { + evaluation_set_position.map((item, key) => { + return ( + {item}, + ) + }) + } + 关评测设置尚未完成,无法申请发布 +

    +
    : publishboxstatus === 3 ? +
    +

    + 每一个关卡至少需要一个技能标签
    + 第 + { + tag_position.map((item, key) => { + return ( + {item}, + ) + }) + } + 关尚未设置技能标签,请补充 +

    +
    : +
    +

    + 尚未创建任务的实训,不能申请发布 +

    +
    + } + + +
    + + {shixunsDetails.status === 1 && this.props.identity < 4 ? + 撤销发布 : "" + } + + { + + + 发送至 + + + } + + +
    +
    + +
    + 选择的实训将会发送到指定课堂 +
    + +
    + this.SenttotheSearch(value)} + style={{width: '100%'}} + /> +
    + +
    12?"cdefault mb20":"cdefault mb50"}> +
    +
      + + { + course_list === undefined ? "" : course_list.map((item, key) => { + return ( + {item.name} + ) + }) + } + +
    +
    +
    + +
    + 12 ? "block" : "none"}} + showQuickJumper defaultCurrent={1} current={pages} pageSize={12} + total={courses_count} onChange={this.onChangesendeSenttothe}/> + + 确定 + + 取消 +
    + +
    +
    +
    + + {shixunsDetails.status === 3 && + 已关闭 + } + +
    + + + Fork + + + + + {Forkvisibletype===true? + + : +
    +

    复制将在后台执行
    平台将为你创建一个新的同名实训和内容,请问是否继续?

    +
    +
    + 取消 + 确定 +
    +
    + } + + +
    + + +

    {can_fork}
    请问是否前往进行认证?

    +
    +
    + + +
    +
    + {!!shixunsDetails.fork_num && + + {shixunsDetails.fork_num} + + } + +
    + +
    + +
    + +
    +
    正在等待管理员的审核。在审核通过前,可以随时撤销发布
    +
    + + ); + } +} + +export default TPMBanner; + From 83efdf9abe1e2d61fc4c1f4725c4e6ace82692bc Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 18:57:16 +0800 Subject: [PATCH 098/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/coursesPublic/Startshixuntask.js | 3 ++- public/react/src/modules/tpm/TPMBanner.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js index b994e9005..3f256fbcc 100644 --- a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js +++ b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js @@ -78,7 +78,8 @@ class Startshixuntask extends Component{ ).catch((error) => { this.setState({ startbtn:false, - shixunsreplace:false + shixunsreplace:false, + isSpin:false, }) }); diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 1106b7a3f..78feed436 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -340,7 +340,8 @@ class TPMBanner extends Component { ).catch((error) => { this.setState({ startbtn:false, - shixunsreplace:false + shixunsreplace:false, + isSpin:false }) }); From a2f621701441be69a22d57ff7b0411ddac763cf4 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 19:03:31 +0800 Subject: [PATCH 099/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMBanner.js | 30 +++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 78feed436..14ddcc579 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -328,8 +328,8 @@ class TPMBanner extends Component { }) axios.get(url).then((response) => { if(response.status===200){ - let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; - this.props.history.push(path); + // let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; + // this.props.history.push(path); this.setState({ shixunsreplace:false, isSpin:false, @@ -346,6 +346,32 @@ class TPMBanner extends Component { }); } + + + shixunexec=(url)=>{ + this.setState({ + isSpin:true, + }) + axios.get(url).then((response) => { + if(response.status===200){ + // let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; + // this.props.history.push(path); + this.setState({ + shixunsreplace:false, + isSpin:false, + }) + message.success('重置成功,正在进入实训!'); + this.startshixunCombat(); + }} + ).catch((error) => { + this.setState({ + startbtn:false, + shixunsreplace:false, + isSpin:false + }) + }); + + } //开始实战按钮 startshixunCombat=()=>{ let {shixunsDetails} = this.props From c71bb0a58ad818e57e546880711242eecbdc2691 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, 22 Jun 2019 19:03:55 +0800 Subject: [PATCH 100/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/context/TPIContextProvider.js | 1734 ++++++++-------- .../courses/coursesPublic/Startshixuntask.js | 324 +-- .../shixunHomework/ShixunhomeWorkItem.js | 2 +- public/react/src/modules/tpm/TPMBanner.js | 1834 ++++++++--------- .../tpm/shixunchild/Challenges/Challenges.js | 2 +- 5 files changed, 1948 insertions(+), 1948 deletions(-) diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index d5d8715f5..881a596e1 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -1,867 +1,867 @@ -import React, { Component } from 'react'; -import ReactDOM from 'react-dom'; - -import axios from 'axios'; -import Snackbar from 'material-ui/Snackbar'; -import Fade from 'material-ui/transitions/Fade'; - -import update from 'immutability-helper' - -import Dialog, { - DialogActions, - DialogContent, - DialogContentText, - DialogTitle, -} from 'material-ui/Dialog'; - -import Button from 'material-ui/Button'; - -import EvaluateSuccessEffectDisplay from './EvaluateSuccessEffectDisplay' - -import _ from 'lodash' - -/* - 若干js库 - http://inorganik.github.io/countUp.js/ - -*/ -/* - 切下一关需要更新: - LeftViewContainer state.gameAnswer -*/ - -import TPIContext from './TPIContext' -import { EDU_ADMIN, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER - , EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL} from 'educoder' -import { MuiThemeProvider, createMuiTheme, withStyles } from 'material-ui/styles'; -import MUIDialogStyleUtil from '../modules/page/component/MUIDialogStyleUtil' - -const styles = MUIDialogStyleUtil.getTwoButtonStyle() - -// 主题自定义 -const theme = createMuiTheme({ - palette: { - primary: { - main: '#4CACFF', - contrastText: 'rgba(255, 255, 255, 0.87)' - }, - secondary: { main: '#4CACFF' }, // This is just green.A700 as hex. - }, -}); - -const testSetsExpandedArrayInitVal = [false, false, false, false, false, - false, false, false, false, false, - false, false, false, false, false, - false, false, false, false, false] -window.__fetchAllFlag = false; // 是否调用过fetchAll TODO 如何多次使用provider? -class TPIContextProvider extends Component { - constructor(props) { - super(props) - this.onRunCodeTestFinish = this.onRunCodeTestFinish.bind(this) - this.onRunChooseTestFinish = this.onRunChooseTestFinish.bind(this) - this.testSetUnlock = this.testSetUnlock.bind(this) - - this.onTestSetHeaderClick = this.onTestSetHeaderClick.bind(this) - - this.onShowPrevStage = this.onShowPrevStage.bind(this) - this.onShowNextStage = this.onShowNextStage.bind(this) - - this.readGameAnswer = this.readGameAnswer.bind(this) - this.praisePlus = this.praisePlus.bind(this) - - this.onGamePassed = this.onGamePassed.bind(this) - - this.onPathChange = this.onPathChange.bind(this) - - this.showSnackbar = this.showSnackbar.bind(this) - this.showDialog = this.showDialog.bind(this) - - this.onShowUpdateDialog = this.onShowUpdateDialog.bind(this) - this.updateDialogClose = this.updateDialogClose.bind(this) - - // this.showEffectDisplay(); - - this.state = { - loading: true, // 正在加载数据 - gDialogOpen: false, - currentGamePassed: false, // 当前game评测通过 - currentPassedGameGainGold: 0, // 当前通过的game获得的金币数 - currentPassedGameGainExperience: 0, // 当前通过的game获得的经验数 - - user: {}, - challenge: {}, - shixun_name: '', - hide_code: false, - - showUpdateDialog: false, - - testSetsExpandedArray: testSetsExpandedArrayInitVal.slice(0), - } - } - - showEffectDisplay = (data) => { - const dom = document.getElementById('picture_display'); - window.$(dom).show(); - ReactDOM.render(, dom); - } - - onShowUpdateDialog() { - this.setState({showUpdateDialog: true}) - } - // updateNowSuccess true 立即更新成功 - // TODO updateDialogClose方法名不对, 改为updateDialogCallback - updateDialogClose(nextUpdateSuccess, updateNowSuccess) { - const { myshixun } = this.state; - if (nextUpdateSuccess) { - myshixun.system_tip = true; - } - let { tpm_cases_modified, tpm_modified, tpm_script_modified } = this.state; - if (updateNowSuccess) { - tpm_cases_modified = false; - tpm_modified = false; - tpm_script_modified = false; - } - this.setState({ - myshixun, - tpm_cases_modified, - tpm_modified, - tpm_script_modified, - showUpdateDialog: false - }) - } - - componentWillUnmount() { - this.costTimeInterval && window.clearInterval(this.costTimeInterval) - } - componentDidMount() { - - // TODO 登录状态的判断? - // request - // var shixunId = this.props.match.params.shixunId; - var stageId = this.props.match.params.stageId; - - window.__fetchAllFlag = false; - this.fetchAll(stageId); - - this.costTimeInterval = window.setInterval(()=> { - const { game } = this.state; - if (!game || game.status === 2) { // 已完成的任务不需要计时 - return; - } - if (game.cost_time || game.cost_time === 0) { - // game.cost_time += 1; - this.setState({ - game: update(game, {cost_time: { $set: (game.cost_time+1) }}) - }) - } - }, 1000) - - // 页面离开时存下用户的任务耗时 - - window.$(window).unload( ()=>{ - this._updateCostTime(); - }); - } - // force 评测通过后,异步执行该方法,强制同步costTime到服务端 - _updateCostTime(async = false, force) { - const { game, loading } = this.state; - // TODO 还有一种情况,通关后cost_time计时停止,没法通过这个判断 - if (!force && (loading || !game || game.status === 2)) { - return; // 已完成的任务不需要处理 - } - let testPath = '' - if (window.location.port == 3007) { - testPath = 'https://testeduplus2.educoder.net' - } - // var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time` - var url = `${testPath}/api/tasks/${ game.identifier }/cost_time` - window.$.ajax({ - type: 'get', - url: url, - async: async, //IMPORTANT, the call will be synchronous - data: { - time: game.cost_time - } - }).done((data) => { - console.log('complete'); - }); - } - - onGamePassed(passed) { - const { game } = this.state - // 随便给个分,以免重新评测时又出现评星组件(注意:目前game.star没有显示在界面上,如果有则不能这么做) - // game.star = 6; - this.setState({ - game: update(game, {star: { $set: 6 }}), - currentGamePassed: !!passed - }) - } - onTestSetHeaderClick(index) { - // let { testSetsExpandedArray } = this.state; - let testSetsExpandedArray; - // 一次只打开一个 - if (this.state.testSetsExpandedArray[index] === false) { - testSetsExpandedArray = testSetsExpandedArrayInitVal.slice(0); - } else { - testSetsExpandedArray = this.state.testSetsExpandedArray.slice(0); - } - testSetsExpandedArray[index] = !testSetsExpandedArray[index]; - this.setState({ - testSetsExpandedArray, - }) - } - - onShowPrevStage() { - - } - onShowNextStage() { - window.__fetchAllFlag = false; - console.log('onShowNextStage.........') - // this.fetchAll('vznhx7mctwfq') - } - - componentWillReceiveProps(newProps, oldProps) { - var newStageId = newProps.match.params.stageId; - if (!this.props || newStageId !== this.props.match.params.stageId) { - window.__fetchAllFlag = false; - this.fetchAll(newStageId) - } - } - - - // praise_tread/praise_plus?obj_id=569&obj_type=Challenge&horizontal=true&game_praise=true - /* - TODO 旧的接口在未登录时的返回值 - //获取登录页面地址 -var signinPath = '/'; -var htmlvalue = '

    提示

    '+ - '

    您还没有登录,请登录后再执行此操作,谢谢!

    '; -pop_box_new(htmlvalue, 480, 182); - */ - praisePlus() { - const { challenge, game } = this.state; - let praise = true; - const url = `/tasks/${game.identifier}/plus_or_cancel_praise.json` - // const url = `/praise_tread/praise_plus?obj_id=${challenge.id}&obj_type=Challenge&horizontal=${praise}&game_praise=true` - axios.post(url) - .then((response) => { - - if (response.data) { - const { praise_count, praise } = response.data; - // challenge.praise_count = praise_tread_count; - // challenge.user_praise = praise; - this.setState({ challenge: update(challenge, - { - praise_count: { $set: praise_count }, - user_praise: { $set: praise }, - }) - }) - } - - }) - .catch(function (error) { - console.log(error); - }); - } - - onPathChange(index) { - let { challenge } = this.state; - // challenge = Object.assign({}, challenge) - // challenge.pathIndex = index; - this.setState({ - challenge: update(challenge, {pathIndex: { $set: index }}), - }) - // TODO load new path content - } - - updateChallengePath = (path) => { - const challenge = this.state.challenge; - if (challenge.path === path) { - return; - } - const { myshixun } = this.state; - // myshixun.system_tip = false; - - - challenge.path = path; - const newChallenge = this.handleChallengePath(challenge); - this.setState({ challenge: newChallenge, - myshixun: update(myshixun, {system_tip: { $set: false }}), - }) - } - - handleChallengePath(challenge) { - if (challenge.path && typeof challenge.path === "string") { // 多path的处理 - let path = challenge.path.split(';'); - _.remove(path, (item)=> !item) - if (path.length > 1) { - challenge.path = path; - challenge.multiPath = true; - } else { - challenge.path = challenge.path.replace(';', '').trim() // 多path 改为单path 出现了 aaa.java;的情况 - challenge.multiPath = false; - } - } - challenge.pathIndex = 0; - return challenge; - } - - newResData2OldResData(newResData) { - newResData.latest_output = newResData.last_compile_output - // newResData.power - newResData.record = newResData.record_onsume_time - - // 老版用的hide_code - newResData.hide_code = newResData.shixun.hide_code; - - newResData.image_url = newResData.user.image_url - newResData.grade = newResData.user.grade - newResData.user_url = newResData.user.user_url - newResData.username = newResData.user.name - - newResData.output_sets = {} - // newResData.output_sets.had_test_count = newResData.test_sets_count - newResData.output_sets.test_sets = newResData.test_sets // JSON.stringify() - newResData.output_sets.test_sets_count = newResData.test_sets_count - // newResData.output_sets.had_passed_testsests_error_count = newResData.sets_error_count - newResData.output_sets.had_passed_testsests_error_count = newResData.test_sets_count - - newResData.sets_error_count - // allowed_hidden_testset - // sets_error_count - // test_sets_count - // test_sets - // had_passed_testsests_error_count - // test_sets - // test_sets - - return newResData - } - // 将若干数据重新组织一下 - _handleResponseData(resData_arg) { - const resData = this.newResData2OldResData(Object.assign({}, resData_arg)) - let challenge = resData.challenge; - challenge.isHtml = false; - challenge.isWeb = false; - challenge.isAndroid = false; - challenge.showLanguagePictrue = false; - challenge.hasAnswer = resData.has_answer; - - let output_sets = resData.output_sets; - if (resData.st === 0) { // 代码题 - challenge = this.handleChallengePath(challenge) - - const mirror_name = (resData.mirror_name && resData.mirror_name.join) - ? resData.mirror_name.join(';') : (resData.mirror_name || ''); - if (mirror_name.indexOf('Html') !== -1) { - challenge.isHtml = true; - challenge.showLanguagePictrue = true; - } else if (mirror_name.indexOf('Web') !== -1 || mirror_name.indexOf('JFinal') !== -1) { - challenge.isWeb = true; - } else if (mirror_name.indexOf('Android') !== -1) { - challenge.isAndroid = true; - } - - if (output_sets && output_sets.test_sets && typeof output_sets.test_sets == 'string') { - const test_sets_array = JSON.parse("[" + output_sets.test_sets + "]"); - output_sets.test_sets_array = test_sets_array; - } else { - output_sets.test_sets_array = output_sets.test_sets - } - - } else { // 选择题 - // 选择题题干markdown初始化 - const $ = window.$ - window.setTimeout(()=>{ - var lens = $("#choiceRepositoryView textarea").length; - - for(var i = 1; i <= lens; i++){ - window.editormd.markdownToHTML("choose_subject_" + i, { - htmlDecode: "style,script,iframe", // you can filter tags decode - taskList: true, - tex: true, // 数学公式 - // flowChart: true, // 默认不解析 - // sequenceDiagram: true // 默认不解析 - }); - } - }, 400) - } - challenge.user_praise = resData.user_praise; - challenge.praise_count = resData.praise_count; - challenge.showWebDisplayButton = false; - resData.challenge = challenge; - - // 将一些属性写到game上 - let game = resData.game; - game.prev_game = resData.prev_game; - game.next_game = resData.next_game; - resData.game = game; - - const { tpm_cases_modified, tpm_modified, tpm_script_modified, myshixun } = resData; - if (myshixun.system_tip) { - // system_tip为true的时候 不弹框提示用户更新 - resData.showUpdateDialog = false - } else { - let needUpdateScript = (tpm_modified || tpm_script_modified) && challenge.st === 0; - resData.showUpdateDialog = needUpdateScript || tpm_cases_modified - } - - /** - email: "721773699@qq.com" - grade: 213996 - identity: 1 - image_url: "avatars/User/1" - login: "innov" - name: "Coder" - user_url: "/users/innov" - */ - let user = resData.user; - user.username = resData.user.name; - user.user_url = `/user/${resData.user.login}`; - // user.image_url = resData.image_url; - user.is_teacher = resData.is_teacher; - resData.user = user; - this._handleUserAuthor(resData) - // TODO 测试 - // resData.power = 0; - - this.setState({ - ...resData, - - currentGamePassed: false, - loading: false, - testSetsExpandedArray: testSetsExpandedArrayInitVal.slice(0), - }) - - window.document.title = resData.shixun.name - - window.__myshixun = resData.myshixun; // tpi_html_show需要用到 - } - _handleUserAuthor(resData) { - // tpi tpm权限控制 - // const EDU_ADMIN = 1 // 超级管理员 - // const EDU_SHIXUN_MANAGER = 2 // 实训管理员 - // const EDU_SHIXUN_MEMBER = 3 // 实训成员 - // const EDU_CERTIFICATION_TEACHER = 4 // 平台认证的老师 - // const EDU_GAME_MANAGER = 5 // TPI的创建者 - // const EDU_TEACHER = 6 // 平台老师,但是未认证 - // const EDU_NORMAL = 7 // 普通用户 - - // myshixun_manager power is_teacher - resData.power = 0 - resData.myshixun_manager = false - resData.is_teacher = false - - if (resData.user.identity === EDU_ADMIN) { - resData.power = 1 - resData.myshixun_manager = true - } else if (resData.user.identity === EDU_SHIXUN_MANAGER) { - resData.power = 1 - resData.myshixun_manager = true - } else if (resData.user.identity === EDU_SHIXUN_MEMBER) { - resData.power = 1 - resData.myshixun_manager = true - } else if (resData.user.identity === EDU_CERTIFICATION_TEACHER) { - resData.power = 1 - resData.is_teacher = true - - } else if (resData.user.identity === EDU_TEACHER) { - resData.is_teacher = true - } else if (resData.user.identity === EDU_NORMAL) { - - } - return resData - } - - fetchAll(stageId) { - - if (window.__fetchAllFlag == true ) { - console.log('TPIContextProvider call fetchAll repeatly!') - return; - } - // 切换关卡的时候,同步costTime - this._updateCostTime(true); - - if (!stageId) { - // stageId = 'zl6kx8f7vfpo'; - // http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo - } - - // var url = `/api/v1/games/${stageId}` - var url = `/tasks/${stageId}.json` - - // {"status":1,"message":"undefined method `authenticate!' for #"} - window.__fetchAllFlag = true; - - - this.setState({ - loading: true, - currentGamePassed: false, // 切换game时重置passed字段 - }) - - axios.get(url, { - // https://stackoverflow.com/questions/48861290/the-value-of-the-access-control-allow-origin-header-in-the-response-must-not-b - // withCredentials: true, - }) - .then((response) => { - // {"status":1,"message":"Unauthorized. \u7528\u6237\u8ba4\u8bc1\u5931\u8d25."} - - if (response.data.status == 403) { - window.location.href = "/403"; - return; - } - if (response.data.status == 404) { - window.location.href = '/myshixuns/not_found' - return; - } - - this._handleResponseData(response.data) - - }) - .catch(function (error) { - console.log(error); - }); - - } - - readGameAnswer(resData) { - // game.final_score = resData.final_score; - if (resData.final_score) { - var game = this.state.game; - this.setState({ - game: update(game, {final_score: { $set: resData.final_score }}), - grade: resData.grade - }) - } else { - this.setState({ - grade: resData.grade - }) - } - - } - closeTaskResultLayer() { - this.setState({ - currentGamePassed: false - }) - } - onRunChooseTestFinish(response) { - const { test_sets, challenge_chooses_count, choose_correct_num, grade, experience, gold, had_submmit, next_game } = response; - response.had_submmit = true; // 是否已提交 - const { game } = this.state; - let currentGamePassed = false - if (challenge_chooses_count === choose_correct_num) { - game.status = 2; - game.next_game = next_game; - - currentGamePassed = true; - - - this._updateCostTime(true, true); - } - this.setState({ - choose_test_cases: response, - grade: grade, - - game, - next_game, - currentGamePassed: currentGamePassed, - currentPassedGameGainGold: gold, - currentPassedGameGainExperience: experience, - }) - } - language_display(data) { - const { game, tomcat_url } = this.state; - const $ = window.$; - const challenge = Object.assign({}, this.state.challenge) - if(challenge.isWeb && data.port != -1) { - // var $result = $("#php_display"); - challenge.showWebDisplayButton = true; // ActionView处是否出现查看效果按钮 - const path = challenge.web_route || challenge.path - const webDisplayUrl = `${tomcat_url}:${data.port}/${path}` - challenge.webDisplayUrl = webDisplayUrl - challenge.showLanguagePictrue = true; // 评测通过弹出层是否出现查看效果按钮 - } - // else if(challenge.isAndroid && data.picture != 0){ - // // https://www.educoder.net/shixuns/qrcode?game_id=218589&_=1525571882782 - // $.ajax({ - // url: `/shixuns/qrcode?game_id=${game.id}`, - // dataType: 'script' - // }); - // challenge.showLanguagePictrue = true; - // } - else if(data.picture != 0){ - // 对应服务端erb文件为 _picture_display.html.erb - // $.ajax({ - // url: "/users/picture_show?game_id="+data.picture, - // cache: false, - // dataType: 'script' - // }); - - /** - { - "type": "image", - "orignal_picture": [], - "user_picture": [], - "answer_picture": [] - } - */ - const url = `/tasks/${game.identifier}/picture_display.json` - axios.get(url) - .then((response) => { - // response.data.type qrcode_str - this.showEffectDisplay(response.data) - }) - - challenge.showLanguagePictrue = true; - } - this.setState({ - challenge - }) - } - onRunCodeTestFinish(response) { - console.log('onRunCodeTestFinish', response) - const { test_sets, test_sets_count, test_sets_hidden_count, test_sets_public_count - , had_test_count, had_passed_testsests_error_count, had_passed_testsests_hidden_count - , had_passed_testsests_public_count, final_score, gold, experience, latest_output, status - , had_done, score, tag_count, power, record, next_game, grade, picture, - sets_error_count, last_compile_output, record_consume_time} = response; - - const { game } = this.state; - - const currentGamePassed = this.props.game !== 2 && status === 2 - - currentGamePassed && this.language_display(response); - - // 评测通过了,立即同步costTime - currentGamePassed && this._updateCostTime(true, true); - - if (currentGamePassed) { - game.status = 2; - game.next_game = next_game; - - } else { - this.showDialog({ - contentText:
    -
    评测未通过
    -
    详情请参见“测试结果”
    -
    , - isSingleButton: true - }) - } - - const output_sets = { - "test_sets": test_sets, - "test_sets_array": test_sets, - "had_test_count": had_test_count || test_sets_count, - "test_sets_count": test_sets_count, - // "had_passed_testsests_error_count": had_passed_testsests_error_count, - "had_passed_testsests_error_count": test_sets_count - sets_error_count, - "test_sets_hidden_count": test_sets_hidden_count, - "test_sets_public_count": test_sets_public_count, - "had_passed_testsests_hidden_count": had_passed_testsests_hidden_count, - "had_passed_testsests_public_count": had_passed_testsests_public_count - }; - // if (output_sets && output_sets.test_sets) { - // const test_sets_array = JSON.parse("[" + output_sets.test_sets + "]"); - // output_sets.test_sets_array = test_sets_array; - // } - - - this.setState({ - testSetsExpandedArray: testSetsExpandedArrayInitVal.slice(0), // 重置测试集展开状态 - currentGamePassed, - currentPassedGameGainGold: gold, - currentPassedGameGainExperience: experience, - - output_sets, - game, - next_game, - - latest_output: last_compile_output, - record: record_consume_time, - grade, - had_done, - - }) - } - resetTestSetsExpandedArray = () => { - this.setState({ - testSetsExpandedArray: testSetsExpandedArrayInitVal.slice(0), // 重置测试集展开状态 - }) - } - - testSetUnlock() { - const { game } = this.state; - const url = `/v1/games/${game.identifier}/check_test_sets.json` - axios.get(url, { - withCredentials: true, - }) - .then((response) => { - // TODO status -2 重复操作,直接解锁 - if (response.data.test_sets == -1) { - console.error('testSetUnlock失败!') - this.showSnackbar(response.data.message) - return; - } else { - // 被扣除的金币,是负数 - const deltaScore = response.data.score; - // output_sets - let { output_sets } = this.state; - output_sets = Object.assign({}, output_sets); - const test_sets_array = JSON.parse("[" + response.data.test_sets + "]"); - output_sets.test_sets_array = test_sets_array; - this.setState({ - output_sets: output_sets, - grade: this.state.grade + deltaScore, - game : update(game, {test_sets_view: { $set: true }}), - testSetsExpandedArray: testSetsExpandedArrayInitVal.slice(0) - }) - this.handleGdialogClose(); - } - - }) - .catch(function (error) { - console.log(error); - }); - } - - handleSnackbarClose() { - this.setState({ - snackbarOpen: false, - snackbarVertical: '', - snackbarHorizontal: '', - }) - } - // 全局的snackbar this.props.showSnackbar调用即可 - showSnackbar(text, vertical, horizontal) { - this.setState({ - snackbarOpen: true, - snackbarText: text, - snackbarVertical: vertical, - snackbarHorizontal: horizontal, - }) - } - - /* - TODO 写成HOC组件,更好复用 - 全局的Dialog this.props.showDialog调用即可 - @param contentText dialog显示的提示文本 - @param callback 确定按钮回调方法 - @param moreButtonsRender 除了“确定”、“取消”按钮外的其他按钮 - @param okButtonText “确定”按钮显示文本,如 继续查看 - */ - showDialog(params) { - const { contentText, callback, moreButtonsRender, okButtonText, isSingleButton } = params; - - this.dialogOkCallback = callback; - this.moreButtonsRender = moreButtonsRender - this.okButtonText = okButtonText; - this.isSingleButton = isSingleButton; - this.setState({ - gDialogOpen: true, - gDialogContentText: contentText - }) - } - onGdialogOkBtnClick() { - - this.dialogOkCallback && this.dialogOkCallback(); - // this.setState({ - // gDialogOpen: true - // }) - } - handleGdialogClose = () => { - this.setState({ - gDialogOpen: false - }) - } - render() { - const { classes } = this.props; - return ( - this.closeTaskResultLayer(), - - onPathChange: this.onPathChange, - updateChallengePath: this.updateChallengePath, - - showSnackbar: this.showSnackbar, - showDialog: this.showDialog, - handleGdialogClose: () => this.handleGdialogClose(), - - onShowUpdateDialog: this.onShowUpdateDialog, - updateDialogClose: this.updateDialogClose, - - match: this.props.match - }} - > - this.handleGdialogClose()} - > - {"提示"} - - - {this.state.gDialogContentText} - - - - { this.isSingleButton ?
    - 知道啦 -
    : - - - - } - {this.moreButtonsRender && this.moreButtonsRender()} -
    -
    - - this.handleSnackbarClose()} - transition={Fade} - SnackbarContentProps={{ - 'aria-describedby': 'message-id', - }} - resumeHideDuration={2000} - message={{this.state.snackbarText}} - /> - {this.props.children} -
    - ) - } -} - -export default withStyles(styles) (TPIContextProvider); - - - +import React, { Component } from 'react'; +import ReactDOM from 'react-dom'; + +import axios from 'axios'; +import Snackbar from 'material-ui/Snackbar'; +import Fade from 'material-ui/transitions/Fade'; + +import update from 'immutability-helper' + +import Dialog, { + DialogActions, + DialogContent, + DialogContentText, + DialogTitle, +} from 'material-ui/Dialog'; + +import Button from 'material-ui/Button'; + +import EvaluateSuccessEffectDisplay from './EvaluateSuccessEffectDisplay' + +import _ from 'lodash' + +/* + 若干js库 + http://inorganik.github.io/countUp.js/ + +*/ +/* + 切下一关需要更新: + LeftViewContainer state.gameAnswer +*/ + +import TPIContext from './TPIContext' +import { EDU_ADMIN, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER + , EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL} from 'educoder' +import { MuiThemeProvider, createMuiTheme, withStyles } from 'material-ui/styles'; +import MUIDialogStyleUtil from '../modules/page/component/MUIDialogStyleUtil' + +const styles = MUIDialogStyleUtil.getTwoButtonStyle() + +// 主题自定义 +const theme = createMuiTheme({ + palette: { + primary: { + main: '#4CACFF', + contrastText: 'rgba(255, 255, 255, 0.87)' + }, + secondary: { main: '#4CACFF' }, // This is just green.A700 as hex. + }, +}); + +const testSetsExpandedArrayInitVal = [false, false, false, false, false, + false, false, false, false, false, + false, false, false, false, false, + false, false, false, false, false] +window.__fetchAllFlag = false; // 是否调用过fetchAll TODO 如何多次使用provider? +class TPIContextProvider extends Component { + constructor(props) { + super(props) + this.onRunCodeTestFinish = this.onRunCodeTestFinish.bind(this) + this.onRunChooseTestFinish = this.onRunChooseTestFinish.bind(this) + this.testSetUnlock = this.testSetUnlock.bind(this) + + this.onTestSetHeaderClick = this.onTestSetHeaderClick.bind(this) + + this.onShowPrevStage = this.onShowPrevStage.bind(this) + this.onShowNextStage = this.onShowNextStage.bind(this) + + this.readGameAnswer = this.readGameAnswer.bind(this) + this.praisePlus = this.praisePlus.bind(this) + + this.onGamePassed = this.onGamePassed.bind(this) + + this.onPathChange = this.onPathChange.bind(this) + + this.showSnackbar = this.showSnackbar.bind(this) + this.showDialog = this.showDialog.bind(this) + + this.onShowUpdateDialog = this.onShowUpdateDialog.bind(this) + this.updateDialogClose = this.updateDialogClose.bind(this) + + // this.showEffectDisplay(); + + this.state = { + loading: true, // 正在加载数据 + gDialogOpen: false, + currentGamePassed: false, // 当前game评测通过 + currentPassedGameGainGold: 0, // 当前通过的game获得的金币数 + currentPassedGameGainExperience: 0, // 当前通过的game获得的经验数 + + user: {}, + challenge: {}, + shixun_name: '', + hide_code: false, + + showUpdateDialog: false, + + testSetsExpandedArray: testSetsExpandedArrayInitVal.slice(0), + } + } + + showEffectDisplay = (data) => { + const dom = document.getElementById('picture_display'); + window.$(dom).show(); + ReactDOM.render(, dom); + } + + onShowUpdateDialog() { + this.setState({showUpdateDialog: true}) + } + // updateNowSuccess true 立即更新成功 + // TODO updateDialogClose方法名不对, 改为updateDialogCallback + updateDialogClose(nextUpdateSuccess, updateNowSuccess) { + const { myshixun } = this.state; + if (nextUpdateSuccess) { + myshixun.system_tip = true; + } + let { tpm_cases_modified, tpm_modified, tpm_script_modified } = this.state; + if (updateNowSuccess) { + tpm_cases_modified = false; + tpm_modified = false; + tpm_script_modified = false; + } + this.setState({ + myshixun, + tpm_cases_modified, + tpm_modified, + tpm_script_modified, + showUpdateDialog: false + }) + } + + componentWillUnmount() { + this.costTimeInterval && window.clearInterval(this.costTimeInterval) + } + componentDidMount() { + + // TODO 登录状态的判断? + // request + // var shixunId = this.props.match.params.shixunId; + var stageId = this.props.match.params.stageId; + + window.__fetchAllFlag = false; + this.fetchAll(stageId); + + this.costTimeInterval = window.setInterval(()=> { + const { game } = this.state; + if (!game || game.status === 2) { // 已完成的任务不需要计时 + return; + } + if (game.cost_time || game.cost_time === 0) { + // game.cost_time += 1; + this.setState({ + game: update(game, {cost_time: { $set: (game.cost_time+1) }}) + }) + } + }, 1000) + + // 页面离开时存下用户的任务耗时 + + window.$(window).unload( ()=>{ + this._updateCostTime(); + }); + } + // force 评测通过后,异步执行该方法,强制同步costTime到服务端 + _updateCostTime(async = false, force) { + const { game, loading } = this.state; + // TODO 还有一种情况,通关后cost_time计时停止,没法通过这个判断 + if (!force && (loading || !game || game.status === 2)) { + return; // 已完成的任务不需要处理 + } + let testPath = '' + if (window.location.port == 3007) { + testPath = 'https://testeduplus2.educoder.net' + } + // var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time` + var url = `${testPath}/api/tasks/${ game.identifier }/cost_time` + window.$.ajax({ + type: 'get', + url: url, + async: async, //IMPORTANT, the call will be synchronous + data: { + time: game.cost_time + } + }).done((data) => { + console.log('complete'); + }); + } + + onGamePassed(passed) { + const { game } = this.state + // 随便给个分,以免重新评测时又出现评星组件(注意:目前game.star没有显示在界面上,如果有则不能这么做) + // game.star = 6; + this.setState({ + game: update(game, {star: { $set: 6 }}), + currentGamePassed: !!passed + }) + } + onTestSetHeaderClick(index) { + // let { testSetsExpandedArray } = this.state; + let testSetsExpandedArray; + // 一次只打开一个 + if (this.state.testSetsExpandedArray[index] === false) { + testSetsExpandedArray = testSetsExpandedArrayInitVal.slice(0); + } else { + testSetsExpandedArray = this.state.testSetsExpandedArray.slice(0); + } + testSetsExpandedArray[index] = !testSetsExpandedArray[index]; + this.setState({ + testSetsExpandedArray, + }) + } + + onShowPrevStage() { + + } + onShowNextStage() { + window.__fetchAllFlag = false; + console.log('onShowNextStage.........') + // this.fetchAll('vznhx7mctwfq') + } + + componentWillReceiveProps(newProps, oldProps) { + var newStageId = newProps.match.params.stageId; + if (!this.props || newStageId !== this.props.match.params.stageId) { + window.__fetchAllFlag = false; + this.fetchAll(newStageId) + } + } + + + // praise_tread/praise_plus?obj_id=569&obj_type=Challenge&horizontal=true&game_praise=true + /* + TODO 旧的接口在未登录时的返回值 + //获取登录页面地址 +var signinPath = '/'; +var htmlvalue = '

    提示

    '+ + '

    您还没有登录,请登录后再执行此操作,谢谢!

    '; +pop_box_new(htmlvalue, 480, 182); + */ + praisePlus() { + const { challenge, game } = this.state; + let praise = true; + const url = `/tasks/${game.identifier}/plus_or_cancel_praise.json` + // const url = `/praise_tread/praise_plus?obj_id=${challenge.id}&obj_type=Challenge&horizontal=${praise}&game_praise=true` + axios.post(url) + .then((response) => { + + if (response.data) { + const { praise_count, praise } = response.data; + // challenge.praise_count = praise_tread_count; + // challenge.user_praise = praise; + this.setState({ challenge: update(challenge, + { + praise_count: { $set: praise_count }, + user_praise: { $set: praise }, + }) + }) + } + + }) + .catch(function (error) { + console.log(error); + }); + } + + onPathChange(index) { + let { challenge } = this.state; + // challenge = Object.assign({}, challenge) + // challenge.pathIndex = index; + this.setState({ + challenge: update(challenge, {pathIndex: { $set: index }}), + }) + // TODO load new path content + } + + updateChallengePath = (path) => { + const challenge = this.state.challenge; + if (challenge.path === path) { + return; + } + const { myshixun } = this.state; + // myshixun.system_tip = false; + + + challenge.path = path; + const newChallenge = this.handleChallengePath(challenge); + this.setState({ challenge: newChallenge, + myshixun: update(myshixun, {system_tip: { $set: false }}), + }) + } + + handleChallengePath(challenge) { + if (challenge.path && typeof challenge.path === "string") { // 多path的处理 + let path = challenge.path.split(';'); + _.remove(path, (item)=> !item) + if (path.length > 1) { + challenge.path = path; + challenge.multiPath = true; + } else { + challenge.path = challenge.path.replace(';', '').trim() // 多path 改为单path 出现了 aaa.java;的情况 + challenge.multiPath = false; + } + } + challenge.pathIndex = 0; + return challenge; + } + + newResData2OldResData(newResData) { + newResData.latest_output = newResData.last_compile_output + // newResData.power + newResData.record = newResData.record_onsume_time + + // 老版用的hide_code + newResData.hide_code = newResData.shixun.hide_code; + + newResData.image_url = newResData.user.image_url + newResData.grade = newResData.user.grade + newResData.user_url = newResData.user.user_url + newResData.username = newResData.user.name + + newResData.output_sets = {} + // newResData.output_sets.had_test_count = newResData.test_sets_count + newResData.output_sets.test_sets = newResData.test_sets // JSON.stringify() + newResData.output_sets.test_sets_count = newResData.test_sets_count + // newResData.output_sets.had_passed_testsests_error_count = newResData.sets_error_count + newResData.output_sets.had_passed_testsests_error_count = newResData.test_sets_count + - newResData.sets_error_count + // allowed_hidden_testset + // sets_error_count + // test_sets_count + // test_sets + // had_passed_testsests_error_count + // test_sets + // test_sets + + return newResData + } + // 将若干数据重新组织一下 + _handleResponseData(resData_arg) { + const resData = this.newResData2OldResData(Object.assign({}, resData_arg)) + let challenge = resData.challenge; + challenge.isHtml = false; + challenge.isWeb = false; + challenge.isAndroid = false; + challenge.showLanguagePictrue = false; + challenge.hasAnswer = resData.has_answer; + + let output_sets = resData.output_sets; + if (resData.st === 0) { // 代码题 + challenge = this.handleChallengePath(challenge) + + const mirror_name = (resData.mirror_name && resData.mirror_name.join) + ? resData.mirror_name.join(';') : (resData.mirror_name || ''); + if (mirror_name.indexOf('Html') !== -1) { + challenge.isHtml = true; + challenge.showLanguagePictrue = true; + } else if (mirror_name.indexOf('Web') !== -1 || mirror_name.indexOf('JFinal') !== -1) { + challenge.isWeb = true; + } else if (mirror_name.indexOf('Android') !== -1) { + challenge.isAndroid = true; + } + + if (output_sets && output_sets.test_sets && typeof output_sets.test_sets == 'string') { + const test_sets_array = JSON.parse("[" + output_sets.test_sets + "]"); + output_sets.test_sets_array = test_sets_array; + } else { + output_sets.test_sets_array = output_sets.test_sets + } + + } else { // 选择题 + // 选择题题干markdown初始化 + const $ = window.$ + window.setTimeout(()=>{ + var lens = $("#choiceRepositoryView textarea").length; + + for(var i = 1; i <= lens; i++){ + window.editormd.markdownToHTML("choose_subject_" + i, { + htmlDecode: "style,script,iframe", // you can filter tags decode + taskList: true, + tex: true, // 数学公式 + // flowChart: true, // 默认不解析 + // sequenceDiagram: true // 默认不解析 + }); + } + }, 400) + } + challenge.user_praise = resData.user_praise; + challenge.praise_count = resData.praise_count; + challenge.showWebDisplayButton = false; + resData.challenge = challenge; + + // 将一些属性写到game上 + let game = resData.game; + game.prev_game = resData.prev_game; + game.next_game = resData.next_game; + resData.game = game; + + const { tpm_cases_modified, tpm_modified, tpm_script_modified, myshixun } = resData; + if (myshixun.system_tip) { + // system_tip为true的时候 不弹框提示用户更新 + resData.showUpdateDialog = false + } else { + let needUpdateScript = (tpm_modified || tpm_script_modified) && challenge.st === 0; + resData.showUpdateDialog = needUpdateScript || tpm_cases_modified + } + + /** + email: "721773699@qq.com" + grade: 213996 + identity: 1 + image_url: "avatars/User/1" + login: "innov" + name: "Coder" + user_url: "/users/innov" + */ + let user = resData.user; + user.username = resData.user.name; + user.user_url = `/user/${resData.user.login}`; + // user.image_url = resData.image_url; + user.is_teacher = resData.is_teacher; + resData.user = user; + this._handleUserAuthor(resData) + // TODO 测试 + // resData.power = 0; + + this.setState({ + ...resData, + + currentGamePassed: false, + loading: false, + testSetsExpandedArray: testSetsExpandedArrayInitVal.slice(0), + }) + + window.document.title = resData.shixun.name + + window.__myshixun = resData.myshixun; // tpi_html_show需要用到 + } + _handleUserAuthor(resData) { + // tpi tpm权限控制 + // const EDU_ADMIN = 1 // 超级管理员 + // const EDU_SHIXUN_MANAGER = 2 // 实训管理员 + // const EDU_SHIXUN_MEMBER = 3 // 实训成员 + // const EDU_CERTIFICATION_TEACHER = 4 // 平台认证的老师 + // const EDU_GAME_MANAGER = 5 // TPI的创建者 + // const EDU_TEACHER = 6 // 平台老师,但是未认证 + // const EDU_NORMAL = 7 // 普通用户 + + // myshixun_manager power is_teacher + resData.power = 0 + resData.myshixun_manager = false + resData.is_teacher = false + + if (resData.user.identity === EDU_ADMIN) { + resData.power = 1 + resData.myshixun_manager = true + } else if (resData.user.identity === EDU_SHIXUN_MANAGER) { + resData.power = 1 + resData.myshixun_manager = true + } else if (resData.user.identity === EDU_SHIXUN_MEMBER) { + resData.power = 1 + resData.myshixun_manager = true + } else if (resData.user.identity === EDU_CERTIFICATION_TEACHER) { + resData.power = 1 + resData.is_teacher = true + + } else if (resData.user.identity === EDU_TEACHER) { + resData.is_teacher = true + } else if (resData.user.identity === EDU_NORMAL) { + + } + return resData + } + + fetchAll(stageId) { + + if (window.__fetchAllFlag == true ) { + console.log('TPIContextProvider call fetchAll repeatly!') + return; + } + // 切换关卡的时候,同步costTime + this._updateCostTime(true); + + if (!stageId) { + // stageId = 'zl6kx8f7vfpo'; + // http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo + } + + // var url = `/api/v1/games/${stageId}` + var url = `/tasks/${stageId}.json` + + // {"status":1,"message":"undefined method `authenticate!' for #"} + window.__fetchAllFlag = true; + + + this.setState({ + loading: true, + currentGamePassed: false, // 切换game时重置passed字段 + }) + + axios.get(url, { + // https://stackoverflow.com/questions/48861290/the-value-of-the-access-control-allow-origin-header-in-the-response-must-not-b + // withCredentials: true, + }) + .then((response) => { + // {"status":1,"message":"Unauthorized. \u7528\u6237\u8ba4\u8bc1\u5931\u8d25."} + + if (response.data.status == 403) { + window.location.href = "/403"; + return; + } + if (response.data.status == 404) { + window.location.href = '/myshixuns/not_found' + return; + } + + this._handleResponseData(response.data) + + }) + .catch(function (error) { + console.log(error); + }); + + } + + readGameAnswer(resData) { + // game.final_score = resData.final_score; + if (resData.final_score) { + var game = this.state.game; + this.setState({ + game: update(game, {final_score: { $set: resData.final_score }}), + grade: resData.grade + }) + } else { + this.setState({ + grade: resData.grade + }) + } + + } + closeTaskResultLayer() { + this.setState({ + currentGamePassed: false + }) + } + onRunChooseTestFinish(response) { + const { test_sets, challenge_chooses_count, choose_correct_num, grade, experience, gold, had_submmit, next_game } = response; + response.had_submmit = true; // 是否已提交 + const { game } = this.state; + let currentGamePassed = false + if (challenge_chooses_count === choose_correct_num) { + game.status = 2; + game.next_game = next_game; + + currentGamePassed = true; + + + this._updateCostTime(true, true); + } + this.setState({ + choose_test_cases: response, + grade: grade, + + game, + next_game, + currentGamePassed: currentGamePassed, + currentPassedGameGainGold: gold, + currentPassedGameGainExperience: experience, + }) + } + language_display(data) { + const { game, tomcat_url } = this.state; + const $ = window.$; + const challenge = Object.assign({}, this.state.challenge) + if(challenge.isWeb && data.port != -1) { + // var $result = $("#php_display"); + challenge.showWebDisplayButton = true; // ActionView处是否出现查看效果按钮 + const path = challenge.web_route || challenge.path + const webDisplayUrl = `${tomcat_url}:${data.port}/${path}` + challenge.webDisplayUrl = webDisplayUrl + challenge.showLanguagePictrue = true; // 评测通过弹出层是否出现查看效果按钮 + } + // else if(challenge.isAndroid && data.picture != 0){ + // // https://www.educoder.net/shixuns/qrcode?game_id=218589&_=1525571882782 + // $.ajax({ + // url: `/shixuns/qrcode?game_id=${game.id}`, + // dataType: 'script' + // }); + // challenge.showLanguagePictrue = true; + // } + else if(data.picture != 0){ + // 对应服务端erb文件为 _picture_display.html.erb + // $.ajax({ + // url: "/users/picture_show?game_id="+data.picture, + // cache: false, + // dataType: 'script' + // }); + + /** + { + "type": "image", + "orignal_picture": [], + "user_picture": [], + "answer_picture": [] + } + */ + const url = `/tasks/${game.identifier}/picture_display.json` + axios.get(url) + .then((response) => { + // response.data.type qrcode_str + this.showEffectDisplay(response.data) + }) + + challenge.showLanguagePictrue = true; + } + this.setState({ + challenge + }) + } + onRunCodeTestFinish(response) { + console.log('onRunCodeTestFinish', response) + const { test_sets, test_sets_count, test_sets_hidden_count, test_sets_public_count + , had_test_count, had_passed_testsests_error_count, had_passed_testsests_hidden_count + , had_passed_testsests_public_count, final_score, gold, experience, latest_output, status + , had_done, score, tag_count, power, record, next_game, grade, picture, + sets_error_count, last_compile_output, record_consume_time} = response; + + const { game } = this.state; + + const currentGamePassed = this.props.game !== 2 && status === 2 + + currentGamePassed && this.language_display(response); + + // 评测通过了,立即同步costTime + currentGamePassed && this._updateCostTime(true, true); + + if (currentGamePassed) { + game.status = 2; + game.next_game = next_game; + + } else { + this.showDialog({ + contentText:
    +
    评测未通过
    +
    详情请参见“测试结果”
    +
    , + isSingleButton: true + }) + } + + const output_sets = { + "test_sets": test_sets, + "test_sets_array": test_sets, + "had_test_count": had_test_count || test_sets_count, + "test_sets_count": test_sets_count, + // "had_passed_testsests_error_count": had_passed_testsests_error_count, + "had_passed_testsests_error_count": test_sets_count - sets_error_count, + "test_sets_hidden_count": test_sets_hidden_count, + "test_sets_public_count": test_sets_public_count, + "had_passed_testsests_hidden_count": had_passed_testsests_hidden_count, + "had_passed_testsests_public_count": had_passed_testsests_public_count + }; + // if (output_sets && output_sets.test_sets) { + // const test_sets_array = JSON.parse("[" + output_sets.test_sets + "]"); + // output_sets.test_sets_array = test_sets_array; + // } + + + this.setState({ + testSetsExpandedArray: testSetsExpandedArrayInitVal.slice(0), // 重置测试集展开状态 + currentGamePassed, + currentPassedGameGainGold: gold, + currentPassedGameGainExperience: experience, + + output_sets, + game, + next_game, + + latest_output: last_compile_output, + record: record_consume_time, + grade, + had_done, + + }) + } + resetTestSetsExpandedArray = () => { + this.setState({ + testSetsExpandedArray: testSetsExpandedArrayInitVal.slice(0), // 重置测试集展开状态 + }) + } + + testSetUnlock() { + const { game } = this.state; + const url = `/v1/games/${game.identifier}/check_test_sets.json` + axios.get(url, { + withCredentials: true, + }) + .then((response) => { + // TODO status -2 重复操作,直接解锁 + if (response.data.test_sets == -1) { + console.error('testSetUnlock失败!') + this.showSnackbar(response.data.message) + return; + } else { + // 被扣除的金币,是负数 + const deltaScore = response.data.score; + // output_sets + let { output_sets } = this.state; + output_sets = Object.assign({}, output_sets); + const test_sets_array = JSON.parse("[" + response.data.test_sets + "]"); + output_sets.test_sets_array = test_sets_array; + this.setState({ + output_sets: output_sets, + grade: this.state.grade + deltaScore, + game : update(game, {test_sets_view: { $set: true }}), + testSetsExpandedArray: testSetsExpandedArrayInitVal.slice(0) + }) + this.handleGdialogClose(); + } + + }) + .catch(function (error) { + console.log(error); + }); + } + + handleSnackbarClose() { + this.setState({ + snackbarOpen: false, + snackbarVertical: '', + snackbarHorizontal: '', + }) + } + // 全局的snackbar this.props.showSnackbar调用即可 + showSnackbar(text, vertical, horizontal) { + this.setState({ + snackbarOpen: true, + snackbarText: text, + snackbarVertical: vertical, + snackbarHorizontal: horizontal, + }) + } + + /* + TODO 写成HOC组件,更好复用 + 全局的Dialog this.props.showDialog调用即可 + @param contentText dialog显示的提示文本 + @param callback 确定按钮回调方法 + @param moreButtonsRender 除了“确定”、“取消”按钮外的其他按钮 + @param okButtonText “确定”按钮显示文本,如 继续查看 + */ + showDialog(params) { + const { contentText, callback, moreButtonsRender, okButtonText, isSingleButton } = params; + + this.dialogOkCallback = callback; + this.moreButtonsRender = moreButtonsRender + this.okButtonText = okButtonText; + this.isSingleButton = isSingleButton; + this.setState({ + gDialogOpen: true, + gDialogContentText: contentText + }) + } + onGdialogOkBtnClick() { + + this.dialogOkCallback && this.dialogOkCallback(); + // this.setState({ + // gDialogOpen: true + // }) + } + handleGdialogClose = () => { + this.setState({ + gDialogOpen: false + }) + } + render() { + const { classes } = this.props; + return ( + this.closeTaskResultLayer(), + + onPathChange: this.onPathChange, + updateChallengePath: this.updateChallengePath, + + showSnackbar: this.showSnackbar, + showDialog: this.showDialog, + handleGdialogClose: () => this.handleGdialogClose(), + + onShowUpdateDialog: this.onShowUpdateDialog, + updateDialogClose: this.updateDialogClose, + + match: this.props.match + }} + > + this.handleGdialogClose()} + > + {"提示"} + + + {this.state.gDialogContentText} + + + + { this.isSingleButton ?
    + 知道啦 +
    : + + + + } + {this.moreButtonsRender && this.moreButtonsRender()} +
    +
    + + this.handleSnackbarClose()} + transition={Fade} + SnackbarContentProps={{ + 'aria-describedby': 'message-id', + }} + resumeHideDuration={2000} + message={{this.state.snackbarText}} + /> + {this.props.children} +
    + ) + } +} + +export default withStyles(styles) (TPIContextProvider); + + + diff --git a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js index 064ec645a..9a9a98f8f 100644 --- a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js +++ b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js @@ -1,163 +1,163 @@ -import React,{ Component } from "react"; -import { WordsBtn } from 'educoder'; -import {Tooltip,message,Modal} from 'antd'; -import {Link} from 'react-router-dom'; -import axios from 'axios'; -import Modals from '../../modals/Modals'; - - - -class Startshixuntask extends Component{ - constructor(props){ - super(props); - this.state = { - startbtn:false - } - - } - - componentDidMount() { - - } - - taskoperationId=(list)=>{ - this.setState({ - startbtn:true, - }) - let url= list+".json"; - axios.get(url).then((response) => { - - if(response.status===200){ - if(response.data.status===-2){ - - this.setState({ - startbtn:false, - shixunsreplace:true, - hidestartshixunsreplacevalue:response.data.message+".json" - }) - }else if(response.data.status===-1){ - console.log(response) - }else if(response.data.status===-3){ - this.setState({ - shixunsmessage:response.data.message, - startshixunCombattype:true, - startbtn:false - }) - }else{ - - if(response.data.status!=401&&response.data.status!=403){ - window.location.href = "/tasks/"+response.data.game_identifier; - } - - } - } - }).catch((error) => { - this.setState({ - startbtn:false - }) - }); - - } - - hidestartshixunsreplace=(url)=>{ - axios.get(url).then((response) => { - if(response.status===200){ - - this.setState({ - shixunsreplace:false - }) - message.success('重置成功,正在进入实训!'); - let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; - this.props.history.push(path); - - }} - ).catch((error) => { - this.setState({ - startbtn:false, - shixunsreplace:false - }) - }); - - } - - hidestartshixunCombattype=()=>{ - this.setState({ - startshixunCombattype:false - }) - } - - render(){ - let { - Modalstype, - Modalstopval, - Modalsbottomval, - cardsModalcancel, - cardsModalsavetype, - loadtype, - shixunsreplace, - hidestartshixunsreplacevalue, - startshixunCombattype, - shixunsmessage, - startbtn - } = this.state; - - return( - - - - - -
    -

    实训已经更新了,正在为您重置!

    -
    -
    -
    - -
    -

    本实训的开启时间:{shixunsmessage}
    开启时间之前不能挑战 -

    -
    -
    - {/*取消*/} - 知道啦 -
    - {/*

    */} - {/*知道了*/} - {/*

    */} -
    - - {this.props.isStudent? - - {this.props.data.task_operation&&this.props.data.task_operation?startbtn===false?this.taskoperationId( this.props.data.task_operation[1])}> - {this.props.data.task_operation[0]} - :"开启中":""} - :"" - } - - - ) - } -} +import React,{ Component } from "react"; +import { WordsBtn } from 'educoder'; +import {Tooltip,message,Modal} from 'antd'; +import {Link} from 'react-router-dom'; +import axios from 'axios'; +import Modals from '../../modals/Modals'; + + + +class Startshixuntask extends Component{ + constructor(props){ + super(props); + this.state = { + startbtn:false + } + + } + + componentDidMount() { + + } + + taskoperationId=(list)=>{ + this.setState({ + startbtn:true, + }) + let url= list+".json"; + axios.get(url).then((response) => { + + if(response.status===200){ + if(response.data.status===-2){ + + this.setState({ + startbtn:false, + shixunsreplace:true, + hidestartshixunsreplacevalue:response.data.message+".json" + }) + }else if(response.data.status===-1){ + console.log(response) + }else if(response.data.status===-3){ + this.setState({ + shixunsmessage:response.data.message, + startshixunCombattype:true, + startbtn:false + }) + }else{ + + if(response.data.status!=401&&response.data.status!=403){ + window.location.href = "/tasks/"+response.data.game_identifier; + } + + } + } + }).catch((error) => { + this.setState({ + startbtn:false + }) + }); + + } + + hidestartshixunsreplace=(url)=>{ + axios.get(url).then((response) => { + if(response.status===200){ + + this.setState({ + shixunsreplace:false + }) + message.success('重置成功,正在进入实训!'); + let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; + this.props.history.push(path); + + }} + ).catch((error) => { + this.setState({ + startbtn:false, + shixunsreplace:false + }) + }); + + } + + hidestartshixunCombattype=()=>{ + this.setState({ + startshixunCombattype:false + }) + } + + render(){ + let { + Modalstype, + Modalstopval, + Modalsbottomval, + cardsModalcancel, + cardsModalsavetype, + loadtype, + shixunsreplace, + hidestartshixunsreplacevalue, + startshixunCombattype, + shixunsmessage, + startbtn + } = this.state; + + return( + + + + + +
    +

    实训已经更新了,正在为您重置!

    +
    +
    + + +
    +

    本实训的开启时间:{shixunsmessage}
    开启时间之前不能挑战 +

    +
    +
    + {/*取消*/} + 知道啦 +
    + {/*

    */} + {/*知道了*/} + {/*

    */} +
    + + {this.props.isStudent? + + {this.props.data.task_operation&&this.props.data.task_operation?startbtn===false?this.taskoperationId( this.props.data.task_operation[1])}> + {this.props.data.task_operation[0]} + :"开启中":""} + :"" + } + + + ) + } +} export default Startshixuntask; \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index 8ad70753f..272ac6418 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -210,7 +210,7 @@ class ShixunhomeWorkItem extends Component{
    this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了! + onClick={() => this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了
    { - var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 - var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器 - var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器 - var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; - if(isIE) { - var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); - reIE.test(userAgent); - var fIEVersion = parseFloat(RegExp["$1"]); - if(fIEVersion == 7) { - return 7; - } else if(fIEVersion == 8) { - return 8; - } else if(fIEVersion == 9) { - return 9; - } else if(fIEVersion == 10) { - return 10; - } else { - return 6;//IE版本<=7 - } - } else if(isEdge) { - return 'edge';//edge - } else if(isIE11) { - return 11; //IE11 - }else{ - return -1;//不是ie浏览器 - } - } - componentDidMount() { - let thiisie=this.IEVersion(); - if(thiisie!=-1){ - this.setState({ - isIE:true - }) - }else{ - this.setState({ - isIE:false - }) - } - } - /* - * Fork - * */ - copyForkvisible = () => { - let {shixunsDetails} = this.props; - if (shixunsDetails.can_fork === null) { - this.setState({ - Forkvisible: true - }) - } else { - this.setState({ - Forkvisible: false, - Forkauthentication: true, - can_fork: shixunsDetails.can_fork.can_fork, - certi_url: shixunsDetails.can_fork.certi_url, - }) - } - - } - - hideForkvisible = () => { - this.setState({ - Forkvisible: false, - Forkauthentication:false - }) - } - - addForkvisible = () => { - this.setState({ - Forkvisibletype: true, - }) - let id = this.props.match.params.shixunId; - let url = "/shixuns/" + id + "/copy.json"; - axios.post(url).then((response) => { - if(response.data.status===401){ - - }else{ - this.setState({ - Forkvisible: false, - Forkauthentication: false, - // Forkvisibletype:false - }) - window.location.href = "/shixuns/" + response.data.shixun + "/challenges"; - } - - }).catch((error) => { - console.log(error) - }); - - } - /* - * 发送至按钮 - * */ - Senttothe=()=>{ - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/search_user_courses.json"; - this.setState({ - Senttothetype:true - }) - - axios.get(url, { - params: { - page:1, - limit:10 - }}).then((response) => { - this.setState({ - courses_count:response.data.courses_count, - course_list:response.data.course_list - }) - }).catch((error) => { - console.log(error) - }); - } - - SenttotheSearch=(value)=>{ - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/search_user_courses.json?search="+value; - axios.get(url, { - params: { - page:1, - limit:10 - }}).then((response) => { - this.setState({ - courses_count:response.data.courses_count, - course_list:response.data.course_list, - pages:1, - Searchvalue:value - }) - }).catch((error) => { - console.log(error) - }); - } - - onChangeSenttothevcalue=(e)=>{ - this.setState({ - Senttothevcalue:e.target.value - }) - } - onChangesendeSenttothe=(pageNumber)=>{ - let{Searchvalue}=this.state; - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/search_user_courses.json?search="+Searchvalue; - axios.get(url, { - params: { - page:pageNumber, - limit:10 - }}).then((response) => { - this.setState({ - courses_count:response.data.courses_count, - course_list:response.data.course_list, - pagenum: pageNumber, - pages: pageNumber - }) - }).catch((error) => { - console.log(error) - }); - } - sendeSenttothevcalue=()=>{ - let {Senttothevcalue}=this.state; - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/send_to_course.json"; - axios.post(url,{ - course_id:Senttothevcalue - }).then((response) => { - this.props.showSnackbar(response.data.message); - this.setState({ - Senttothetype:false, - Searchvalue:"", - pages:1 - }) - window.location.href = response.data.url; - - }).catch((error) => { - console.log(error) - }); - - } - - hideSenttothevcalue=()=>{ - this.setState({ - Senttothetype:false, - Searchvalue:"", - pages:1 - }) - - - } - - /* - * 撤销发布按钮 - * */ - cancel_publish=()=>{ - - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/cancel_publish.json"; - axios.get(url).then((response) => { - this.props.showSnackbar(response.data.message); - window.location.reload() - }).catch((error) => { - console.log(error) - }); - } - - - /* - * 申请发布按钮 - * */ - applyrelease=()=>{ - let id = this.props.match.params.shixunId; - let url="/shixuns/" + id +"/publish.json"; - axios.get(url).then((response) => { - let evaluation_set_position - if(response.data.evaluation_set_position===null){ - evaluation_set_position=[] - }else{ - evaluation_set_position=response.data.evaluation_set_position - } - this.setState({ - Issuevisible:true, - tag_position:response.data.tag_position, - evaluation_set_position:evaluation_set_position, - publishboxstatus:response.data.status, - }) - }).catch((error) => { - console.log(error) - }); - }; - - hiddenIssuevisible=(val)=>{ - this.setState({ - Issuevisible:false - }) - if(val===0||val===1){ - window.location.reload() - } - - } - - //重置按钮 - // resetshixunCombat=(id)=>{ - // let zrl="/myshixuns/"+id+"/reset_my_game.json"; - // axios.get(zrl).then((response) => { - // window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges"; - // message.success('重置成功'); - // }).catch((error) => { - // console.log(error) - // }); - // } - - hidestartshixunsreplace=(url)=>{ - axios.get(url).then((response) => { - if(response.status===200){ - let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; - this.props.history.push(path); - this.setState({ - shixunsreplace:false - }) - message.success('重置成功,正在进入实训!'); - this.startshixunCombat(); - }} - ).catch((error) => { - this.setState({ - startbtn:false, - shixunsreplace:false - }) - }); - - } - //开始实战按钮 - startshixunCombat=()=>{ - let {shixunsDetails} = this.props - if( shixunsDetails.status>1){ - this.setState({ - startbtn:true, - hidestartshixunsreplacevalue:"" - }) - }else{ - this.setState({ - hidestartshixunsreplacevalue:"" - }) - } - - - let id = this.props.match.params.shixunId; - let url="/shixuns/"+id+"/shixun_exec.json"; - axios.get(url).then((response) => { - if(response.status===200){ - if(response.data.status===-2){ - // this.resetshixunCombat(response.data.message); - this.setState({ - startbtn:false, - shixunsreplace:true, - hidestartshixunsreplacevalue:response.data.message+".json" - }) - }else if(response.data.status===-1){ - console.log(response) - }else if(response.data.status===-3){ - this.setState({ - shixunsmessage:response.data.message, - startshixunCombattype:true, - startbtn:false - }) - }else{ - // let path="/tasks/"+response.data.game_identifier; - // this.props.history.push(path); - - - // this.context.router.history.push(path); - if(response.data.status!=401){ - window.location.href = "/tasks/"+response.data.game_identifier; - } - - } - } - }).catch((error) => { - this.setState({ - startbtn:false - }) - }); - } - - tocertification=()=>{ - let{certi_url}=this.state; - this.setState({ - Forkauthentication:false - }) - window.location.href=certi_url; - } - - SenttotheValue=(e)=>{ - this.setState({ - Searchvalue:e.target.value - }) - } - - hidestartshixunCombattype=()=>{ - this.setState({ - startshixunCombattype:false - }) - } - - - - render() { - let { - Forkvisible, - Senttothetype, - Senttothevcalue, - evaluation_set_position, - Forkauthentication, - can_fork, - certi_url, - tag_position, - courses_count, - course_list, - Issuevisible, - publishboxstatus, - showradios, - startbtn, - Searchvalue, - startshixunCombattype, - shixunsmessage, - pages, - shixunsreplace, - hidestartshixunsreplacevalue, - Forkvisibletype, - isIE} = this.state; - let {shixunsDetails, shixunId, star_info, star_infos} = this.props; - let challengeBtnTipText = ''; - let challengeBtnText = '模拟实战'; - // let star_info=[] - // if (shixunsDetails.status === 0) { - // - // } else if (shixunsDetails.status === 1) { - // - // } else if (shixunsDetails.status === 2) { - // challengeBtnTipText = '开始学习并完成实战任务' - // - // } - if(shixunsDetails!=undefined){ - if (shixunsDetails.status === 0 ) { - challengeBtnText = '继续实战' - } else if (shixunsDetails.status === 1) { - challengeBtnText = '查看实战' - } else if (shixunsDetails.status === 3) { - challengeBtnText = '继续实战' - }else{ - challengeBtnText = "开始实战" - } - } - - - // let list=shixunsDetails.task_operation; - // if(list!=undefined){ - // if (shixunsDetails.status === 0 ) { - // for(var i=0; i{ - $("#ratePanel").show(); - this.setState({ - showradios:true - }) - },()=>{ - $("#ratePanel").hide(); - this.setState({ - showradios:false - }) - }) - - const radioStyle = { - display: 'block', - height: '30px', - lineHeight: '30px', - }; - - - return ( - - shixunsDetails===undefined?"": -
    -
    - -
    -

    - {shixunsDetails.name} - { - shixunsDetails.fork_from === undefined || shixunsDetails.fork_from === null ? "" : - - - - } - -

    -
    -
      -
    • - 学习人数 - {shixunsDetails.stu_num} -
    • - {/*
    • */} - {/*经验值*/} - {/*{shixunsDetails.experience}*/} - {/*
    • */} -
    • - 难度系数 - {shixunsDetails.diffcult} - -
    • -
    - -
    - -
    - -
    -
    -
    - -
    -
    -
    - {star_infos[0]}分 - 总评分 -
    - {showradios === true ? - - : ""} -
    -
    -
    -
    -
    -
    - {showradios === true ? - - : ""} -
    - - {star_infos[1]}% -
    -
    -
    - {showradios === true ? - - : ""} -
    - - {star_infos[2]}% -
    -
    -
    - {showradios === true ? - - : ""} -
    - - {star_infos[3]}% -
    -
    -
    - {showradios === true ? - - : ""} -
    - - {star_infos[4]}% -
    -
    -
    - {showradios === true ? - - : ""} -
    - - {star_infos[5]}% -
    -
    -
    -
    -
    - -
    - - { - startbtn === false ? - - - {shixunsDetails.task_operation === undefined ? "" : shixunsDetails.status > 1 ? shixunsDetails.task_operation[0] : "模拟实战"} - - - : "" - } - - -
    -

    本实训的开启时间:{shixunsmessage}
    开启时间之前不能挑战 -

    -
    -
    - {/*取消*/} - 知道啦 -
    - {/*

    */} - {/*知道了*/} - {/*

    */} -
    - - -
    -

    实训已经更新了,正在为您重置!

    -
    - -
    - - - - - - { - startbtn === true ? - 开启中 : "" - } - - {/*{*/} - {/*shixunsDetails.status=== 3 && shixunsDetails.task_operation[0]==="开始实战"?*/} - {/*{shixunsDetails.task_operation===undefined?"":shixunsDetails.task_operation[0]}:""*/} - {/*}*/} - - {shixunsDetails.status === 0 && this.props.identity < 4 ? - 申请发布 : "" - } - - - { - publishboxstatus === 0 ?
    -

    - 发布申请已提交,请等待管理员的审核
    -

    -
    : publishboxstatus === 1 ? -
    -

    - 发布申请已提交,请等待管理员的审核
    - • 我们将在1-2个工作日内完成审核 -

    -
    : publishboxstatus === 2 ?
    -

    - 第 - { - evaluation_set_position.map((item, key) => { - return ( - {item}, - ) - }) - } - 关评测设置尚未完成,无法申请发布 -

    -
    : publishboxstatus === 3 ? -
    -

    - 每一个关卡至少需要一个技能标签
    - 第 - { - tag_position.map((item, key) => { - return ( - {item}, - ) - }) - } - 关尚未设置技能标签,请补充 -

    -
    : -
    -

    - 尚未创建任务的实训,不能申请发布 -

    -
    - } - - -
    - - {shixunsDetails.status === 1 && this.props.identity < 4 ? - 撤销发布 : "" - } - - { - - - 发送至 - - - } - - -
    -
    - -
    - 选择的实训将会发送到指定课堂 -
    - -
    - this.SenttotheSearch(value)} - style={{width: '100%'}} - /> -
    - -
    12?"cdefault mb20":"cdefault mb50"}> -
    -
      - - { - course_list === undefined ? "" : course_list.map((item, key) => { - return ( - {item.name} - ) - }) - } - -
    -
    -
    - -
    - 12 ? "block" : "none"}} - showQuickJumper defaultCurrent={1} current={pages} pageSize={12} - total={courses_count} onChange={this.onChangesendeSenttothe}/> - - 确定 - - 取消 -
    - -
    -
    -
    - - {shixunsDetails.status === 3 && - 已关闭 - } - -
    - - - Fork - - - - - {Forkvisibletype===true? - - : -
    -

    复制将在后台执行
    平台将为你创建一个新的同名实训和内容,请问是否继续?

    -
    -
    - 取消 - 确定 -
    -
    - } - - -
    - - -

    {can_fork}
    请问是否前往进行认证?

    -
    -
    - - -
    -
    - {!!shixunsDetails.fork_num && - - {shixunsDetails.fork_num} - - } - -
    - -
    - -
    - -
    -
    正在等待管理员的审核。在审核通过前,可以随时撤销发布
    -
    - - ); - } -} - -export default TPMBanner; - +import React, { Component } from 'react'; + +import { Redirect } from 'react-router'; + +import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; + +import PropTypes from 'prop-types'; + +import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip} from 'antd'; + +import 'antd/lib/pagination/style/index.css'; + +import axios from 'axios'; + +// import { Rating,Progress } from '@icedesign/base'; + +import Rating from '@icedesign/base/lib/rating'; + +import Progress from '@icedesign/base/lib/progress'; + +// 引入业务组件样式 +import '@icedesign/base/lib/rating/style.js'; + +import '@icedesign/base/lib/progress/style.js'; + +import './shixuns/css/TPMBanner.css'; + +let $ = window.$; + +const Search = Input.Search; + +const RadioGroup = Radio.Group; + +class TPMBanner extends Component { + constructor(props) { + super(props) + this.state={ + Forkvisible: false, + Senttothetype:false, + Senttothevcalue:1, + courses_count:1, + course_list:[], + pagenum:1, + publishbox:"", + publishboxstatus:0, + pages:1, + Issuevisible:false, + evaluation_set_position:[], + tag_position:[], + Forkauthentication:false, + can_fork:undefined, + certi_url:undefined, + showradios:false, + startbtn:false, + Searchvalue:"", + startshixunCombattype:false, + shixunsmessage:"", + shixunsreplace:false, + hidestartshixunsreplacevalue:"", + isIE:false, + Forkvisibletype: false, + } + } + + // star_info:[0, 0, 0, 0, 0, 0], + // star_infos:[0, 0, 0, 0, 0, 0], + // shixunsDetails:{}, + // shixunId: undefined, + // componentWillReceiveProps(newProps, newContext){ + // this.setState({ + // shixunsDetails: newProps.shixunsDetails + // }); + // } + + IEVersion=()=>{ + var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 + var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器 + var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器 + var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; + if(isIE) { + var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); + reIE.test(userAgent); + var fIEVersion = parseFloat(RegExp["$1"]); + if(fIEVersion == 7) { + return 7; + } else if(fIEVersion == 8) { + return 8; + } else if(fIEVersion == 9) { + return 9; + } else if(fIEVersion == 10) { + return 10; + } else { + return 6;//IE版本<=7 + } + } else if(isEdge) { + return 'edge';//edge + } else if(isIE11) { + return 11; //IE11 + }else{ + return -1;//不是ie浏览器 + } + } + componentDidMount() { + let thiisie=this.IEVersion(); + if(thiisie!=-1){ + this.setState({ + isIE:true + }) + }else{ + this.setState({ + isIE:false + }) + } + } + /* + * Fork + * */ + copyForkvisible = () => { + let {shixunsDetails} = this.props; + if (shixunsDetails.can_fork === null) { + this.setState({ + Forkvisible: true + }) + } else { + this.setState({ + Forkvisible: false, + Forkauthentication: true, + can_fork: shixunsDetails.can_fork.can_fork, + certi_url: shixunsDetails.can_fork.certi_url, + }) + } + + } + + hideForkvisible = () => { + this.setState({ + Forkvisible: false, + Forkauthentication:false + }) + } + + addForkvisible = () => { + this.setState({ + Forkvisibletype: true, + }) + let id = this.props.match.params.shixunId; + let url = "/shixuns/" + id + "/copy.json"; + axios.post(url).then((response) => { + if(response.data.status===401){ + + }else{ + this.setState({ + Forkvisible: false, + Forkauthentication: false, + // Forkvisibletype:false + }) + window.location.href = "/shixuns/" + response.data.shixun + "/challenges"; + } + + }).catch((error) => { + console.log(error) + }); + + } + /* + * 发送至按钮 + * */ + Senttothe=()=>{ + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/search_user_courses.json"; + this.setState({ + Senttothetype:true + }) + + axios.get(url, { + params: { + page:1, + limit:10 + }}).then((response) => { + this.setState({ + courses_count:response.data.courses_count, + course_list:response.data.course_list + }) + }).catch((error) => { + console.log(error) + }); + } + + SenttotheSearch=(value)=>{ + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/search_user_courses.json?search="+value; + axios.get(url, { + params: { + page:1, + limit:10 + }}).then((response) => { + this.setState({ + courses_count:response.data.courses_count, + course_list:response.data.course_list, + pages:1, + Searchvalue:value + }) + }).catch((error) => { + console.log(error) + }); + } + + onChangeSenttothevcalue=(e)=>{ + this.setState({ + Senttothevcalue:e.target.value + }) + } + onChangesendeSenttothe=(pageNumber)=>{ + let{Searchvalue}=this.state; + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/search_user_courses.json?search="+Searchvalue; + axios.get(url, { + params: { + page:pageNumber, + limit:10 + }}).then((response) => { + this.setState({ + courses_count:response.data.courses_count, + course_list:response.data.course_list, + pagenum: pageNumber, + pages: pageNumber + }) + }).catch((error) => { + console.log(error) + }); + } + sendeSenttothevcalue=()=>{ + let {Senttothevcalue}=this.state; + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/send_to_course.json"; + axios.post(url,{ + course_id:Senttothevcalue + }).then((response) => { + this.props.showSnackbar(response.data.message); + this.setState({ + Senttothetype:false, + Searchvalue:"", + pages:1 + }) + window.location.href = response.data.url; + + }).catch((error) => { + console.log(error) + }); + + } + + hideSenttothevcalue=()=>{ + this.setState({ + Senttothetype:false, + Searchvalue:"", + pages:1 + }) + + + } + + /* + * 撤销发布按钮 + * */ + cancel_publish=()=>{ + + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/cancel_publish.json"; + axios.get(url).then((response) => { + this.props.showSnackbar(response.data.message); + window.location.reload() + }).catch((error) => { + console.log(error) + }); + } + + + /* + * 申请发布按钮 + * */ + applyrelease=()=>{ + let id = this.props.match.params.shixunId; + let url="/shixuns/" + id +"/publish.json"; + axios.get(url).then((response) => { + let evaluation_set_position + if(response.data.evaluation_set_position===null){ + evaluation_set_position=[] + }else{ + evaluation_set_position=response.data.evaluation_set_position + } + this.setState({ + Issuevisible:true, + tag_position:response.data.tag_position, + evaluation_set_position:evaluation_set_position, + publishboxstatus:response.data.status, + }) + }).catch((error) => { + console.log(error) + }); + }; + + hiddenIssuevisible=(val)=>{ + this.setState({ + Issuevisible:false + }) + if(val===0||val===1){ + window.location.reload() + } + + } + + //重置按钮 + // resetshixunCombat=(id)=>{ + // let zrl="/myshixuns/"+id+"/reset_my_game.json"; + // axios.get(zrl).then((response) => { + // window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges"; + // message.success('重置成功'); + // }).catch((error) => { + // console.log(error) + // }); + // } + + hidestartshixunsreplace=(url)=>{ + axios.get(url).then((response) => { + if(response.status===200){ + // let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; + // this.props.history.push(path); + this.setState({ + shixunsreplace:false + }) + message.success('重置成功,正在进入实训!'); + this.startshixunCombat(); + }} + ).catch((error) => { + this.setState({ + startbtn:false, + shixunsreplace:false + }) + }); + + } + //开始实战按钮 + startshixunCombat=()=>{ + let {shixunsDetails} = this.props + if( shixunsDetails.status>1){ + this.setState({ + startbtn:true, + hidestartshixunsreplacevalue:"" + }) + }else{ + this.setState({ + hidestartshixunsreplacevalue:"" + }) + } + + + let id = this.props.match.params.shixunId; + let url="/shixuns/"+id+"/shixun_exec.json"; + axios.get(url).then((response) => { + if(response.status===200){ + if(response.data.status===-2){ + // this.resetshixunCombat(response.data.message); + this.setState({ + startbtn:false, + shixunsreplace:true, + hidestartshixunsreplacevalue:response.data.message+".json" + }) + }else if(response.data.status===-1){ + console.log(response) + }else if(response.data.status===-3){ + this.setState({ + shixunsmessage:response.data.message, + startshixunCombattype:true, + startbtn:false + }) + }else{ + // let path="/tasks/"+response.data.game_identifier; + // this.props.history.push(path); + + + // this.context.router.history.push(path); + if(response.data.status!=401){ + window.location.href = "/tasks/"+response.data.game_identifier; + } + + } + } + }).catch((error) => { + this.setState({ + startbtn:false + }) + }); + } + + tocertification=()=>{ + let{certi_url}=this.state; + this.setState({ + Forkauthentication:false + }) + window.location.href=certi_url; + } + + SenttotheValue=(e)=>{ + this.setState({ + Searchvalue:e.target.value + }) + } + + hidestartshixunCombattype=()=>{ + this.setState({ + startshixunCombattype:false + }) + } + + + + render() { + let { + Forkvisible, + Senttothetype, + Senttothevcalue, + evaluation_set_position, + Forkauthentication, + can_fork, + certi_url, + tag_position, + courses_count, + course_list, + Issuevisible, + publishboxstatus, + showradios, + startbtn, + Searchvalue, + startshixunCombattype, + shixunsmessage, + pages, + shixunsreplace, + hidestartshixunsreplacevalue, + Forkvisibletype, + isIE} = this.state; + let {shixunsDetails, shixunId, star_info, star_infos} = this.props; + let challengeBtnTipText = ''; + let challengeBtnText = '模拟实战'; + // let star_info=[] + // if (shixunsDetails.status === 0) { + // + // } else if (shixunsDetails.status === 1) { + // + // } else if (shixunsDetails.status === 2) { + // challengeBtnTipText = '开始学习并完成实战任务' + // + // } + if(shixunsDetails!=undefined){ + if (shixunsDetails.status === 0 ) { + challengeBtnText = '继续实战' + } else if (shixunsDetails.status === 1) { + challengeBtnText = '查看实战' + } else if (shixunsDetails.status === 3) { + challengeBtnText = '继续实战' + }else{ + challengeBtnText = "开始实战" + } + } + + + // let list=shixunsDetails.task_operation; + // if(list!=undefined){ + // if (shixunsDetails.status === 0 ) { + // for(var i=0; i{ + $("#ratePanel").show(); + this.setState({ + showradios:true + }) + },()=>{ + $("#ratePanel").hide(); + this.setState({ + showradios:false + }) + }) + + const radioStyle = { + display: 'block', + height: '30px', + lineHeight: '30px', + }; + + + return ( + + shixunsDetails===undefined?"": +
    +
    + +
    +

    + {shixunsDetails.name} + { + shixunsDetails.fork_from === undefined || shixunsDetails.fork_from === null ? "" : + + + + } + +

    +
    +
      +
    • + 学习人数 + {shixunsDetails.stu_num} +
    • + {/*
    • */} + {/*经验值*/} + {/*{shixunsDetails.experience}*/} + {/*
    • */} +
    • + 难度系数 + {shixunsDetails.diffcult} + +
    • +
    + +
    + +
    + +
    +
    +
    + +
    +
    +
    + {star_infos[0]}分 + 总评分 +
    + {showradios === true ? + + : ""} +
    +
    +
    +
    +
    +
    + {showradios === true ? + + : ""} +
    + + {star_infos[1]}% +
    +
    +
    + {showradios === true ? + + : ""} +
    + + {star_infos[2]}% +
    +
    +
    + {showradios === true ? + + : ""} +
    + + {star_infos[3]}% +
    +
    +
    + {showradios === true ? + + : ""} +
    + + {star_infos[4]}% +
    +
    +
    + {showradios === true ? + + : ""} +
    + + {star_infos[5]}% +
    +
    +
    +
    +
    + +
    + + { + startbtn === false ? + + + {shixunsDetails.task_operation === undefined ? "" : shixunsDetails.status > 1 ? shixunsDetails.task_operation[0] : "模拟实战"} + + + : "" + } + + +
    +

    本实训的开启时间:{shixunsmessage}
    开启时间之前不能挑战 +

    +
    +
    + {/*取消*/} + 知道啦 +
    + {/*

    */} + {/*知道了*/} + {/*

    */} +
    + + +
    +

    实训已经更新了,正在为您重置!

    +
    + +
    + + + + + + { + startbtn === true ? + 开启中 : "" + } + + {/*{*/} + {/*shixunsDetails.status=== 3 && shixunsDetails.task_operation[0]==="开始实战"?*/} + {/*{shixunsDetails.task_operation===undefined?"":shixunsDetails.task_operation[0]}:""*/} + {/*}*/} + + {shixunsDetails.status === 0 && this.props.identity < 4 ? + 申请发布 : "" + } + + + { + publishboxstatus === 0 ?
    +

    + 发布申请已提交,请等待管理员的审核
    +

    +
    : publishboxstatus === 1 ? +
    +

    + 发布申请已提交,请等待管理员的审核
    + • 我们将在1-2个工作日内完成审核 +

    +
    : publishboxstatus === 2 ?
    +

    + 第 + { + evaluation_set_position.map((item, key) => { + return ( + {item}, + ) + }) + } + 关评测设置尚未完成,无法申请发布 +

    +
    : publishboxstatus === 3 ? +
    +

    + 每一个关卡至少需要一个技能标签
    + 第 + { + tag_position.map((item, key) => { + return ( + {item}, + ) + }) + } + 关尚未设置技能标签,请补充 +

    +
    : +
    +

    + 尚未创建任务的实训,不能申请发布 +

    +
    + } + + +
    + + {shixunsDetails.status === 1 && this.props.identity < 4 ? + 撤销发布 : "" + } + + { + + + 发送至 + + + } + + +
    +
    + +
    + 选择的实训将会发送到指定课堂 +
    + +
    + this.SenttotheSearch(value)} + style={{width: '100%'}} + /> +
    + +
    12?"cdefault mb20":"cdefault mb50"}> +
    +
      + + { + course_list === undefined ? "" : course_list.map((item, key) => { + return ( + {item.name} + ) + }) + } + +
    +
    +
    + +
    + 12 ? "block" : "none"}} + showQuickJumper defaultCurrent={1} current={pages} pageSize={12} + total={courses_count} onChange={this.onChangesendeSenttothe}/> + + 确定 + + 取消 +
    + +
    +
    +
    + + {shixunsDetails.status === 3 && + 已关闭 + } + +
    + + + Fork + + + + + {Forkvisibletype===true? + + : +
    +

    复制将在后台执行
    平台将为你创建一个新的同名实训和内容,请问是否继续?

    +
    +
    + 取消 + 确定 +
    +
    + } + + +
    + + +

    {can_fork}
    请问是否前往进行认证?

    +
    +
    + + +
    +
    + {!!shixunsDetails.fork_num && + + {shixunsDetails.fork_num} + + } + +
    + +
    + +
    + +
    +
    正在等待管理员的审核。在审核通过前,可以随时撤销发布
    +
    + + ); + } +} + +export default TPMBanner; + diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js index 38584c793..73dcb0b49 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js @@ -529,7 +529,7 @@ class Challenges extends Component {

    实训已经更新了,正在为您重置!

    From 7e7f2b034b821c058be2e28a27da9fccd2042b10 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, 22 Jun 2019 19:06:59 +0800 Subject: [PATCH 101/964] =?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/modules/tpm/TPMBanner.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 67d0296f5..f6355ec51 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -330,12 +330,16 @@ class TPMBanner extends Component { if(response.status===200){ // let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; // this.props.history.push(path); + if(response.data.status===-2){ + this.shixunexec(response.data.message) + } + this.setState({ shixunsreplace:false, isSpin:false, }) - message.success('重置成功,正在进入实训!'); - this.startshixunCombat(); + // message.success('重置成功,正在进入实训!'); + // this.startshixunCombat(); }} ).catch((error) => { this.setState({ From 1a9984fb4b12fc7b3d2d2f4aefafcf1a11213637 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 19:21:47 +0800 Subject: [PATCH 102/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/login/EducoderLogin.js | 6 +- .../src/modules/user/FindPasswordComponent.js | 762 +++++++++--------- .../modules/user/LoginRegisterComponent.js | 6 +- 3 files changed, 387 insertions(+), 387 deletions(-) diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index df5b5f8b8..91e8fac3d 100644 --- a/public/react/src/modules/login/EducoderLogin.js +++ b/public/react/src/modules/login/EducoderLogin.js @@ -149,7 +149,7 @@ class EducoderLogin extends Component { "align-items": "center", "width": "100%", }}> -
    +
    @@ -163,7 +163,7 @@ class EducoderLogin extends Component { "align-items": "center", "width": "100%", }}> -
    +
    @@ -171,7 +171,7 @@ class EducoderLogin extends Component {
    } -
    { - notification.open({ - message: "提示", - description: - messge, - onClick: () => { - console.log('Notification Clicked!'); - }, - }); - }; - StudyMakeMoney = () => { // 调用父组件方法 - this.props.Setshowbool(); - - } - - // 点击表单后,改变type - changeType = () => { - this.setState({classpass: 'password'}); - } - changeTypey = () => { - - } - //倒计时 - getverificationcode = () => { - if (this.state.Phonenumberisnotcobool === false ||this.state.Phonenumberisnotcobool === undefined) { - if (this.state.login&&this.state.login.length === 0) { - this.openNotification("请输入手机号或邮箱"); - return - } else { - this.openNotification("请输入正确的手机号或邮箱"); - } - return; - } - if (this.state.getverificationcodes === true) { - this.setState({ - getverificationcodes: undefined, - }) - let timer = setInterval(() => { - this.setState((preState) => ({ - seconds: preState.seconds - 1, - }), () => { - if (this.state.seconds == 0) { - clearInterval(timer); - this.setState({ - getverificationcodes: false, - seconds: 60, - }) - } - }); - }, 1000) - this.SMSverification(); - } else { - this.setState({ - getverificationcodes: undefined, - }) - let timer = setInterval(() => { - this.setState((preState) => ({ - seconds: preState.seconds - 1, - }), () => { - if (this.state.seconds == 0) { - clearInterval(timer); - this.setState({ - getverificationcodes: false, - seconds: 60, - - }) - } - }); - }, 1000) - this.SMSverification(); - } - } - //短信验证 - SMSverification = () => { - var url = `/accounts/get_verification_code.json`; - axios.get((url), { - params: { - login: this.state.login, - type: 2, - } - }).then((result) => { - //验证有问题{"status":1,"message":"success"} - console.log(result); - - - }).catch((error) => { - console.log(error); - - }) - } - - cancelReadOnly = () => { - this.setState({ - readonlyInput: false, - }) - } - //找回密码 - Retrievepassword = () => { - if (this.state.Phonenumberisnotcobool === false) { - if (this.state.login.length === 0) { - this.openNotification("请输入手机号或邮箱"); - return - } - this.openNotification("请输入正确的手机号或邮箱"); - return; - } - - if (this.state.login === undefined || this.state.login == "") { - this.openNotification(`请输入登录手机号码或邮箱`); - return - } else if (this.state.password === undefined || this.state.password == "") { - this.openNotification(`请输入密码`); - return - } else if (this.state.passwords === undefined || this.state.passwords == "") { - this.openNotification(`请输入密码`); - return - } else if (this.state.password !== this.state.passwords) { - this.openNotification(`两次密码不相同`); - return - } else if (this.state.codes === undefined || this.state.codes == "") { - this.openNotification(`请输入验证码`); - return - } - var url = "/accounts/reset_password.json"; - axios.post(url, { - login: this.state.login, - code: this.state.codes, - new_password: this.state.password, - new_password_confirmation: this.state.passwords, - }).then((result) => { - // console.log(result); - //登录成功,会生成session - this.openNotification("找回密码成功,请重新登入。"); - window.location.href = "/login" - }).catch((error) => { - - }) - - - } - openNotification = (messge) => { - notification.open({ - message: "提示", - description: - messge, - onClick: () => { - console.log('Notification Clicked!'); - }, - }); - }; - loginInputonChange = (e) => { - // console.log(e.target.value); - this.setState({ - login: e.target.value, - }) - - - } - loginInputonChanges = (e) => { - // console.log(e.target.value); - this.setState({ - password: e.target.value, - }) - - - } - loginInputonChangess = (e) => { - // console.log(e.target.value); - this.setState({ - passwords: e.target.value, - }) - - - } - //获取code - codesonChange = (e) => { - this.setState({ - codes: e.target.value - }) - } - inputOnBlur = (e) => { - this.isCorrectname(e.target.value); - // this.Emailphonenumberverification(e.target.value, id); - } - isCorrectname = (value) => { - console.log(value.length); - if (value.length === 0) { - this.setState({ - Phonenumberisnotco: undefined, - Phonenumberisnotcobool: false, - }) - return; - } - // var telephone = $("#telephoneAdd.tianjia_phone").val(); - var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/; - // var email = $("#add_email.tianjia_email").val(); - var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/; - - // [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。 - var stringdata = undefined; - if (!regph.test(value)) { - stringdata = "手机号格式不正确"; - this.setState({ - Phonenumberisnotco: stringdata, - Phonenumberisnotcobool: false, - }) - } else { - this.setState({ - Phonenumberisnotco: undefined, - Phonenumberisnotcobool: true, - }) - return - } - - if (!regemail.test(value)) { - if ((value.indexOf("@") != -1) === true) { - stringdata = "邮箱格式不正确"; - } else { - stringdata = "手机号格式不正确"; - - } - this.setState({ - Phonenumberisnotco: stringdata, - Phonenumberisnotcobool: false, - }) - - this.Emailphonenumberverification(value) - return - } else { - this.setState({ - Phonenumberisnotco: undefined, - Phonenumberisnotcobool: true, - }) - return - } - } - //邮箱手机号验证 - Emailphonenumberverification = (value) => { - var url = `/accounts/valid_email_and_phone.json`; - axios.get((url), { - params: { - login: value, - type: 2, - } - }).then((result) => { - //验证有问题{"status":1,"message":"success"} - // console.log(result); - this.openNotification("验证码已发送,请注意查收!",2); - - - }).catch((error) => { - console.log(error); - // this.setState({ - // login:"", - // logins:"", - // }) - }) - } - - render() { - const { - activeKey, - // 登录 - autoLogin, - // 注册 - readAgreement, dragOk, - login, - password, - passwords, - classpass, - seconds, - getverificationcodes, - Phonenumberisnotco, - readonlyInput, - codes, - } = this.state - // height: 346px; - return ( - -
    - - - - -
    -
    - 找回密码 -
    -
    - - this.inputOnBlur(e)} - onChange={this.loginInputonChange} style={{marginTop: '10px',height: "38px"}}> - { - Phonenumberisnotco && Phonenumberisnotco != "" ? -

    - {Phonenumberisnotco} -

    - :
    - } - - - - -
    - - - { - getverificationcodes === undefined ? - - : getverificationcodes === true ? - - : - - } - - -
    - - -
    -
    - -
    - ); - } + } + + this.inputOnBlur(e)} + onChange={this.loginInputonChange} style={{marginTop: '10px', height: "38px"}}> + { + Phonenumberisnotco && Phonenumberisnotco != "" ? +

    + {Phonenumberisnotco} +

    + :
    + } + + + + +
    + + + { + getverificationcodes === undefined ? + + : getverificationcodes === true ? + + : + + } + + +
    + + +
    +
    + +
    + ); + } } export default (LoginRegisterComponent); diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 587d77375..addd0e81b 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -548,13 +548,13 @@ class LoginRegisterComponent extends Component { // console.log(activeKey); return ( -
    +
    - 登录 - 注册 + 登录 + 注册 { From 66e4a5522b36fe33f428c7c613e2346ce3e3ba17 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 19:37:46 +0800 Subject: [PATCH 103/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/user/LoginRegisterComponent.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index addd0e81b..030103ea2 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -212,8 +212,8 @@ class LoginRegisterComponent extends Component { Phonenumberisnotcos: undefined, Phonenumberisnotcobool: true, }) + this.Emailphonenumberverification(value, id) } - this.Emailphonenumberverification(value, id) return } @@ -222,8 +222,11 @@ class LoginRegisterComponent extends Component { stringdata = "邮箱格式不正确"; } else { stringdata = "手机号格式不正确"; - - } + if (!regph.test(value)) { + // 这里先判断是不是手机号然后在判断是不是邮箱然后又判断是不是手机号,如果不是手机号就是账号 + stringdata=undefined; + } + } if (id === 1) { this.setState({ Phonenumberisnotco: stringdata, @@ -234,8 +237,8 @@ class LoginRegisterComponent extends Component { Phonenumberisnotcos: stringdata, Phonenumberisnotcobool: false, }) + this.Emailphonenumberverification(value, id) } - this.Emailphonenumberverification(value, id) return } else { if (id === 1) { @@ -248,8 +251,8 @@ class LoginRegisterComponent extends Component { Phonenumberisnotcos: undefined, Phonenumberisnotcobool: true, }) + this.Emailphonenumberverification(value, id) } - this.Emailphonenumberverification(value, id) return } } From 97189e671faa0a4ff38258d7212bbed8c92c40b1 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 19:41:20 +0800 Subject: [PATCH 104/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/coursesDetail/CoursesBanner.js | 2 +- public/react/src/modules/user/LoginRegisterComponent.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 3176602bd..cf28a498e 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -53,7 +53,7 @@ class CoursesBanner extends Component { this.onloadupdatabanner() this.setState({ - user_phone_binded :this.props.user_phone_binded, + user_phone_binded :this.props.current_user.user_phone_binded, }) } onloadupdatabanner=()=>{ diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 030103ea2..c5a2175a9 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -222,10 +222,10 @@ class LoginRegisterComponent extends Component { stringdata = "邮箱格式不正确"; } else { stringdata = "手机号格式不正确"; - if (!regph.test(value)) { - // 这里先判断是不是手机号然后在判断是不是邮箱然后又判断是不是手机号,如果不是手机号就是账号 - stringdata=undefined; - } + // if (!regph.test(value)) { + // // 这里先判断是不是手机号然后在判断是不是邮箱然后又判断是不是手机号,如果不是手机号就是账号 + // stringdata=undefined; + // } } if (id === 1) { this.setState({ From a4675215deda263f0a6c2bca8689ae57a7cfc846 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, 22 Jun 2019 19:44:06 +0800 Subject: [PATCH 105/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/Trialapplication.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index 9285bd1f0..77abca50c 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -12,7 +12,7 @@ import {broadcastChannelPostMessage} from 'educoder' import {Tabs, Input, Checkbox, Button, notification, Menu} from 'antd'; -//试用申请页面 +//试用申请 class Trialapplication extends Component { // isRender控制弹出窗口显示 constructor(props) { From ddf72a55507fb020f99bcef7b20b227886efae1b 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, 22 Jun 2019 19:45:11 +0800 Subject: [PATCH 106/964] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 2 +- public/react/src/modules/tpm/TPMBanner.js | 49 ++++++----------------- 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index aa99f16f5..05a4463cd 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -31,7 +31,7 @@ export function initAxiosInterceptors(props) { // proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.educoder.net" proxy = "https://testeduplus2.educoder.net" - + // proxy="http://47.96.87.25:48080" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; // 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制 diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index f6355ec51..51d4cee9f 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -330,14 +330,13 @@ class TPMBanner extends Component { if(response.status===200){ // let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; // this.props.history.push(path); - if(response.data.status===-2){ - this.shixunexec(response.data.message) - } + message.success('重置成功,正在进入实训!'); + this.startshixunCombat(response.data.shixun_identifier); + this.setState({ + shixunsreplace:false, + isSpin:false, + }) - this.setState({ - shixunsreplace:false, - isSpin:false, - }) // message.success('重置成功,正在进入实训!'); // this.startshixunCombat(); }} @@ -352,32 +351,8 @@ class TPMBanner extends Component { } - shixunexec=(url)=>{ - this.setState({ - isSpin:true, - }) - axios.get(url).then((response) => { - if(response.status===200){ - // let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; - // this.props.history.push(path); - this.setState({ - shixunsreplace:false, - isSpin:false, - }) - message.success('重置成功,正在进入实训!'); - this.startshixunCombat(); - }} - ).catch((error) => { - this.setState({ - startbtn:false, - shixunsreplace:false, - isSpin:false - }) - }); - - } //开始实战按钮 - startshixunCombat=()=>{ + startshixunCombat=(id)=>{ let {shixunsDetails} = this.props if( shixunsDetails.status>1){ this.setState({ @@ -391,7 +366,6 @@ class TPMBanner extends Component { } - let id = this.props.match.params.shixunId; let url="/shixuns/"+id+"/shixun_exec.json"; axios.get(url).then((response) => { if(response.status===200){ @@ -402,6 +376,7 @@ class TPMBanner extends Component { shixunsreplace:true, hidestartshixunsreplacevalue:response.data.message+".json" }) + // this.shixunexec(response.data.message+".json") }else if(response.data.status===-1){ console.log(response) }else if(response.data.status===-3){ @@ -541,7 +516,7 @@ class TPMBanner extends Component { lineHeight: '30px', }; - + const antIcon = ; return ( shixunsDetails===undefined?"": @@ -661,7 +636,7 @@ class TPMBanner extends Component { shixunsDetails.task_operation[0] === "查看实战" ? "查看我的实战光辉历史" : shixunsDetails.task_operation[0] === "模拟实战" ? "模拟完成实战任务" : shixunsDetails.task_operation[0] === "开启挑战" ? "开始学习并完成实战任务" : "" }> - this.startshixunCombat(this.props.match.params.shixunId)} className="fr user_default_btn task-btn-orange font-18" id="shixun_operation" data-remote="true" > @@ -698,13 +673,15 @@ class TPMBanner extends Component { closable={false} footer={null} > +

    实训已经更新了,正在为您重置!

    this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了! + onClick={() => this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了
    + Date: Sat, 22 Jun 2019 20:04:52 +0800 Subject: [PATCH 107/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/NewHeader.js | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 5498866cd..bdb6b2a09 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -331,21 +331,21 @@ class NewHeader extends Component { } educoderlogin=()=>{ //退出账号 - this.setState({ - isRender:true - }) - // var url = `/accounts/logout.json`; - - // axios.get((url)).then((result) => { - // if(result!==undefined){ - // // this.setState({ - // // isRender:true - // // }) - // window.location.href = "/"; - // } - // }).catch((error) => { - // console.log(error); + // this.setState({ + // isRender:true // }) + var url = `/accounts/logout.json`; + + axios.get((url)).then((result) => { + if(result!==undefined){ + // this.setState({ + // isRender:true + // }) + window.location.href = "/"; + } + }).catch((error) => { + console.log(error); + }) } onKeywordSearch = () => { From fb6c09f7df290038f689e11bda5b4c6ac615b2f8 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, 22 Jun 2019 20:10:49 +0800 Subject: [PATCH 108/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/coursesDetail/CoursesBanner.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index cf28a498e..9a35a0f81 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -52,9 +52,17 @@ class CoursesBanner extends Component { componentDidMount() { this.onloadupdatabanner() - this.setState({ - user_phone_binded :this.props.current_user.user_phone_binded, - }) + try { + if(this.props.current_user!==undefined){ + this.setState({ + user_phone_binded :this.props.current_user.user_phone_binded, + }) + } + }catch (e) { + console.log("CoursesBanner 60") + console.log(e) + } + } onloadupdatabanner=()=>{ this.updatabanner() From 6f4566e03bd11359b1534f5ff82e05f7359521fc 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, 22 Jun 2019 23:08:50 +0800 Subject: [PATCH 109/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesDetail/CoursesBanner.js | 11 +++++- public/react/src/modules/tpm/NewHeader.js | 35 ++++++++++++++----- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 9a35a0f81..4e3f6a42d 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -344,7 +344,16 @@ class CoursesBanner extends Component { render() { let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state; - + try { + if(this.props.current_user!==undefined){ + this.setState({ + user_phone_binded :this.props.current_user.user_phone_binded, + }) + } + }catch (e) { + console.log("CoursesBanner 354") + console.log(e) + } return (
    diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index bdb6b2a09..17061f530 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -330,6 +330,24 @@ class NewHeader extends Component { }) } educoderlogin=()=>{ + //退出账号 + this.setState({ + isRender:true + }) + // var url = `/accounts/logout.json`; + // + // axios.get((url)).then((result) => { + // if(result!==undefined){ + // // this.setState({ + // // isRender:true + // // }) + // window.location.href = "/"; + // } + // }).catch((error) => { + // console.log(error); + // }) + } + educoderloginysl=()=>{ //退出账号 // this.setState({ // isRender:true @@ -337,17 +355,16 @@ class NewHeader extends Component { var url = `/accounts/logout.json`; axios.get((url)).then((result) => { - if(result!==undefined){ - // this.setState({ - // isRender:true - // }) - window.location.href = "/"; - } + if(result!==undefined){ + // this.setState({ + // isRender:true + // }) + window.location.href = "/"; + } }).catch((error) => { - console.log(error); + console.log(error); }) } - onKeywordSearch = () => { header_search(this) } @@ -729,7 +746,7 @@ submittojoinclass=(value)=>{
  • {/*退出*/} {/*this.educoderlogin()}>退出*/} - this.educoderlogin()}>退出 + this.educoderloginysl()}>退出
  • From 02faf37431c85ed6a3921becce944fbae9309720 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 09:05:31 +0800 Subject: [PATCH 110/964] check admin --- .../modules/courses/members/studentsList.js | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index e75baa3fe..ba29dfccb 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -1,5 +1,5 @@ import React,{ Component } from "react"; -import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin} from "antd"; +import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin, Tooltip} from "antd"; import ClipboardJS from 'clipboard' import '../css/Courses.css' import '../css/members.css' @@ -31,14 +31,6 @@ const dataSource = [{ const buildColumns = (that) => { const columns=[{ - title: '', - dataIndex: 'check', - key: 'check', - render: (text, item) => { - return - }, - width:"5%" - },{ title: '序号', dataIndex: 'id', key: 'id', @@ -71,6 +63,19 @@ const buildColumns = (that) => { width:"50%", className:"color-grey-6" }]; + const isAdmin = that.props.isAdmin() + if (isAdmin) { + columns.unshift({ + title: '', + dataIndex: 'check', + key: 'check', + render: (text, item) => { + return + }, + width:"5%" + }) + } + return columns; } @@ -445,7 +450,14 @@ class studentsList extends Component{ {invite_code} - + +
    成员可以通过邀请码主动加入课堂
    +
    点击立刻复制邀请码
    +
    }> + + + + } @@ -528,7 +540,7 @@ class studentsList extends Component{ total_count > 0 ?
    - 已选 {checkBoxValues.length} 个 + {isAdmin && 已选 {checkBoxValues.length} 个}
    {isAdmin &&
  • 删除
  • } {isAdmin &&
  • From d8fbe0678cf43cb89c7954e0f62cc5f5af5ff939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 24 Jun 2019 09:06:17 +0800 Subject: [PATCH 111/964] =?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/coursesDetail/CoursesBanner.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 4e3f6a42d..f113209c4 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -64,6 +64,15 @@ class CoursesBanner extends Component { } } + componentDidUpdate = (prevProps) => { + if(prevProps.current_user!=this.props.current_user){ + if(this.props.current_user!==undefined){ + this.setState({ + user_phone_binded :this.props.current_user.user_phone_binded, + }) + } + } + } onloadupdatabanner=()=>{ this.updatabanner() } @@ -344,16 +353,7 @@ class CoursesBanner extends Component { render() { let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state; - try { - if(this.props.current_user!==undefined){ - this.setState({ - user_phone_binded :this.props.current_user.user_phone_binded, - }) - } - }catch (e) { - console.log("CoursesBanner 354") - console.log(e) - } + return (
    From 10dc135c6da588001eccff3c9719d1bf40d75bc9 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, 24 Jun 2019 09:06:55 +0800 Subject: [PATCH 112/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesDetail/CoursesBanner.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 4e3f6a42d..311bf7ed6 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -344,16 +344,16 @@ class CoursesBanner extends Component { render() { let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state; - try { - if(this.props.current_user!==undefined){ - this.setState({ - user_phone_binded :this.props.current_user.user_phone_binded, - }) - } - }catch (e) { - console.log("CoursesBanner 354") - console.log(e) - } + // try { + // if(this.props.current_user!==undefined){ + // this.setState({ + // user_phone_binded :this.props.current_user.user_phone_binded, + // }) + // } + // }catch (e) { + // console.log("CoursesBanner 354") + // console.log(e) + // } return (
    From e3b07c7f01232f27e270ab48c83ffeca1d120255 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, 24 Jun 2019 09:07:24 +0800 Subject: [PATCH 113/964] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesDetail/CoursesBanner.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 311bf7ed6..4e3f6a42d 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -344,16 +344,16 @@ class CoursesBanner extends Component { render() { let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state; - // try { - // if(this.props.current_user!==undefined){ - // this.setState({ - // user_phone_binded :this.props.current_user.user_phone_binded, - // }) - // } - // }catch (e) { - // console.log("CoursesBanner 354") - // console.log(e) - // } + try { + if(this.props.current_user!==undefined){ + this.setState({ + user_phone_binded :this.props.current_user.user_phone_binded, + }) + } + }catch (e) { + console.log("CoursesBanner 354") + console.log(e) + } return (
    From ffbcbc0349c08ecf071de18971ec02e9a3e12d27 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 09:17:13 +0800 Subject: [PATCH 114/964] check --- .../modules/courses/members/teacherList.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index ac9d22119..748345c87 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -32,13 +32,6 @@ function buildColumns(that) { const isAdminOrTeacher = that.props.isAdminOrTeacher() const { course_groups } = that.state const columns = [{ - title: '', - dataIndex: 'course_member_id', - key: 'course_member_id', - render: (content, item, index) => { - return - } - },{ title: '序号', // dataIndex: 'name', key: 'index', @@ -152,6 +145,16 @@ function buildColumns(that) { }, }) } + if(isAdmin) { + columns.unshift({ + title: '', + dataIndex: 'course_member_id', + key: 'course_member_id', + render: (content, item, index) => { + return + } + }) + } return columns } @@ -540,7 +543,7 @@ class studentsList extends Component{ `}
    - 已选 {checkBoxValues.length} 个 + { isAdmin && 已选 {checkBoxValues.length} 个 } {
    { this.hasGraduationModule() && isAdminOrTeacher &&
  • 加入答辩组 From 88cebdbb0ca3289c2a0cdb72ee2f89aa27d5af03 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 09:21:38 +0800 Subject: [PATCH 115/964] hasGraduationModule --- .../react/src/modules/courses/members/teacherList.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 748345c87..a3ff2d745 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -105,7 +105,8 @@ function buildColumns(that) { } , }); - if (that.hasGraduationModule()) { + const hasGraduationModule = that.hasGraduationModule() + if (hasGraduationModule { columns.push({ title: '答辩组', key: 'graduation_group', @@ -145,7 +146,7 @@ function buildColumns(that) { }, }) } - if(isAdmin) { + if(isAdmin && hasGraduationModule) { columns.unshift({ title: '', dataIndex: 'course_member_id', @@ -498,6 +499,7 @@ class studentsList extends Component{ }) } const isAdminOrTeacher = this.props.isAdminOrTeacher() + const hasGraduationModule = this.hasGraduationModule() return( @@ -543,9 +545,9 @@ class studentsList extends Component{ `}
    - { isAdmin && 已选 {checkBoxValues.length} 个 } + { isAdmin && hasGraduationModule && 已选 {checkBoxValues.length} 个 } {
    - { this.hasGraduationModule() && isAdminOrTeacher &&
  • + { hasGraduationModule && isAdminOrTeacher &&
  • 加入答辩组
  • ) } - > - - {renderScore(teaching_asistant_score) } - } - - ), - }]) + { +
    {record.ta_comment_count}名助教进行了评分
    +
    {that.state.ta_mode == 1 ? '平均分': '复审分'}:{teaching_asistant_score}分
    +
    ) } + > + + {renderScore(teaching_asistant_score) } + } + + ), + }) + } + + if (that.state.anonymous_comment) { /** @@ -242,36 +257,37 @@ function buildColumns(that, student_works) { ), }) } - - columns.push({ - width: 72, - title: '最终成绩', - key: 'work_score', - dataIndex: 'work_score', - render: (work_score, record) => { - return ( - - -
    {`${record.user_name}(${record.user_login})`}
    - { record.ultimate_score ? -
    最终调整成绩:{record.work_score}分
    : + if (!niPingAndIsStudent) { + columns.push({ + width: 72, + title: '最终成绩', + key: 'work_score', + dataIndex: 'work_score', + render: (work_score, record) => { + return ( + + - { record.final_score &&
    作业评分:{record.final_score}分
    } - { record.late_penalty >= 0 &&
    迟交扣分:{record.late_penalty}分
    } - { record.absence_penalty >= 0 &&
    缺评扣分:{record.absence_penalty}分
    } - { record.appeal_penalty >= 0 &&
    违规匿评扣分:{record.appeal_penalty}分
    } -
    最终成绩:{record.work_score}分
    -
    } -
    ) - }> - { renderScore(work_score) } - - - ) - }, - }) +
    {`${record.user_name}(${record.user_login})`}
    + { record.ultimate_score ? +
    最终调整成绩:{record.work_score}分
    : +
    + { record.final_score &&
    作业评分:{record.final_score}分
    } + { record.late_penalty >= 0 &&
    迟交扣分:{record.late_penalty}分
    } + { record.absence_penalty >= 0 &&
    缺评扣分:{record.absence_penalty}分
    } + { record.appeal_penalty >= 0 &&
    违规匿评扣分:{record.appeal_penalty}分
    } +
    最终成绩:{record.work_score}分
    +
    } +
    ) + }> + { renderScore(work_score) } + + + ) + }, + }) + } if (isAdminOrStudent || that.props.work_public == true) { columns.push({ width: 92, From 556ce2635e4bdd0148e17d9034f6923e7ee69e2f Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 11:04:10 +0800 Subject: [PATCH 123/964] haveProjects --- public/react/src/modules/courses/busyWork/ConnectProject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/busyWork/ConnectProject.js b/public/react/src/modules/courses/busyWork/ConnectProject.js index 9c5db1bbc..4e359651b 100644 --- a/public/react/src/modules/courses/busyWork/ConnectProject.js +++ b/public/react/src/modules/courses/busyWork/ConnectProject.js @@ -109,7 +109,7 @@ class ConnectProject extends Component{ } render(){ - let {project_flag, projects, loading, hasMore }=this.state; + let {project_flag, projects, loading, hasMore, haveProjects }=this.state; return( Date: Mon, 24 Jun 2019 11:19:47 +0800 Subject: [PATCH 124/964] cancel_appeal --- public/react/src/AppConfig.js | 2 +- .../courses/busyWork/CommonWorkItem.js | 2 +- .../modules/courses/busyWork/commonWork.js | 2 +- .../courses/common/comments/CCommentItem.js | 20 +++++++++++++++---- .../courses/coursesDetail/CoursesBanner.js | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 05a4463cd..6c4a20fa9 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -31,7 +31,7 @@ export function initAxiosInterceptors(props) { // proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.educoder.net" proxy = "https://testeduplus2.educoder.net" - // proxy="http://47.96.87.25:48080" + proxy="http://47.96.87.25:48080" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; // 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制 diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 0a8f990a0..7f5bea2da 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -127,7 +127,7 @@ class CommonWorkItem extends Component{ } { - mainList && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{ + mainList && mainList.homeworks && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{ let canNotLink = !isAdminOrStudent && item.private_icon == true return(
    diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index a23318097..b0b80d147 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -430,7 +430,7 @@ class commonWork extends Component{ { - mainList && mainList.homeworks.length==0 && + mainList && mainList.homeworks && mainList.homeworks.length==0 && } { diff --git a/public/react/src/modules/courses/common/comments/CCommentItem.js b/public/react/src/modules/courses/common/comments/CCommentItem.js index d02c76f5d..45ebb364b 100644 --- a/public/react/src/modules/courses/common/comments/CCommentItem.js +++ b/public/react/src/modules/courses/common/comments/CCommentItem.js @@ -46,9 +46,9 @@ class CCommentItem extends Component{ let { item, commentIndex }=this.props; const url = `/student_works/${studentWorkId}/cancel_appeal.json` - axios.post(url, { data: { + axios.post(url, { score_id: item.id - }}) + }) .then((response) => { if (response.data.status == 0) { this.showNotification('撤销成功') @@ -262,9 +262,21 @@ class CCommentItem extends Component{ return(
    diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 74a1cd6f2..eb208b5bf 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -358,7 +358,7 @@ class CoursesBanner extends Component { { coursedata===undefined || coursedata.status===401 || coursedata.status===407?"": - + {coursedata.name} From 3866ec9bbbbd6aef94e146cefeaacd7dc03855d7 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 11:29:37 +0800 Subject: [PATCH 125/964] =?UTF-8?q?=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/CommonWorkList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 6abfcd777..dcc33056f 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -84,7 +84,7 @@ function buildColumns(that, student_works) { }] if (!niPingAndIsStudent) { columns.push({ - width: 180, + width: 88, title: '学号', dataIndex: 'student_id', key: 'student_id', @@ -152,7 +152,7 @@ function buildColumns(that, student_works) { )}, }, { - width: 133, + width: 150, title: '更新时间', dataIndex: 'update_time', key: 'update_time', @@ -217,7 +217,7 @@ function buildColumns(that, student_works) { */ columns.push({ width: 84, - title:
    匿评
    评分
    , + title:
    匿评
    评分
    , key: 'student_score', dataIndex: 'student_score', From cb970e2223b62f28f222d03cd8616d85546c4214 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, 24 Jun 2019 11:34:47 +0800 Subject: [PATCH 126/964] =?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 | 2 +- .../tasks/GraduationTasksSubmitnew.js | 46 ++++++++++++++++--- .../react/src/modules/login/EducoderLogin.js | 4 +- public/react/src/modules/tpm/NewHeader.js | 36 ++++++--------- public/react/src/modules/tpm/TPMIndexHOC.js | 9 +--- 5 files changed, 57 insertions(+), 40 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 05a4463cd..6c4a20fa9 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -31,7 +31,7 @@ export function initAxiosInterceptors(props) { // proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.educoder.net" proxy = "https://testeduplus2.educoder.net" - // proxy="http://47.96.87.25:48080" + proxy="http://47.96.87.25:48080" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; // 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制 diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index 7421170d6..b68458e3f 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -83,7 +83,7 @@ class GraduationTasksSubmitnew extends Component{ } handleSubmit=(e) => { - + console.log("86"); let {fileList,selectmemberslist,workslist}=this.state; if(fileList.length === 0){ @@ -91,7 +91,7 @@ class GraduationTasksSubmitnew extends Component{ Modalstype:true, Modalstopval:'请上传附件!', Loadtype:true, - ModalCancel:this.cancelAttachment + ModalSave:this.cancelAttachment, }) @@ -119,7 +119,7 @@ class GraduationTasksSubmitnew extends Component{ listid.push(list.response.id) } - e.preventDefault(); + // e.preventDefault(); if( GraduationTasksnewtype===true){ this.props.form.validateFields((err, values) => { if (!err) { @@ -408,7 +408,27 @@ class GraduationTasksSubmitnew extends Component{ selectmemberslist:selects }) } + onSearchKeywordKeyUp = (e) => { + if (e.keyCode === 13) { + } + } + onSearckeyd=(e)=>{ + if(e.keyCode){ + + let {search} = this.state; + this.searchList(search,1,10) + } + } + onSearchKeywordKeyUps= (e)=>{ + if(e.keyCode=== 13){ + } + } + onKeywordSearchKeyDown = (e) => { + if(e.keyCode == 13) { + return false; + } + } gocannel=()=>{ window.history.go(-1) } @@ -483,7 +503,8 @@ render(){ 返回
    -
    + {/**/}
    - -
    - - - { - newshixunmodallist&&newshixunmodallist.map((item,key)=>{ - return( -
    -
  • - - - -
  • -
  • {item.shixun_count}
  • -
  • {item.myshixun_count}
  • - -
  • 详情
  • -
    -
    - ) - }) - } -
    -
    -
    - { this.state.patheditarrytype===true?{this.state.patheditarryvalue}:""} -
    - 取消 - 确定 -
    -
    - - -
    - ) - } -} +import React,{ Component } from "react"; +import { Modal,Checkbox,Select,Input,Tooltip } from "antd"; +import axios from'axios'; +import Loading from '@icedesign/base/lib/loading'; +import '@icedesign/base/lib/loading/style.js'; +import Modals from '../../modals/Modals'; + +const Option = Select.Option; +const Search = Input.Search; +class PathModal extends Component{ + constructor(props){ + super(props); + this.state={ + StudentList_value:"", + Searchvalue:undefined, + type:'all', + page:1, + patheditarry:undefined + } + } + + hidecouseShixunModal=()=>{ + this.props.hidecouseShixunModal() + } + + //tag + changeTag=(types)=>{ + let {Searchvalue}=this.state; + this.setState({ + type:types, + page:1, + }) + this.props.funshixunpathlist(Searchvalue,types,true,1) + } + + //搜索 + SenttotheValue=(e)=>{ + this.setState({ + Searchvalue:e.target.value + }) + } + SenttotheSearch=(value)=>{ + let{type}=this.state; + this.setState({ + page:1, + }) + this.props.funshixunpathlist(value,type,true,1) + } + + + //勾选实训 + shixunhomeworkedit=(list)=>{ + this.setState({ + patheditarry:list + }) + // this.props.funpatheditarry(newpatheditarry) + } + + contentViewScrolledit=(e)=>{ + //滑动到底判断 + + if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ + + let {Searchvalue,type,page,shixunpathlist}=this.state; + let newpage=page+1 + this.props.funshixunpathlist(Searchvalue,type,true,newpage) + this.setState({ + page:newpage + }) + + } + + } + //提交 + savecouseShixunModal=()=>{ + let {patheditarry}=this.state; + let {coursesId,Coursename,page,order,category_id,datas}=this.props; + let url="/courses/"+coursesId+"/homework_commons/create_subject_homework.json"; + if(patheditarry===undefined){ + this.setState({ + patheditarrytype:true, + patheditarryvalue:"请先选择实训课程" + }) + return + }else if(patheditarry.length===0){ + this.setState({ + patheditarrytype:true, + patheditarryvalue:"请先选择实训课程" + }) + return + } + axios.post(url, { + // category_id: datas&&datas.category_name===undefined||datas&&datas.category_name===null?undefined:category_id, + subject_ids:patheditarry, + } + ).then((response) => { + if(response.data.status===-1){ + // this.setState({ + // Modalstype:true, + // Modalstopval:response.data.message, + // ModalsBottomval:"", + // ModalSave:this.cancelmodel, + // Loadtype:true + // }) + this.props.showNotification(response.data.message) + + }else{ + // this.homeworkstart + //调用立即发布弹窗 + this.props.hidecouseShixunModal(); + this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) + // this.props.showNotification("选用成功") + // this.props.showNotification(response.data.message) + // this.props.homeworkupdatalists(Coursename,page,order); + } + + // if(response.status===200) { + // this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) + // } + + + }).catch((error) => { + console.log(error) + }) + } + render(){ + let {Searchvalue,type,Modalstype}=this.state; + let {visible,shixunmodallist,hometypepvisible,newshixunmodallist}=this.props; + + + return( +
    + {/*提示*/} + {Modalstype&&Modalstype===true?:""} + + + +
    + { shixunmodallist && shixunmodallist.tags.length===0?"":} +
    + + + {shixunmodallist === undefined ? "":shixunmodallist.subjects_count} + 个实训 + +
    + this.SenttotheSearch(value)} + style={{width: '115%'}} + /> +
    +
    +
      +
    • 实训路径名称
    • +
    • 已发布实训数
    • +
    • 使用人数
    • +
    • +
    + + + +
    + + + { + newshixunmodallist&&newshixunmodallist.map((item,key)=>{ + return( +
    +
  • + + + +
  • +
  • {item.shixun_count}
  • +
  • {item.myshixun_count}
  • + +
  • 详情
  • +
    +
    + ) + }) + } +
    +
    +
    + { this.state.patheditarrytype===true?{this.state.patheditarryvalue}:""} +
    + 取消 + 确定 +
    +
    +
    +
    +
    + ) + } +} export default PathModal; \ No newline at end of file diff --git a/public/react/src/modules/courses/coursesPublic/SelectResource.js b/public/react/src/modules/courses/coursesPublic/SelectResource.js index 1b400b800..878395144 100644 --- a/public/react/src/modules/courses/coursesPublic/SelectResource.js +++ b/public/react/src/modules/courses/coursesPublic/SelectResource.js @@ -285,6 +285,11 @@ class Selectresource extends Component{ padding: 0 30px; padding-top:30px; } + .search-news{ + width: 237px!important; + height: 30px; + margin-bottom: 30px; + } `}
    @@ -292,7 +297,7 @@ class Selectresource extends Component{
  • this.changeTag("all")} className={ type==="all" ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部
  • this.changeTag("my")} className={ type==="my" ? " active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>我的资源
  • -
    +
    - {item.response===undefined?"":isNaN(bytesToSize(item.response.filesize))?"":bytesToSize(item.response.filesize)} + {item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"":this.props.bytesToSize(item.response.filesize)} { - - let newpatheditarry=[]; - if (this.props.singleChoose == true) { - if (list.length > 0) { - newpatheditarry.push(list[list.length - 1]) - } - } else { - for(var i=0; i{ - //滑动到底判断 - - if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ - - let {Searchvalue,type,page}=this.state; - let newpage=page+1 - this.props.funshixunmodallist(Searchvalue,type,true,newpage) - this.setState({ - page:newpage - }) - - } - - } - - //搜索 - SenttotheValue=(e)=>{ - this.setState({ - Searchvalue:e.target.value - }) - } - SenttotheSearch=(value)=>{ - let{type}=this.state; - this.setState({ - page:1, - }) - - this.props.funshixunmodallist(value,type,true,1) - this.props.funpatheditarry([]) - } - - //tag - changeTag=(types)=>{ - let {Searchvalue}=this.state; - this.setState({ - type:types, - page:1, - }) - - this.props.funshixunmodallist(Searchvalue,types,true,1) - this.props.funpatheditarry([]) - } - - - hidecouseShixunModal=()=>{ - this.props.hidecouseShixunModal() - } - - savecouseShixunModal=()=>{ - let {coursesId,patheditarry,datas}=this.props; - - let{category_id}=this.state; - if (this.props.chooseShixun) { - this.props.chooseShixun(patheditarry) - return; - } - if(patheditarry.length===0){ - this.setState({ - shixunmodelchke:true, - chekicmessage:"请先选择实训" - }) - - return - } - let url="/courses/"+coursesId+"/homework_commons/create_shixun_homework.json"; - axios.post(url, { - category_id:this.props.category_id===null||this.props.category_id===undefined?undefined:parseInt(this.props.category_id), - shixun_ids:patheditarry, - } - ).then((response) => { - if(response.data.status===-1){ - // this.props.showNotification(response.data.message) - - }else{ - this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) - this.props.hidecouseShixunModal() - } - - // category_id: 3 - // homework_ids: (5) [9171, 9172, 9173, 9174, 9175] - }).catch((error) => { - console.log(error) - }) - } - - selectCloseList=(value)=>{ - this.setState({ - category_id:value - }) - } - render(){ - let {Searchvalue,type,category_id}=this.state; - let {visible,shixunmodallist,hometypepvisible,newshixunmodallist,patheditarry}=this.props; - const antIcon = ; - // console.log(patheditarry) - return( -
    - - - - - {/**/} - {/*{*/} - {/*shixunmodallist === undefined ? "":shixunmodallist.homework_category.length>0?
    */} - - {/*
    选择目录名称:
    */} - {/*
    */} - {/**/} - {/*{ shixunmodallist.main_category.map((item,key)=>{*/} - {/*return(*/} - {/**/} - {/*)*/} - {/*})*/} - {/*}*/} - - {/*{*/} - {/*shixunmodallist.homework_category.map((item,key)=>{*/} - {/*return(*/} - {/**/} - {/*)*/} - {/*})*/} - {/*}*/} - - {/**/} - {/*
    */} - - {/*
    :""}*/} - -
    - - -
    - - - {shixunmodallist === undefined ? "":shixunmodallist.shixuns_count} - 个实训 - -
    - this.SenttotheSearch(value)} - style={{width: '100%'}} - /> -
    -
    - { - - } -
      -
    • 实训名称
    • -
    • 使用院校
    • -
    • 使用人数
    • -
    • 评价等级
    • -
    • -
    - - - -
    - - {/**/} - - { - newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{ - return( -
    -
  • - - {item.shixun_name} - -
  • -
  • {item.school_users}
  • -
  • {item.myshixuns_count}
  • -
  • {item.preference}
  • - -
  • 详情
  • -
    -
    - ) - }) - } -
    - {/*
    */} -
    -
    -
    - {this.state.shixunmodelchke===true?{this.state.chekicmessage}:""} -
    - 取消 - 确定 -
    -
    -
    - ) - } -} +import React,{ Component } from "react"; +import { Modal,Checkbox,Select,Input,Tooltip,Spin,Icon} from "antd"; +import axios from'axios'; +// import Loading from '@icedesign/base/lib/loading'; +// import '@icedesign/base/lib/loading/style.js'; + +const Option = Select.Option; +const Search = Input.Search; +class ShixunModal extends Component{ + constructor(props){ + super(props); + this.state={ + Searchvalue:undefined, + type:'all', + category_id:0, + page:1 + } + } + componentDidMount() { + + + } + + //勾选实训 + shixunhomeworkedit=(list)=>{ + + let newpatheditarry=[]; + if (this.props.singleChoose == true) { + if (list.length > 0) { + newpatheditarry.push(list[list.length - 1]) + } + } else { + for(var i=0; i{ + //滑动到底判断 + + if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ + + let {Searchvalue,type,page}=this.state; + let newpage=page+1 + this.props.funshixunmodallist(Searchvalue,type,true,newpage) + this.setState({ + page:newpage + }) + + } + + } + + //搜索 + SenttotheValue=(e)=>{ + this.setState({ + Searchvalue:e.target.value + }) + } + SenttotheSearch=(value)=>{ + let{type}=this.state; + this.setState({ + page:1, + }) + + this.props.funshixunmodallist(value,type,true,1) + this.props.funpatheditarry([]) + } + + //tag + changeTag=(types)=>{ + let {Searchvalue}=this.state; + this.setState({ + type:types, + page:1, + }) + + this.props.funshixunmodallist(Searchvalue,types,true,1) + this.props.funpatheditarry([]) + } + + + hidecouseShixunModal=()=>{ + this.props.hidecouseShixunModal() + } + + savecouseShixunModal=()=>{ + let {coursesId,patheditarry,datas}=this.props; + + let{category_id}=this.state; + if (this.props.chooseShixun) { + this.props.chooseShixun(patheditarry) + return; + } + if(patheditarry.length===0){ + this.setState({ + shixunmodelchke:true, + chekicmessage:"请先选择实训" + }) + + return + } + let url="/courses/"+coursesId+"/homework_commons/create_shixun_homework.json"; + axios.post(url, { + category_id:this.props.category_id===null||this.props.category_id===undefined?undefined:parseInt(this.props.category_id), + shixun_ids:patheditarry, + } + ).then((response) => { + if(response.data.status===-1){ + // this.props.showNotification(response.data.message) + + }else{ + this.props.courseshomeworkstart(response.data.category_id,response.data.homework_ids) + this.props.hidecouseShixunModal() + } + + // category_id: 3 + // homework_ids: (5) [9171, 9172, 9173, 9174, 9175] + }).catch((error) => { + console.log(error) + }) + } + + selectCloseList=(value)=>{ + this.setState({ + category_id:value + }) + } + render(){ + let {Searchvalue,type,category_id}=this.state; + let {visible,shixunmodallist,hometypepvisible,newshixunmodallist,patheditarry}=this.props; + const antIcon = ; + // console.log(patheditarry) + return( +
    + + + + + {/**/} + {/*{*/} + {/*shixunmodallist === undefined ? "":shixunmodallist.homework_category.length>0?
    */} + + {/*
    选择目录名称:
    */} + {/*
    */} + {/**/} + {/*{ shixunmodallist.main_category.map((item,key)=>{*/} + {/*return(*/} + {/**/} + {/*)*/} + {/*})*/} + {/*}*/} + + {/*{*/} + {/*shixunmodallist.homework_category.map((item,key)=>{*/} + {/*return(*/} + {/**/} + {/*)*/} + {/*})*/} + {/*}*/} + + {/**/} + {/*
    */} + + {/*
    :""}*/} + +
    + + +
    + + + {shixunmodallist === undefined ? "":shixunmodallist.shixuns_count} + 个实训 + +
    + this.SenttotheSearch(value)} + style={{width: '115%'}} + /> +
    +
    + { + + } +
      +
    • 实训名称
    • +
    • 使用院校
    • +
    • 使用人数
    • +
    • 评价等级
    • +
    • +
    + + + +
    + + {/**/} + + { + newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{ + return( +
    +
  • + + {item.shixun_name} + +
  • +
  • {item.school_users}
  • +
  • {item.myshixuns_count}
  • +
  • {item.preference}
  • + +
  • 详情
  • +
    +
    + ) + }) + } +
    + {/*
    */} +
    +
    +
    + {this.state.shixunmodelchke===true?{this.state.chekicmessage}:""} +
    + 取消 + 确定 +
    +
    +
    + ) + } +} export default ShixunModal; \ No newline at end of file diff --git a/public/react/src/modules/courses/coursesPublic/modal/ShixunModal2.js b/public/react/src/modules/courses/coursesPublic/modal/ShixunModal2.js index 1cb47ae7e..d01c8d986 100644 --- a/public/react/src/modules/courses/coursesPublic/modal/ShixunModal2.js +++ b/public/react/src/modules/courses/coursesPublic/modal/ShixunModal2.js @@ -230,11 +230,11 @@ class ShixunModal extends Component{
    this.SenttotheSearch(value)} - style={{width: '100%'}} + style={{width: '115%'}} />
    diff --git a/public/react/src/modules/courses/coursesPublic/sendResource.js b/public/react/src/modules/courses/coursesPublic/sendResource.js index 544c44286..bdd597495 100644 --- a/public/react/src/modules/courses/coursesPublic/sendResource.js +++ b/public/react/src/modules/courses/coursesPublic/sendResource.js @@ -22,13 +22,6 @@ function disabledDateTime() { }; } -function bytesToSize(bytes) { - if (bytes === 0) return '0 B'; - let k = 1024, - sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], - i = Math.floor(Math.log(bytes) / Math.log(k)); - return (bytes / Math.pow(k, i)). toFixed(2) + ' ' + sizes[i]; -} const dateFormat="YYYY-MM-DD HH:mm"; class Sendresource extends Component{ constructor(props){ @@ -456,7 +449,7 @@ class Sendresource extends Component{ {item.name} - {item.response===undefined?"":isNaN(bytesToSize(item.response.filesize))?"":bytesToSize(item.response.filesize)} + {item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"":this.props.bytesToSize(item.response.filesize)} { + //onAttachmentRemove = (file) => { // confirm({ // title: '确定要删除这个附件吗?', @@ -228,14 +228,14 @@ class GraduationTasksSubmitedit extends Component{ // }); // return false; - this.setState({ - Modalstype:true, - Modalstopval:'确定要删除这个附件吗?', - ModalSave: ()=>this.deleteAttachment(file), - ModalCancel:this.cancelAttachment - }) - return false; - } + // this.setState({ + // Modalstype:true, + // Modalstopval:'确定要删除这个附件吗?', + // ModalSave: ()=>this.deleteAttachment(file), + // ModalCancel:this.cancelAttachment + // }) + // return false; + //} cancelAttachment=()=>{ this.setState({ @@ -246,8 +246,8 @@ class GraduationTasksSubmitedit extends Component{ }) } - deleteAttachment = (file) => { - let {attachments}=this.state; + onAttachmentRemove = (file) => { + let {attachments,fileList}=this.state; const url = `/attachments/${file.uid===undefined?file.id:file.uid}.json` axios.delete(url, { }) @@ -426,7 +426,7 @@ class GraduationTasksSubmitedit extends Component{ multiple: true, // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 - // showUploadList: false, + showUploadList: false, action: `${getUrl()}/api/attachments.json`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, @@ -553,7 +553,37 @@ class GraduationTasksSubmitedit extends Component{ ) })} - + + {this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{ + return( +

    + + + + + {item.name} + + + {item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"":this.props.bytesToSize(item.response.filesize)} + + +

    + ) + })} diff --git a/public/react/src/modules/forums/RightSection.css b/public/react/src/modules/forums/RightSection.css index 3efe0bc43..73994ae24 100644 --- a/public/react/src/modules/forums/RightSection.css +++ b/public/react/src/modules/forums/RightSection.css @@ -1,52 +1,53 @@ -/* 右侧搜索区域*/ -.searchFor .searchCon { - width: 215px; -} - -.search-new { - width:237px!important; - height: 30px; - margin-bottom: 30px; -} - .search-new-input { - padding-left: 16px; - height: 30px; - } - .search-span { - border-radius: 17px; - } - -.search-new img { - right: 10px; -} - - -/* 右侧 热门标签 */ -.HotLabelList a{display: block;float: left;padding: 0px 9px;height: 28px;line-height: 28px;border-radius: 14px;background-color: #f5f5f5;color: #666;margin-right: 10px;margin-bottom: 9px;} -.HotLabelList a.selected { - background: #4CACFF; - color: #fff; -} - - - -/* 右侧 热门问题 */ -.hotQuestionItem{padding:20px 0px;border-bottom: 1px solid #eee;} -.questiontName{max-width: 100%;display: block;} - - - -/* 用户信息-UserSection*/ -.user_default_btn {width: 114px;} -.userPrivateName{line-height: 25px;margin-bottom: 9px;} -.userPrivatePost{line-height: 20px;} -.noteDetailTitle{line-height: 38px;font-size: 24px;font-weight: normal;text-align:justify } - -.noteDetailNum{float: left;padding:0px 12px;position: relative;color: #999!important;height: 28px;line-height: 26px;} -.noteDetailNum.rightline:after{position: absolute;content: '';right: 0px;width: 1px;background-color: #EAEAEA;height: 8px;top:10px;} - -/*帖子详情点赞*/ -.noteDetailPoint{width: 100px;height: 70px;background-color: #4cacff;border-radius: 35px;color: #FFFFff;text-align: center;margin: 0px auto;box-sizing: border-box;padding: 2px 0px;cursor: pointer; line-height: 22px; - padding-top: 12px;} -.Pointed{background-color:#f0f0f0;color: #b3b3b3; cursor: default} -.notefileDownload{height: 25px;line-height: 22px;} +/* 右侧搜索区域*/ +.searchFor .searchCon { + width: 215px; +} + +.search-new { + width:237px!important; + height: 30px; + margin-bottom: 30px; + margin-right: 35px; +} + .search-new-input { + padding-left: 16px; + height: 30px; + } + .search-span { + border-radius: 17px; + } + +.search-new img { + right: 10px; +} + + +/* 右侧 热门标签 */ +.HotLabelList a{display: block;float: left;padding: 0px 9px;height: 28px;line-height: 28px;border-radius: 14px;background-color: #f5f5f5;color: #666;margin-right: 10px;margin-bottom: 9px;} +.HotLabelList a.selected { + background: #4CACFF; + color: #fff; +} + + + +/* 右侧 热门问题 */ +.hotQuestionItem{padding:20px 0px;border-bottom: 1px solid #eee;} +.questiontName{max-width: 100%;display: block;} + + + +/* 用户信息-UserSection*/ +.user_default_btn {width: 114px;} +.userPrivateName{line-height: 25px;margin-bottom: 9px;} +.userPrivatePost{line-height: 20px;} +.noteDetailTitle{line-height: 38px;font-size: 24px;font-weight: normal;text-align:justify } + +.noteDetailNum{float: left;padding:0px 12px;position: relative;color: #999!important;height: 28px;line-height: 26px;} +.noteDetailNum.rightline:after{position: absolute;content: '';right: 0px;width: 1px;background-color: #EAEAEA;height: 8px;top:10px;} + +/*帖子详情点赞*/ +.noteDetailPoint{width: 100px;height: 70px;background-color: #4cacff;border-radius: 35px;color: #FFFFff;text-align: center;margin: 0px auto;box-sizing: border-box;padding: 2px 0px;cursor: pointer; line-height: 22px; + padding-top: 12px;} +.Pointed{background-color:#f0f0f0;color: #b3b3b3; cursor: default} +.notefileDownload{height: 25px;line-height: 22px;} diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js index 3ac61cb1e..393c28c9f 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js +++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js @@ -1,618 +1,619 @@ -import React, { Component } from 'react'; -import {getImageUrl} from 'educoder'; -import {Modal,Input,Checkbox,Tooltip} from "antd"; -import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd'; -import Modals from '../../modals/Modals'; -import Loading from '@icedesign/base/lib/loading'; -import '@icedesign/base/lib/loading/style.js'; -import '../ShixunPaths.css'; -import axios from 'axios'; -const $ = window.$; -const Search = Input.Search; - -//a little function to help us with reordering the result -const reorder = (list, startIndex, endIndex) => { - // console.log(list) - // console.log(startIndex) - // console.log(endIndex) - - let newlist=list; - const result = Array.from(newlist); - const [removed] = result.splice(startIndex, 1); - result.splice(endIndex, 0, removed); - - return result; -}; - -const getItemStyle = (isDragging, draggableStyle) => ({ - // change background colour if dragging - background: isDragging ? '#dceeff' : '', - // styles we need to apply on draggables - ...draggableStyle, -}); - -class DetailCardsEditAndAdd extends Component{ - constructor(props){ - super(props); - this.state={ - selectShixun:false, - editPanel:false, - search:"", - type:0, - page:1, - ChooseShixunList:undefined, - hometypepvisible:true, - shixuns_listedit:undefined, - shixuns_listeditlist:[], - patheditarry:[], - stage_descriptions:undefined, - stage_names:undefined, - delectfunvalue:undefined, - Modalstype:false, - Modalstopval:"", - Modalsbottomval:"", - ChooseShixunListshixun_list:undefined, - stage_nametype:false, - descriptiontype:false - } - this.onDragEnd = this.onDragEnd.bind(this); - } - //选择实训弹框 - AddShixunBox = () =>{ - this.setState({ - selectShixun:true, - patheditarry:[] - }) - this.changeTag(0,""); - } - - //关闭选择实训弹框 - cloasShixunBox =()=>{ - this.setState({ - selectShixun:false, - patheditarry:[] - }) - } - clickShixunchoose=()=>{ - - let{patheditarry,shixuns_listeditlist}=this.state - let newshixuns_listedit=[]; - let list=shixuns_listeditlist - - if(patheditarry.length===0){ - this.setState({ - Modalstype:true, - Modalstopval:'请选择实训', - cardsModalsave:this.cardsModalsave - }) - - return - } - - let url='/paths/append_to_stage.json' - axios.post(url,{ - shixun_id:patheditarry - }).then((response) => { - let newshixun_lists=response.data.shixun_lists; - - for(var z=0; z { - console.log(error) - }); - - } - - //点击新建阶段 - addStage=()=>{ - this.props.editeditbuttomtypes(); - this.setState({ - editPanel:true - }) - - } - //取消新建阶段 - cancelAddState = () =>{ - this.setState({ - editPanel:false, - stage_names:undefined, - stage_descriptions:undefined, - shixuns_listeditlist:[], - shixuns_listedit:undefined - }) - this.props.getPathCardsLists(); - } - - searchNameInput=(e)=>{ - this.setState({ - search:e.target.value - }) - } - - //打开选择实训弹框初始化tag标签和列表 - changeTag=(id,search)=>{ - this.setState({ - hometypepvisible:true - }) - let pathId=this.props.pathid; - let {page}=this.state; - let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+page - if(search!="" && search!=undefined){ - url+="&search="+search; - } - if(id!=0){ - url+="&type="+id; - } - axios.get(url).then((result)=>{ - if(result.status===200){ - this.setState({ - ChooseShixunList:result.data, - hometypepvisible:false, - type:id, - ChooseShixunListshixun_list:result.data.shixun_list - }) - } - }).catch((error)=>{ - console.log(error); - }) - } - - //勾选实训 - shixunhomeworkedit=(list)=>{ - - let newpatheditarry=[]; - for(var i=0; i{ - - this.setState({ - stage_names:e.target.value - }) - - } - - updatastage_descriptions=(e)=>{ - - this.setState({ - stage_descriptions:e.target.value - }) - - } - - //删除实训 - shixunslisteditdelect=(e)=>{ - this.setState({ - Modalstype:true, - Modalstopval:'是否删除该实训?', - Modalsbottomval:'', - delectfunvalue:e.target.id - }) - } - shixunslisteditdelectfun=()=>{ - let {delectfunvalue}=this.state; - let sum = parseInt(delectfunvalue); - let {shixuns_listedit,shixuns_listeditlist} =this.state; - let newshixuns_listedit=shixuns_listedit - let newshixuns_listeditlist=shixuns_listeditlist - newshixuns_listedit.splice(sum, 1); - newshixuns_listeditlist.splice(sum, 1); - this.setState({ - shixuns_listedit:newshixuns_listedit, - shixuns_listeditlist:newshixuns_listeditlist - }) - this.setState({ - Modalstype:false, - Modalstopval:'', - Modalsbottomval:'', - delectfunvalue:undefined - }) - } - cardsModalcancel=()=>{ - this.setState({ - Modalstype:false, - Modalstopval:'', - Modalsbottomval:'', - delectfunvalue:undefined - }) - } - - //保存 - clickShixunsaves=()=>{ - let{stage_names,stage_descriptions,shixuns_listeditlist}=this.state; - let newstage_descriptions=stage_descriptions; - - if(stage_names===""||stage_names===undefined){ - - this.setState({ - stage_nametype:true - }) - - return - }else{ - this.setState({ - stage_nametype:false - }) - } - - if(newstage_descriptions!=undefined){ - - if(newstage_descriptions.length>300){ - - this.setState({ - descriptiontype:true - }) - - return - } - }else{ - newstage_descriptions="" - } - - - - let pathId=this.props.pathid; - let url='/stages.json?subject_id='+pathId - axios.post(url, { - name:stage_names, - description:newstage_descriptions, - shixun_id:shixuns_listeditlist - }).then((response) => { - // window.location.href = "/paths/" + response.data.subject_id - this.props.getPathCardsLists(); - - this.cancelAddState(); - this.setState({ - stage_nametype:false, - descriptiontype:false - }) - }).catch((error) => { - console.log(error) - }); - } - - - contentViewScrolladd=(e)=>{ - - //滑动到底判断 - if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ - // console.log("到达底部"); - this.setState({ - hometypepvisible:true - }) - let pathId=this.props.pathid; - let {search,page,type,ChooseShixunListshixun_list}=this.state; - let newpage=page+1; - let newChooseShixunListshixun_list=ChooseShixunListshixun_list; - let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+newpage - if(search!="" && search!=undefined){ - url+="&search="+search; - } - if(type!=0){ - url+="&type="+type; - } - axios.get(url).then((result)=>{ - if(result.status===200){ - let list =result.data.shixun_list; - - for(var i=0; i{ - console.log(error); - }) - } - - } - onDragEnd (result) { - - let {shixuns_listedit,shixuns_listeditlist} =this.state; - const listedit = reorder( - shixuns_listedit, - result.source.index, - result.destination.index - ); - const listeditlist = reorder( - shixuns_listeditlist, - result.source.index, - result.destination.index - ); - this.setState({ - shixuns_listedit:listedit, - shixuns_listeditlist:listeditlist - }) - } - - - render(){ - let {selectShixun, - editPanel, - ChooseShixunList, - type, - page, - search, - hometypepvisible, - stage_descriptions, - stage_names, - shixuns_listedit, - delectfunvalue, - Modalstype, - Modalstopval, - Modalsbottomval, - ChooseShixunListshixun_list, - stage_nametype, - descriptiontype} = this.state - - - return( -
    - - - - { editPanel && -
    -
    -

    - - - - 第{this.props.sum}部分 - {/**/} -

    -
    -

    章节名称

    -
    - * -
    - -
    名称不能为空
    -
    -
    必填项
    -
    -

    描述

    -
    - -
    描述不能超多最大限制300个字符
    -
    - -

    - - - 选择实训 - 选择下面实训后,可以通过拖拽进行排序调整 -

    - - {selectShixun===true?:""} - - - -
    - -
    - - - {ChooseShixunList && ChooseShixunList.shixuns_count} - 个实训 - -
    - this.changeTag(`${type}`,`${search}`)} - > -
    -
    -
      -
    • 实训名称
    • -
    • 使用院校
    • -
    • 使用人数
    • -
    • 评价等级
    • -
    • -
    - - -
    - - { - ChooseShixunListshixun_list && ChooseShixunListshixun_list.map((item,key)=>{ - return( -
    -
  • - - - -
  • -
  • {item.school_users}
  • -
  • {item.myshixuns_count}
  • -
  • {item.preference}
  • -
  • 详情
  • -
    - ) - }) - } -
    -
    -
    - 取消 - 确定 -
    -
    -
    -
    -
    - - {/* 可拖拽选择实训列表*/} - {shixuns_listedit===undefined?'': - - - - {(provided, snapshot) => ( -
    - {shixuns_listedit.map((item,key)=>{ - return( - - {(provided, snapshot) => ( -
    - -
  • - - - - - - - - - - {this.props.sum+1}-{key+1}  {item.shixun_name} - - - - - -
  • - -
  • - - - -
  • - {provided.placeholder} -
    - )} -
    - )})} -
    - )} -
    -
    - } - - {/*老版本实训新建卡片*/} - {/*
    */} - {/*
    */} - {/*×*/} - {/*Shixun0*/} - {/*
    */} - {/*

    frerere

    */} - {/*
    */} - {/*
    */} - {/*
    */} - -

    -

    - 取消 - 保存 -
    -

    - -
    -
    - } - - {this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_statistics===true?editPanel===false?
    - +点击新建阶段(选择1至多个实训项目,组成一个阶段) -
    :'':''} -
    - ) - } -} +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import {Modal,Input,Checkbox,Tooltip} from "antd"; +import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd'; +import Modals from '../../modals/Modals'; +import Loading from '@icedesign/base/lib/loading'; +import '@icedesign/base/lib/loading/style.js'; +import '../ShixunPaths.css'; +import axios from 'axios'; +const $ = window.$; +const Search = Input.Search; + +//a little function to help us with reordering the result +const reorder = (list, startIndex, endIndex) => { + // console.log(list) + // console.log(startIndex) + // console.log(endIndex) + + let newlist=list; + const result = Array.from(newlist); + const [removed] = result.splice(startIndex, 1); + result.splice(endIndex, 0, removed); + + return result; +}; + +const getItemStyle = (isDragging, draggableStyle) => ({ + // change background colour if dragging + background: isDragging ? '#dceeff' : '', + // styles we need to apply on draggables + ...draggableStyle, +}); + +class DetailCardsEditAndAdd extends Component{ + constructor(props){ + super(props); + this.state={ + selectShixun:false, + editPanel:false, + search:"", + type:0, + page:1, + ChooseShixunList:undefined, + hometypepvisible:true, + shixuns_listedit:undefined, + shixuns_listeditlist:[], + patheditarry:[], + stage_descriptions:undefined, + stage_names:undefined, + delectfunvalue:undefined, + Modalstype:false, + Modalstopval:"", + Modalsbottomval:"", + ChooseShixunListshixun_list:undefined, + stage_nametype:false, + descriptiontype:false + } + this.onDragEnd = this.onDragEnd.bind(this); + } + //选择实训弹框 + AddShixunBox = () =>{ + this.setState({ + selectShixun:true, + patheditarry:[] + }) + this.changeTag(0,""); + } + + //关闭选择实训弹框 + cloasShixunBox =()=>{ + this.setState({ + selectShixun:false, + patheditarry:[] + }) + } + clickShixunchoose=()=>{ + + let{patheditarry,shixuns_listeditlist}=this.state + let newshixuns_listedit=[]; + let list=shixuns_listeditlist + + if(patheditarry.length===0){ + this.setState({ + Modalstype:true, + Modalstopval:'请选择实训', + cardsModalsave:this.cardsModalsave + }) + + return + } + + let url='/paths/append_to_stage.json' + axios.post(url,{ + shixun_id:patheditarry + }).then((response) => { + let newshixun_lists=response.data.shixun_lists; + + for(var z=0; z { + console.log(error) + }); + + } + + //点击新建阶段 + addStage=()=>{ + this.props.editeditbuttomtypes(); + this.setState({ + editPanel:true + }) + + } + //取消新建阶段 + cancelAddState = () =>{ + this.setState({ + editPanel:false, + stage_names:undefined, + stage_descriptions:undefined, + shixuns_listeditlist:[], + shixuns_listedit:undefined + }) + this.props.getPathCardsLists(); + } + + searchNameInput=(e)=>{ + this.setState({ + search:e.target.value + }) + } + + //打开选择实训弹框初始化tag标签和列表 + changeTag=(id,search)=>{ + this.setState({ + hometypepvisible:true + }) + let pathId=this.props.pathid; + let {page}=this.state; + let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+page + if(search!="" && search!=undefined){ + url+="&search="+search; + } + if(id!=0){ + url+="&type="+id; + } + axios.get(url).then((result)=>{ + if(result.status===200){ + this.setState({ + ChooseShixunList:result.data, + hometypepvisible:false, + type:id, + ChooseShixunListshixun_list:result.data.shixun_list + }) + } + }).catch((error)=>{ + console.log(error); + }) + } + + //勾选实训 + shixunhomeworkedit=(list)=>{ + + let newpatheditarry=[]; + for(var i=0; i{ + + this.setState({ + stage_names:e.target.value + }) + + } + + updatastage_descriptions=(e)=>{ + + this.setState({ + stage_descriptions:e.target.value + }) + + } + + //删除实训 + shixunslisteditdelect=(e)=>{ + this.setState({ + Modalstype:true, + Modalstopval:'是否删除该实训?', + Modalsbottomval:'', + delectfunvalue:e.target.id + }) + } + shixunslisteditdelectfun=()=>{ + let {delectfunvalue}=this.state; + let sum = parseInt(delectfunvalue); + let {shixuns_listedit,shixuns_listeditlist} =this.state; + let newshixuns_listedit=shixuns_listedit + let newshixuns_listeditlist=shixuns_listeditlist + newshixuns_listedit.splice(sum, 1); + newshixuns_listeditlist.splice(sum, 1); + this.setState({ + shixuns_listedit:newshixuns_listedit, + shixuns_listeditlist:newshixuns_listeditlist + }) + this.setState({ + Modalstype:false, + Modalstopval:'', + Modalsbottomval:'', + delectfunvalue:undefined + }) + } + cardsModalcancel=()=>{ + this.setState({ + Modalstype:false, + Modalstopval:'', + Modalsbottomval:'', + delectfunvalue:undefined + }) + } + + //保存 + clickShixunsaves=()=>{ + let{stage_names,stage_descriptions,shixuns_listeditlist}=this.state; + let newstage_descriptions=stage_descriptions; + + if(stage_names===""||stage_names===undefined){ + + this.setState({ + stage_nametype:true + }) + + return + }else{ + this.setState({ + stage_nametype:false + }) + } + + if(newstage_descriptions!=undefined){ + + if(newstage_descriptions.length>300){ + + this.setState({ + descriptiontype:true + }) + + return + } + }else{ + newstage_descriptions="" + } + + + + let pathId=this.props.pathid; + let url='/stages.json?subject_id='+pathId + axios.post(url, { + name:stage_names, + description:newstage_descriptions, + shixun_id:shixuns_listeditlist + }).then((response) => { + // window.location.href = "/paths/" + response.data.subject_id + this.props.getPathCardsLists(); + + this.cancelAddState(); + this.setState({ + stage_nametype:false, + descriptiontype:false + }) + }).catch((error) => { + console.log(error) + }); + } + + + contentViewScrolladd=(e)=>{ + + //滑动到底判断 + if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ + // console.log("到达底部"); + this.setState({ + hometypepvisible:true + }) + let pathId=this.props.pathid; + let {search,page,type,ChooseShixunListshixun_list}=this.state; + let newpage=page+1; + let newChooseShixunListshixun_list=ChooseShixunListshixun_list; + let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+newpage + if(search!="" && search!=undefined){ + url+="&search="+search; + } + if(type!=0){ + url+="&type="+type; + } + axios.get(url).then((result)=>{ + if(result.status===200){ + let list =result.data.shixun_list; + + for(var i=0; i{ + console.log(error); + }) + } + + } + onDragEnd (result) { + + let {shixuns_listedit,shixuns_listeditlist} =this.state; + const listedit = reorder( + shixuns_listedit, + result.source.index, + result.destination.index + ); + const listeditlist = reorder( + shixuns_listeditlist, + result.source.index, + result.destination.index + ); + this.setState({ + shixuns_listedit:listedit, + shixuns_listeditlist:listeditlist + }) + } + + + render(){ + let {selectShixun, + editPanel, + ChooseShixunList, + type, + page, + search, + hometypepvisible, + stage_descriptions, + stage_names, + shixuns_listedit, + delectfunvalue, + Modalstype, + Modalstopval, + Modalsbottomval, + ChooseShixunListshixun_list, + stage_nametype, + descriptiontype} = this.state + + + return( +
    + + + + { editPanel && +
    +
    +

    + + + + 第{this.props.sum}部分 + {/**/} +

    +
    +

    章节名称

    +
    + * +
    + +
    名称不能为空
    +
    +
    必填项
    +
    +

    描述

    +
    + +
    描述不能超多最大限制300个字符
    +
    + +

    + + + 选择实训 + 选择下面实训后,可以通过拖拽进行排序调整 +

    + + {selectShixun===true?:""} + + + +
    + +
    + + + {ChooseShixunList && ChooseShixunList.shixuns_count} + 个实训 + +
    + this.changeTag(`${type}`,`${search}`)} + style={{width: '115%'}} + > +
    +
    +
      +
    • 实训名称
    • +
    • 使用院校
    • +
    • 使用人数
    • +
    • 评价等级
    • +
    • +
    + + +
    + + { + ChooseShixunListshixun_list && ChooseShixunListshixun_list.map((item,key)=>{ + return( +
    +
  • + + + +
  • +
  • {item.school_users}
  • +
  • {item.myshixuns_count}
  • +
  • {item.preference}
  • +
  • 详情
  • +
    + ) + }) + } +
    +
    +
    + 取消 + 确定 +
    +
    +
    +
    +
    + + {/* 可拖拽选择实训列表*/} + {shixuns_listedit===undefined?'': + + + + {(provided, snapshot) => ( +
    + {shixuns_listedit.map((item,key)=>{ + return( + + {(provided, snapshot) => ( +
    + +
  • + + + + + + + + + + {this.props.sum+1}-{key+1}  {item.shixun_name} + + + + + +
  • + +
  • + + + +
  • + {provided.placeholder} +
    + )} +
    + )})} +
    + )} +
    +
    + } + + {/*老版本实训新建卡片*/} + {/*
    */} + {/*
    */} + {/*×*/} + {/*Shixun0*/} + {/*
    */} + {/*

    frerere

    */} + {/*
    */} + {/*
    */} + {/*
    */} + +

    +

    + 取消 + 保存 +
    +

    + +
    +
    + } + + {this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_statistics===true?editPanel===false?
    + +点击新建阶段(选择1至多个实训项目,组成一个阶段) +
    :'':''} +
    + ) + } +} export default DetailCardsEditAndAdd; \ No newline at end of file diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js index 8b33bb793..63263dfc1 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js +++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js @@ -1,702 +1,703 @@ -import React, { Component } from 'react'; -import {getImageUrl} from 'educoder'; -import {Modal,Input,Checkbox,Tooltip} from "antd"; -import { DragDropContext,Draggable, Droppable} from 'react-beautiful-dnd'; -import Modals from '../../modals/Modals'; -import Loading from '@icedesign/base/lib/loading'; -import '@icedesign/base/lib/loading/style.js'; -import '../ShixunPaths.css'; -import axios from 'axios'; -const $ = window.$; -const Search = Input.Search; - - -//a little function to help us with reordering the result -const reorder = (list, startIndex, endIndex) => { - // console.log(list) - // console.log(startIndex) - // console.log(endIndex) - - let newlist=list; - const result = Array.from(newlist); - const [removed] = result.splice(startIndex, 1); - result.splice(endIndex, 0, removed); - - return result; -}; - -const getItemStyle = (isDragging, draggableStyle) => ({ - // change background colour if dragging - background: isDragging ? '#dceeff' : '', - // styles we need to apply on draggables - ...draggableStyle, -}); - - -class DetailCardsEditAndEdit extends Component{ - constructor(props){ - super(props); - this.state={ - selectShixun:false, - editPanel:true, - search:"", - type:0, - page:1, - ChooseShixunList:undefined, - hometypepvisible:true, - shixuns_listedit:undefined, - patheditarry:[], - stage_name:undefined, - stage_description:undefined, - stageid:undefined, - Modalstype:false, - Modalstopval:'', - Modalsbottomval:'', - delectfunvalue:undefined, - ChooseShixunListshixun_list:undefined, - stage_nametype:false, - descriptiontype:false - } - this.onDragEnd = this.onDragEnd.bind(this); - } - //选择实训弹框 - AddShixunBox = () =>{ - this.setState({ - selectShixun:true, - patheditarry:[] - }) - this.changeTag(0,""); - } - //关闭选择实训弹框 - cloasShixunBox =()=>{ - this.setState({ - selectShixun:false, - patheditarry:[] - }) - } - - searchNameInput=(e)=>{ - this.setState({ - search:e.target.value - }) - } - - //打开选择实训弹框初始化tag标签和列表 - changeTag(id,search){ - this.setState({ - hometypepvisible:true - }) - let pathId=this.props.pathid; - let {page}=this.state; - let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+page - if(search!="" && search!=undefined){ - url+="&search="+search; - } - if(id!=0){ - url+="&type="+id; - } - axios.get(url).then((result)=>{ - if(result.status===200){ - this.setState({ - ChooseShixunList:result.data, - hometypepvisible:false, - type:id, - search:search, - ChooseShixunListshixun_list:result.data.shixun_list - }) - } - }).catch((error)=>{ - console.log(error); - }) - } - - shixunhomeworkedit=(list)=>{ - - let newpatheditarry=[]; - for(var i=0; i{ - - this.setState({ - stage_name:e.target.value - }) - - } - - updatastage_description=(e)=>{ - - this.setState({ - stage_description:e.target.value - }) - - } - - clickShixunchoose=()=>{ - - let{patheditarry,shixuns_listedit,shixuns_listeditlist}=this.state - let newshixuns_listedit=shixuns_listedit; - let list=shixuns_listeditlist - - if(patheditarry.length===0){ - this.setState({ - Modalstype:true, - Modalstopval:'请选择实训', - - }) - - return - } - - let url='/paths/append_to_stage.json' - axios.post(url,{ - shixun_id:patheditarry - }).then((response) => { - let newshixun_lists=response.data.shixun_lists; - - - for(var j=0; j { - console.log(error) - }); - - } - - //保存 - clickShixunsave=()=>{ - let{stage_name,stage_description,stageid,shixuns_listeditlist}=this.state; - let newstage_descriptions=stage_description; - - if(stage_name===""||stage_name===undefined){ - - this.setState({ - stage_nametype:true - }) - - return - } - if(newstage_descriptions!=undefined){ - - if(newstage_descriptions.length>300){ - - this.setState({ - descriptiontype:true - }) - - return - } - }else{ - newstage_descriptions="" - } - - - - let url='/stages/'+stageid+'.json' - axios.put(url, { - name:stage_name, - description:newstage_descriptions, - shixun_id:shixuns_listeditlist - }).then((response) => { - // window.location.href = "/paths/" + response.data.subject_id - this.setState({ - stage_name:undefined, - stage_description:undefined, - shixuns_listeditlist:[], - shixuns_listedit:undefined, - stage_nametype:false, - descriptiontype:false - }) - this.props.updatapathCardsedits() - }).catch((error) => { - console.log(error) - }); - } - - //删除实训 - shixunslisteditdelect=(e)=>{ - - this.setState({ - Modalstype:true, - Modalstopval:'是否删除该实训?', - Modalsbottomval:'', - delectfunvalue:e.target.id - }) - - } - - shixunslisteditdelectfun=()=>{ - let{delectfunvalue}=this.state; - let sum = parseInt(delectfunvalue); - let {shixuns_listedit,shixuns_listeditlist} =this.state; - let newshixuns_listedit=shixuns_listedit - let newshixuns_listeditlist=shixuns_listeditlist - newshixuns_listedit.splice(sum, 1); - newshixuns_listeditlist.splice(sum, 1); - this.setState({ - shixuns_listedit:newshixuns_listedit, - shixuns_listeditlist:newshixuns_listeditlist, - Modalstype:false, - Modalstopval:' ', - Modalsbottomval:'', - delectfunvalue:undefined - }) - } - - - cardsModalcancel=()=>{ - this.setState({ - Modalstype:false, - Modalstopval:'', - Modalsbottomval:'', - delectfunvalue:undefined - }) - } - cardsModalsave=()=>{ - this.setState({ - Modalstype:false, - Modalstopval:'', - Modalsbottomval:'' - }) - } - - - - onDragStart = () => { - /*...*/ - }; - onDragUpdate = () => { - /*...*/ - } - - - onDragEnd (result) { - - let {shixuns_listedit,shixuns_listeditlist} =this.state; - const listedit = reorder( - shixuns_listedit, - result.source.index, - result.destination.index - ); - const listeditlist = reorder( - shixuns_listeditlist, - result.source.index, - result.destination.index - ); - this.setState({ - shixuns_listedit:listedit, - shixuns_listeditlist:listeditlist - }) - } - - contentViewScrolledit=(e)=>{ - //滑动到底判断 - - if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ - this.setState({ - hometypepvisible:true - }) - // console.log("到达底部"); - - let {page,type,search,ChooseShixunListshixun_list}=this.state; - - let newpage=page+1; - - let pathId=this.props.pathid; - - let newChooseShixunListshixun_list=ChooseShixunListshixun_list; - - let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+newpage - - if(search!="" && search!=undefined){ - url+="&search="+search; - } - - if(type!=0){ - url+="&type="+type; - } - axios.get(url).then((result)=>{ - if(result.status===200){ - - let list =result.data.shixun_list; - - for(var i=0; i{ - console.log(error); - }) - - } - - } - - - render(){ - let {selectShixun, - editPanel, - ChooseShixunList, - type, - page, - search, - hometypepvisible, - shixuns_listedit, - patheditarry, - stage_name, - stage_description, - Modalstype, - Modalstopval, - Modalsbottomval, - delectfunvalue, - ChooseShixunListshixun_list, - stage_nametype, - descriptiontype - } = this.state - - return( -
    - this.cardsModalsave():()=>this.shixunslisteditdelectfun()} - > - - - { this.props.idsum===this.props.keys&&this.props.pathCardsedittype===true? - -
    - -
    -

    - {/**/} - {/**/} - {/**/} - - {/**/} -

    -
    - {/*

    章节名称

    */} -
    - * -
    - -
    名称不能为空
    -
    -
    必填项
    -
    -

    描述

    -
    - -
    描述不能超多最大限制300个字符
    -
    -

    - - 选择实训 - - 选择下面实训后,可以通过拖拽进行排序调整 -

    - - {selectShixun===true?:""} - - - - -
    - -
    - - - {ChooseShixunList && ChooseShixunList.shixuns_count} - 个实训 - -
    - this.changeTag(`${type}`,`${search}`)} - > -
    -
    -
      -
    • 实训名称
    • -
    • 使用院校
    • -
    • 使用人数
    • -
    • 评价等级
    • -
    • -
    - - -
    - - { - ChooseShixunListshixun_list && ChooseShixunListshixun_list.map((item,key)=>{ - return( -
    -
  • - - - -
  • -
  • {item.school_users}
  • -
  • {item.myshixuns_count}
  • -
  • {item.preference}
  • -
  • 详情
  • -
    - ) - }) - } -
    -
    -
    - 取消 - 确定 -
    -
    -
    -
    -
    - - {/* 可拖拽选择实训列表*/} - {shixuns_listedit===undefined?'': - - - - {(provided, snapshot) => ( -
    - {shixuns_listedit.map((item,key)=>{ - return( - - {(provided, snapshot) => ( -
    - -
  • - - - - - - - - - - {this.props.idsum+1}-{key+1}  {item.shixun_name} - - - - - -
  • - -
  • - - - -
  • - {provided.placeholder} -
    - )} -
    - )})} -
    - )} -
    -
    - } - - {/*
    */} - {/*
    */} - {/*×*/} - {/*Shixun0*/} - {/*
    */} - {/*

    frerere

    */} - {/*
    */} - {/*
    */} - {/*
    */} - - - {/*

    */} - {/*取消*/} - {/*保存*/} - {/*

    */} - -

    -

    - 取消 - 保存 -
    -

    - - -
    -
    - :''} -
    - ) - } -} -export default DetailCardsEditAndEdit; - - - - - -// { -// shixuns_listedit===undefined?'':shixuns_listedit.map((item,key)=>{ -// return( -//
    -// -//
  • -// -// -// -// -// -// -// -// -// -// {this.props.idsum+1}-{key+1}  {item.shixun_name} -// -// -// -// -// -//
  • -// -//
  • -// -// -// -//
  • -// -//
    -// ) -// }) +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import {Modal,Input,Checkbox,Tooltip} from "antd"; +import { DragDropContext,Draggable, Droppable} from 'react-beautiful-dnd'; +import Modals from '../../modals/Modals'; +import Loading from '@icedesign/base/lib/loading'; +import '@icedesign/base/lib/loading/style.js'; +import '../ShixunPaths.css'; +import axios from 'axios'; +const $ = window.$; +const Search = Input.Search; + + +//a little function to help us with reordering the result +const reorder = (list, startIndex, endIndex) => { + // console.log(list) + // console.log(startIndex) + // console.log(endIndex) + + let newlist=list; + const result = Array.from(newlist); + const [removed] = result.splice(startIndex, 1); + result.splice(endIndex, 0, removed); + + return result; +}; + +const getItemStyle = (isDragging, draggableStyle) => ({ + // change background colour if dragging + background: isDragging ? '#dceeff' : '', + // styles we need to apply on draggables + ...draggableStyle, +}); + + +class DetailCardsEditAndEdit extends Component{ + constructor(props){ + super(props); + this.state={ + selectShixun:false, + editPanel:true, + search:"", + type:0, + page:1, + ChooseShixunList:undefined, + hometypepvisible:true, + shixuns_listedit:undefined, + patheditarry:[], + stage_name:undefined, + stage_description:undefined, + stageid:undefined, + Modalstype:false, + Modalstopval:'', + Modalsbottomval:'', + delectfunvalue:undefined, + ChooseShixunListshixun_list:undefined, + stage_nametype:false, + descriptiontype:false + } + this.onDragEnd = this.onDragEnd.bind(this); + } + //选择实训弹框 + AddShixunBox = () =>{ + this.setState({ + selectShixun:true, + patheditarry:[] + }) + this.changeTag(0,""); + } + //关闭选择实训弹框 + cloasShixunBox =()=>{ + this.setState({ + selectShixun:false, + patheditarry:[] + }) + } + + searchNameInput=(e)=>{ + this.setState({ + search:e.target.value + }) + } + + //打开选择实训弹框初始化tag标签和列表 + changeTag(id,search){ + this.setState({ + hometypepvisible:true + }) + let pathId=this.props.pathid; + let {page}=this.state; + let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+page + if(search!="" && search!=undefined){ + url+="&search="+search; + } + if(id!=0){ + url+="&type="+id; + } + axios.get(url).then((result)=>{ + if(result.status===200){ + this.setState({ + ChooseShixunList:result.data, + hometypepvisible:false, + type:id, + search:search, + ChooseShixunListshixun_list:result.data.shixun_list + }) + } + }).catch((error)=>{ + console.log(error); + }) + } + + shixunhomeworkedit=(list)=>{ + + let newpatheditarry=[]; + for(var i=0; i{ + + this.setState({ + stage_name:e.target.value + }) + + } + + updatastage_description=(e)=>{ + + this.setState({ + stage_description:e.target.value + }) + + } + + clickShixunchoose=()=>{ + + let{patheditarry,shixuns_listedit,shixuns_listeditlist}=this.state + let newshixuns_listedit=shixuns_listedit; + let list=shixuns_listeditlist + + if(patheditarry.length===0){ + this.setState({ + Modalstype:true, + Modalstopval:'请选择实训', + + }) + + return + } + + let url='/paths/append_to_stage.json' + axios.post(url,{ + shixun_id:patheditarry + }).then((response) => { + let newshixun_lists=response.data.shixun_lists; + + + for(var j=0; j { + console.log(error) + }); + + } + + //保存 + clickShixunsave=()=>{ + let{stage_name,stage_description,stageid,shixuns_listeditlist}=this.state; + let newstage_descriptions=stage_description; + + if(stage_name===""||stage_name===undefined){ + + this.setState({ + stage_nametype:true + }) + + return + } + if(newstage_descriptions!=undefined){ + + if(newstage_descriptions.length>300){ + + this.setState({ + descriptiontype:true + }) + + return + } + }else{ + newstage_descriptions="" + } + + + + let url='/stages/'+stageid+'.json' + axios.put(url, { + name:stage_name, + description:newstage_descriptions, + shixun_id:shixuns_listeditlist + }).then((response) => { + // window.location.href = "/paths/" + response.data.subject_id + this.setState({ + stage_name:undefined, + stage_description:undefined, + shixuns_listeditlist:[], + shixuns_listedit:undefined, + stage_nametype:false, + descriptiontype:false + }) + this.props.updatapathCardsedits() + }).catch((error) => { + console.log(error) + }); + } + + //删除实训 + shixunslisteditdelect=(e)=>{ + + this.setState({ + Modalstype:true, + Modalstopval:'是否删除该实训?', + Modalsbottomval:'', + delectfunvalue:e.target.id + }) + + } + + shixunslisteditdelectfun=()=>{ + let{delectfunvalue}=this.state; + let sum = parseInt(delectfunvalue); + let {shixuns_listedit,shixuns_listeditlist} =this.state; + let newshixuns_listedit=shixuns_listedit + let newshixuns_listeditlist=shixuns_listeditlist + newshixuns_listedit.splice(sum, 1); + newshixuns_listeditlist.splice(sum, 1); + this.setState({ + shixuns_listedit:newshixuns_listedit, + shixuns_listeditlist:newshixuns_listeditlist, + Modalstype:false, + Modalstopval:' ', + Modalsbottomval:'', + delectfunvalue:undefined + }) + } + + + cardsModalcancel=()=>{ + this.setState({ + Modalstype:false, + Modalstopval:'', + Modalsbottomval:'', + delectfunvalue:undefined + }) + } + cardsModalsave=()=>{ + this.setState({ + Modalstype:false, + Modalstopval:'', + Modalsbottomval:'' + }) + } + + + + onDragStart = () => { + /*...*/ + }; + onDragUpdate = () => { + /*...*/ + } + + + onDragEnd (result) { + + let {shixuns_listedit,shixuns_listeditlist} =this.state; + const listedit = reorder( + shixuns_listedit, + result.source.index, + result.destination.index + ); + const listeditlist = reorder( + shixuns_listeditlist, + result.source.index, + result.destination.index + ); + this.setState({ + shixuns_listedit:listedit, + shixuns_listeditlist:listeditlist + }) + } + + contentViewScrolledit=(e)=>{ + //滑动到底判断 + + if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ + this.setState({ + hometypepvisible:true + }) + // console.log("到达底部"); + + let {page,type,search,ChooseShixunListshixun_list}=this.state; + + let newpage=page+1; + + let pathId=this.props.pathid; + + let newChooseShixunListshixun_list=ChooseShixunListshixun_list; + + let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+newpage + + if(search!="" && search!=undefined){ + url+="&search="+search; + } + + if(type!=0){ + url+="&type="+type; + } + axios.get(url).then((result)=>{ + if(result.status===200){ + + let list =result.data.shixun_list; + + for(var i=0; i{ + console.log(error); + }) + + } + + } + + + render(){ + let {selectShixun, + editPanel, + ChooseShixunList, + type, + page, + search, + hometypepvisible, + shixuns_listedit, + patheditarry, + stage_name, + stage_description, + Modalstype, + Modalstopval, + Modalsbottomval, + delectfunvalue, + ChooseShixunListshixun_list, + stage_nametype, + descriptiontype + } = this.state + + return( +
    + this.cardsModalsave():()=>this.shixunslisteditdelectfun()} + > + + + { this.props.idsum===this.props.keys&&this.props.pathCardsedittype===true? + +
    + +
    +

    + {/**/} + {/**/} + {/**/} + + {/**/} +

    +
    + {/*

    章节名称

    */} +
    + * +
    + +
    名称不能为空
    +
    +
    必填项
    +
    +

    描述

    +
    + +
    描述不能超多最大限制300个字符
    +
    +

    + + 选择实训 + + 选择下面实训后,可以通过拖拽进行排序调整 +

    + + {selectShixun===true?:""} + + + + +
    + +
    + + + {ChooseShixunList && ChooseShixunList.shixuns_count} + 个实训 + +
    + this.changeTag(`${type}`,`${search}`)} + style={{width: '115%'}} + > +
    +
    +
      +
    • 实训名称
    • +
    • 使用院校
    • +
    • 使用人数
    • +
    • 评价等级
    • +
    • +
    + + +
    + + { + ChooseShixunListshixun_list && ChooseShixunListshixun_list.map((item,key)=>{ + return( +
    +
  • + + + +
  • +
  • {item.school_users}
  • +
  • {item.myshixuns_count}
  • +
  • {item.preference}
  • +
  • 详情
  • +
    + ) + }) + } +
    +
    +
    + 取消 + 确定 +
    +
    +
    +
    +
    + + {/* 可拖拽选择实训列表*/} + {shixuns_listedit===undefined?'': + + + + {(provided, snapshot) => ( +
    + {shixuns_listedit.map((item,key)=>{ + return( + + {(provided, snapshot) => ( +
    + +
  • + + + + + + + + + + {this.props.idsum+1}-{key+1}  {item.shixun_name} + + + + + +
  • + +
  • + + + +
  • + {provided.placeholder} +
    + )} +
    + )})} +
    + )} +
    +
    + } + + {/*
    */} + {/*
    */} + {/*×*/} + {/*Shixun0*/} + {/*
    */} + {/*

    frerere

    */} + {/*
    */} + {/*
    */} + {/*
    */} + + + {/*

    */} + {/*取消*/} + {/*保存*/} + {/*

    */} + +

    +

    + 取消 + 保存 +
    +

    + + +
    +
    + :''} +
    + ) + } +} +export default DetailCardsEditAndEdit; + + + + + +// { +// shixuns_listedit===undefined?'':shixuns_listedit.map((item,key)=>{ +// return( +//
    +// +//
  • +// +// +// +// +// +// +// +// +// +// {this.props.idsum+1}-{key+1}  {item.shixun_name} +// +// +// +// +// +//
  • +// +//
  • +// +// +// +//
  • +// +//
    +// ) +// }) // } \ No newline at end of file diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 77d2e13bb..7845a1526 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -183,10 +183,12 @@ export function TPMIndexHOC(WrappedComponent) { // return false return this.state.coursedata&&this.state.coursedata.course_identity === 0 } + // 管理员等 isAdminOrCreator = () => { // return this.state.coursedata&&this.state.coursedata.course_identity >= 0 && return this.state.coursedata&&this.state.coursedata.course_identity < 3 } + // 助教等 isAdminOrTeacher = () => { // return this.state.coursedata&&this.state.coursedata.course_identity >= 0 && return this.state.coursedata&&this.state.coursedata.course_identity < 4 diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 7b649f704..db85e9337 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -296,7 +296,7 @@ label.infolabel{display: block;float: left;width: 56px;text-align: right;margin- .subshaicontent a{float: left;margin-right: 20px;color: #999;cursor: pointer} -.search-new{width: 248px;height:32px;position: relative} +.search-new{width: 248px;height:32px;position: relative;margin-right: 35px;} .search-span{display: block;position: absolute;width: 100%;height: 100%;left:0px;top:0px;background-color: #F4F4F4;border: 1px solid #EAEAEA; border-radius: 4px;z-index: 1} .search-new-input{height: 32px;padding-left: 5px;width: 225px;border: none;box-sizing: border-box;background: none;outline: none;position: absolute;left:0px;top:1px;z-index: 2} .search-new img,.search-new a,.search-new .searchicon{cursor: pointer;position: absolute;right:2px;top:2px;z-index: 2} From 6103f76bc03f2adb0dad65de104d361a0d44b6c1 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 13:56:02 +0800 Subject: [PATCH 129/964] font-14 --- .../react/src/modules/courses/busyWork/CommonWorkAppraise.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js index a43576acf..616c86f33 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js @@ -209,7 +209,7 @@ class CommonWorkAppraise extends Component{ { update_time && 更新 - {update_user_name} + {update_user_name} {moment(update_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"":moment(update_time).format('YYYY-MM-DD HH:mm')} @@ -218,7 +218,7 @@ class CommonWorkAppraise extends Component{ { commit_time && 提交 - {author_name} + {author_name} {moment(commit_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"":moment(commit_time).format('YYYY-MM-DD HH:mm')} From 453c462565902f8c2ad8db08aa49ee9e8c3acaea Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 14:04:50 +0800 Subject: [PATCH 130/964] =?UTF-8?q?=E5=85=B1=E6=9C=891=E6=9D=A1=E5=8C=BF?= =?UTF-8?q?=E8=AF=84=E7=94=B3=E8=AF=89=EF=BC=8C0=E6=9D=A1=E5=BE=85?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/CommonWorkList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 10f98a4ab..608ca36f2 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -250,7 +250,7 @@ function buildColumns(that, student_works) { { !!appeal_all_count && - {`${appeal_all_count}/${record.appeal_deal_count}`} + {`${record.appeal_deal_count}/${appeal_all_count}`} } From bc74c4ee9cd61035deebbdae2902278273567105 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 14:38:01 +0800 Subject: [PATCH 131/964] iden --- public/react/src/common/Const.js | 24 ++++++++++++++----- .../react/src/context/TPIContextProvider.js | 17 ++++++++++++- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/public/react/src/common/Const.js b/public/react/src/common/Const.js index ed90302e3..f680cb78d 100644 --- a/public/react/src/common/Const.js +++ b/public/react/src/common/Const.js @@ -1,7 +1,19 @@ +/** +EDU_ADMIN = 1 # 超级管理员 +EDU_BUSINESS = 2 # 运营人员 +EDU_SHIXUN_MANAGER = 3 # 实训管理员 +EDU_SHIXUN_MEMBER = 4 # 实训成员 +EDU_CERTIFICATION_TEACHER = 5 # 平台认证的老师 +EDU_GAME_MANAGER = 6 # TPI的创建者 +EDU_TEACHER = 7 # 平台老师,但是未认证 +EDU_NORMAL = 8 # 普通用户 +*/ + export const EDU_ADMIN = 1 // 超级管理员 -export const EDU_SHIXUN_MANAGER = 2 // 实训管理员 -export const EDU_SHIXUN_MEMBER = 3 // 实训成员 -export const EDU_CERTIFICATION_TEACHER = 4 // 平台认证的老师 -export const EDU_GAME_MANAGER = 5 // TPI的创建者 -export const EDU_TEACHER = 6 // 平台老师,但是未认证 -export const EDU_NORMAL = 7 // 普通用户 \ No newline at end of file +export const EDU_BUSINESS = 2 // # 运营人员 +export const EDU_SHIXUN_MANAGER = 3 // 实训管理员 +export const EDU_SHIXUN_MEMBER = 4 // 实训成员 +export const EDU_CERTIFICATION_TEACHER = 5 // 平台认证的老师 +export const EDU_GAME_MANAGER = 6 // TPI的创建者 +export const EDU_TEACHER = 7 // 平台老师,但是未认证 +export const EDU_NORMAL = 8 // 普通用户 \ No newline at end of file diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index 881a596e1..60d63a1bd 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -32,7 +32,7 @@ import _ from 'lodash' import TPIContext from './TPIContext' import { EDU_ADMIN, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER - , EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL} from 'educoder' + , EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL, EDU_BUSINESS} from 'educoder' import { MuiThemeProvider, createMuiTheme, withStyles } from 'material-ui/styles'; import MUIDialogStyleUtil from '../modules/page/component/MUIDialogStyleUtil' @@ -447,6 +447,18 @@ pop_box_new(htmlvalue, 480, 182); // const EDU_TEACHER = 6 // 平台老师,但是未认证 // const EDU_NORMAL = 7 // 普通用户 + + /** + EDU_ADMIN = 1 # 超级管理员 + EDU_BUSINESS = 2 # 运营人员 + EDU_SHIXUN_MANAGER = 3 # 实训管理员 + EDU_SHIXUN_MEMBER = 4 # 实训成员 + EDU_CERTIFICATION_TEACHER = 5 # 平台认证的老师 + EDU_GAME_MANAGER = 6 # TPI的创建者 + EDU_TEACHER = 7 # 平台老师,但是未认证 + EDU_NORMAL = 8 # 普通用户 + */ + // myshixun_manager power is_teacher resData.power = 0 resData.myshixun_manager = false @@ -455,6 +467,9 @@ pop_box_new(htmlvalue, 480, 182); if (resData.user.identity === EDU_ADMIN) { resData.power = 1 resData.myshixun_manager = true + } else if (resData.user.identity === EDU_BUSINESS) { + resData.power = 1 + resData.myshixun_manager = true } else if (resData.user.identity === EDU_SHIXUN_MANAGER) { resData.power = 1 resData.myshixun_manager = true From aa498d7db5411faf1551a479c08d760aa7a51613 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, 24 Jun 2019 14:51:15 +0800 Subject: [PATCH 132/964] =?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/coursesPublic/Startshixuntask.js | 3 +- .../shixunHomework/Trainingjobsetting.js | 77 ++++++++++++++----- public/react/src/modules/tpm/NewHeader.js | 4 +- 3 files changed, 60 insertions(+), 24 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js index e643d9608..9cf44c9a7 100644 --- a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js +++ b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js @@ -103,7 +103,8 @@ class Startshixuntask extends Component{ hidestartshixunsreplacevalue, startshixunCombattype, shixunsmessage, - startbtn + startbtn, + isSpin } = this.state; return( diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index a15fd16b1..a1896da66 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -637,7 +637,8 @@ class Trainingjobsetting extends Component { //允许补交 onChanges = (e) => { - // debugger + console.log("640"); + console.log(this.state.end_time); if(e.target.value ==="允许补交"){ if(this.state.end_time !== null && this.state.end_time!== undefined){ // console.log(this.state.end_time); @@ -955,26 +956,55 @@ class Trainingjobsetting extends Component { - disabledEndDate = (end_time) => { - const publish_time = this.state.publish_time; - if (!end_time || !publish_time) { + // disabledEndDate = (end_time) => { + // const publish_time = this.state.publish_time; + // if (!end_time || !publish_time) { + // return false; + // } + // return end_time.valueOf() <= publish_time.valueOf(); + // + // } + // disabledEndDates = (end_time) => { + // const publish_time = this.state.end_time + // if (!end_time || !publish_time) { + // return false; + // } + // console.log("end_time.valueOf()") + // // console.log(end_time.valueOf()); + // // console.log(publish_time.valueOf()); + // return end_time.valueOf() <= publish_time.valueOf(); + // + // + // } + + disabledStartDatestart= (startValue) => { + const endValue = this.state.end_time + + if (!startValue || !endValue) { return false; } - return end_time.valueOf() <= publish_time.valueOf(); + return startValue.valueOf() > endValue.valueOf(); + }; + disabledEndDateend = (endValue) => { + const startValue = this.state.publish_time; + if (!endValue || !startValue) { + return false; + } + return endValue.valueOf() <= startValue.valueOf(); + }; - } - disabledEndDates = (end_time) => { - const publish_time = this.state.end_time - if (!end_time || !publish_time) { + + disabledEndDateendd = (endsValue) => { + const endValues = this.state.end_time + + if (!endsValue|| !endValues) { return false; } - console.log("end_time.valueOf()") - // console.log(end_time.valueOf()); - // console.log(publish_time.valueOf()); - return end_time.valueOf() <= publish_time.valueOf(); + return endsValue.valueOf() <= endValues.valueOf(); + }; + - } onChangedata = (field, value, dateString) => { this.setState({ [field]: handleDateString(dateString), @@ -1085,7 +1115,10 @@ class Trainingjobsetting extends Component { // console.log(value); console.log(dateString); // console.log(handleDateString(dateString)); - this.onChangedata('publish_time', value, dateString); + // this.onChangedata('publish_time', value, dateString); + this.setState({ + publish_time:moment(handleDateString(dateString)) + }) if(this.state.allowreplenishment === "允许补交") { this.setState({ end_time:moment(handleDateString(dateString)).add(1, 'months'), @@ -1144,11 +1177,13 @@ class Trainingjobsetting extends Component { } catch (e) { } - this.onChangedata('end_time', value, dateString); + // this.onChangedata('end_time', value, dateString); if(this.state.allowreplenishment === "允许补交"){ this.setState({ - late_time:moment(handleDateString(dateString)).add(1, 'months'), - late_times:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'), + end_time:moment(handleDateString(dateString)).add(1, 'months'), + deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'), + late_time:moment(handleDateString(dateString)).add(2, 'months'), + late_times:moment(handleDateString(dateString)).add(2, 'months').format('YYYY-MM-DD HH:mm'), }) } @@ -1647,7 +1682,7 @@ class Trainingjobsetting extends Component { { // join_course_url: "https://www.educoder.net/courses/join_course_multi_role" // join_project_url: "https://www.educoder.net/applied_project/applied_project_info" // rolearr:["",""], - console.log("618"); - console.log(user_phone_binded); + // console.log("618"); + // console.log(user_phone_binded); return (
    From 6ad93f8cfbde997255897ddce3af74b87e31a4f8 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 14:54:42 +0800 Subject: [PATCH 133/964] appeal_all_count --- .../react/src/modules/courses/busyWork/CommonWorkList.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 608ca36f2..1e8c634f6 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -31,7 +31,9 @@ function renderScore(score, content) { } else if (score >= 60) { color = '#FF6800' } - return {score == '--' ? '--': (content || score)} + return + {score == null || score == undefined || score == '--' ? '--': (content || score)} + } function getScoreTip(score, dom) { return score == '--' ? '未评分' : score == '**' ? '未公开' : dom @@ -217,7 +219,7 @@ function buildColumns(that, student_works) { */ columns.push({ width: 84, - title:
    匿评
    评分
    , + title:
    匿评
    评分
    , key: 'student_score', dataIndex: 'student_score', @@ -253,6 +255,7 @@ function buildColumns(that, student_works) { {`${record.appeal_deal_count}/${appeal_all_count}`} } + { !appeal_all_count && '-/-'} ), }) From 4a392e4ba386e01d2de294fd96f24648363ba4b9 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 14:55:11 +0800 Subject: [PATCH 134/964] iden --- public/react/src/common/educoder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index 285c9eac2..c4fd1544f 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -24,7 +24,7 @@ export { toStore as toStore, fromStore as fromStore } from './Store' export { trace_collapse, trace, debug, info, warn, error, trace_c, debug_c, info_c, warn_c, error_c } from './LogUtil' -export { EDU_ADMIN, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER +export { EDU_ADMIN, EDU_BUSINESS, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER , EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL} from './Const' export { ModalHOC } from './components/ModalHOC' From fc4baada04099c6eaeab05f31b220a435046b490 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, 24 Jun 2019 14:59:30 +0800 Subject: [PATCH 135/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Workquestionandanswer.js | 1 + public/react/src/modules/tpm/NewHeader.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 02107b912..a7c7fbad7 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -467,6 +467,7 @@ class Workquestionandanswer extends Component {
    {jobsettingsdata === undefined ? "" : jobsettingsdata === null ? "" : jobsettingsdata === "null" ? "" : + jobsettingsdata.data.explanation=== undefined?"" :jobsettingsdata.data.explanation=== null?"":
    }
    diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 1620d19fb..6ea5360b4 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -173,8 +173,8 @@ class NewHeader extends Component { user_phone_binded:false, showTrial:false, } - console.log("176") - console.log(props); + // console.log("176") + // console.log(props); } componentDidMount() { From 49453d3b2a6f4825a4428e080e2127b85487c07f Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 14:59:57 +0800 Subject: [PATCH 136/964] new --- public/react/src/modules/courses/busyWork/Index.js | 8 +------- public/react/src/modules/courses/busyWork/IndexGroup.js | 2 +- public/react/src/modules/courses/busyWork/common.js | 4 ++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/Index.js b/public/react/src/modules/courses/busyWork/Index.js index 1f03551fa..e109c36f5 100644 --- a/public/react/src/modules/courses/busyWork/Index.js +++ b/public/react/src/modules/courses/busyWork/Index.js @@ -75,12 +75,6 @@ class CoursesWorkIndex extends Component{ (props) => () } > - () - } - > - {/* 作业问答 */} () } > - () } diff --git a/public/react/src/modules/courses/busyWork/IndexGroup.js b/public/react/src/modules/courses/busyWork/IndexGroup.js index 0a4415f2f..cfe38766a 100644 --- a/public/react/src/modules/courses/busyWork/IndexGroup.js +++ b/public/react/src/modules/courses/busyWork/IndexGroup.js @@ -117,7 +117,7 @@ class CoursesWorkIndex extends Component{ (props) => () } > - () } diff --git a/public/react/src/modules/courses/busyWork/common.js b/public/react/src/modules/courses/busyWork/common.js index 902e5f34d..70e059f17 100644 --- a/public/react/src/modules/courses/busyWork/common.js +++ b/public/react/src/modules/courses/busyWork/common.js @@ -67,9 +67,9 @@ export function RouteHOC(options = {}) { this.props.history.push(`/courses/${_courseId}/${secondName}/${_workId}/${_studentWorkId}/appraise`) } } - toNewPage = (courseId, workId) => { + toNewPage = (courseId) => { const secondName = this.getModuleName() - this.props.history.push(`/courses/${courseId.coursesId}/${secondName}/new`) + this.props.history.push(`/courses/${courseId.coursesId}/${secondName}/${courseId.categroy_id}/new`) } toListPage = (_courseId, _workId) => { const secondName = this.getModuleName() From 7db2a25c77b090421f9c4ea7891705ec0d18cb2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 24 Jun 2019 15:06:53 +0800 Subject: [PATCH 137/964] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=9D=83=E9=99=90?= =?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 | 2 +- .../tasks/GraduationTasksappraise.js | 35 +++++++++---------- .../src/modules/login/Trialapplication.js | 4 +-- public/react/src/modules/tpm/TPMBanner.js | 2 +- .../tpm/shixunchild/Challenges/Challenges.js | 10 +++--- 5 files changed, 26 insertions(+), 27 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 6c4a20fa9..61ab83126 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -31,7 +31,7 @@ export function initAxiosInterceptors(props) { // proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.educoder.net" proxy = "https://testeduplus2.educoder.net" - proxy="http://47.96.87.25:48080" + //proxy="http://47.96.87.25:48080" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; // 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制 diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index 47f38746c..2fd67bd57 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -259,26 +259,25 @@ class GraduationTasksappraise extends Component{
    - +
    {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.map((item,key)=>{ - return( -
    - - - - - {item.title} - - {item.filesize} - {item.delete===true?:""} - -
    - ) - })} - - + return( + + + + + + {item.title} + + {item.filesize} + {item.delete===true?:""} + + ) + })} + +
    diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index 77abca50c..283574938 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -34,8 +34,8 @@ class Trialapplication extends Component { showTrial: false, } //user_phone_binded 判断是否手机号验证 - console.log("Trialapplication"); - console.log(props); + // console.log("Trialapplication"); + // console.log(props); } Cancel = () => { diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 51d4cee9f..82c18a09d 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -640,7 +640,7 @@ class TPMBanner extends Component { className="fr user_default_btn task-btn-orange font-18" id="shixun_operation" data-remote="true" > - {shixunsDetails.task_operation === undefined ? "" : shixunsDetails.status > 1 ? shixunsDetails.task_operation[0] : "模拟实战"} + {shixunsDetails.task_operation === undefined ? "" : shixunsDetails.task_operation[0]} : "" diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js index 73dcb0b49..49d7cf016 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js @@ -359,7 +359,7 @@ class Challenges extends Component { {item.delete_url != undefined && this.delOperations(item.challenge_id)} - style={{ display: this.props.identity < 4 && this.props.status === 0 ? "block" : 'none' }} + style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && this.props.status === 0 ? "block" : 'none' }} className="fl ring-op-green mr25"> @@ -371,7 +371,7 @@ class Challenges extends Component { {item.up_url != undefined && this.operations(item.challenge_id, "up")} - style={{ display: this.props.identity < 4 && this.props.status === 0 ? "block" : 'none' }} + style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && this.props.status === 0 ? "block" : 'none' }} className="fl ring-op-green mr25"> @@ -381,7 +381,7 @@ class Challenges extends Component { {item.down_url != undefined && this.operations(item.challenge_id, "down")} - style={{ display: this.props.identity < 4 && this.props.status === 0 ? "block" : 'none' }} + style={{ display: this.props.user.admin===true?"block":this.props.identity < 4 && this.props.status === 0 ? "block" : 'none' }} className="fl ring-op-green mr25"> @@ -393,7 +393,7 @@ class Challenges extends Component { item.st === 1 ? Date: Mon, 24 Jun 2019 15:35:35 +0800 Subject: [PATCH 138/964] =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/busyWork/PublishRightnow.js | 6 +++--- public/react/src/modules/courses/busyWork/common.js | 2 +- public/react/src/modules/courses/busyWork/commonWork.js | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/PublishRightnow.js b/public/react/src/modules/courses/busyWork/PublishRightnow.js index b4576f58d..da2054124 100644 --- a/public/react/src/modules/courses/busyWork/PublishRightnow.js +++ b/public/react/src/modules/courses/busyWork/PublishRightnow.js @@ -52,9 +52,9 @@ class PublishRightnow extends Component{ modalname: isPublish ? "立即发布" : "立即截止", modaltype:1, visible:true, - Topval: isPublish ? "本操作只对“未发布”的对象生效" : "本操作只对“提交中”的对象生效", - Botvalleft: isPublish ? "暂不发布" : "暂不截止", - Botval: isPublish ? "则通过后续手动设置,定时发布" : "则将根据已设置的截止时间,定时截止", + Topval: isPublish ? "学生将立即收到作业" : "学生将不能再提交作品", + // Botvalleft: isPublish ? "暂不发布" : "暂不截止", + Botval: this.props.fromListPage ? (isPublish ? "本操作只对“未发布”的分班有效" : "本操作只对“提交中”的分班有效") : '', starttime: isPublish ? `发布时间:${startMoment.format(dateFormat)}` : '', starttimes:isPublish ? `${startMoment.format(dateFormat)}` : '', endtime: isPublish ? `截止时间:${startMoment.add(1, 'months').add(1, 'hours').minutes(0).format(dateFormat)}` : '', diff --git a/public/react/src/modules/courses/busyWork/common.js b/public/react/src/modules/courses/busyWork/common.js index 70e059f17..61bd7fcee 100644 --- a/public/react/src/modules/courses/busyWork/common.js +++ b/public/react/src/modules/courses/busyWork/common.js @@ -69,7 +69,7 @@ export function RouteHOC(options = {}) { } toNewPage = (courseId) => { const secondName = this.getModuleName() - this.props.history.push(`/courses/${courseId.coursesId}/${secondName}/${courseId.categroy_id}/new`) + this.props.history.push(`/courses/${courseId.coursesId}/${secondName}/${courseId.category_id}/new`) } toListPage = (_courseId, _workId) => { const secondName = this.getModuleName() diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index b0b80d147..18c668efe 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -75,7 +75,6 @@ class commonWork extends Component{ } componentDidUpdate(prevProps, prevState) { - debugger; if (prevProps.match.path != this.props.match.path) { this.componentDidMount() } @@ -198,6 +197,7 @@ class commonWork extends Component{ this.clearSelection() let {search,order}=this.state; this.getList(1,search,order); + this.props.updataleftNavfun() } console.log(response) }).catch((error) => { @@ -395,11 +395,11 @@ class commonWork extends Component{
  • + isPublish={true} doWhenSuccess={this.doWhenSuccess} fromListPage={true}>
  • + isPublish={false} doWhenSuccess={this.doWhenSuccess} fromListPage={true}>
  • { !!course_public &&
  • 设为公开
  • } From 7145037a53db1c5336310ab0cfd33bf426f05171 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 15:44:15 +0800 Subject: [PATCH 139/964] =?UTF-8?q?=E6=96=87=E5=AD=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/busyWork/CommonWorkQuestion.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkQuestion.js b/public/react/src/modules/courses/busyWork/CommonWorkQuestion.js index 2c1902e59..7932311b1 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkQuestion.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkQuestion.js @@ -101,14 +101,13 @@ class CommonWorkQuestion extends Component{ {isGroup &&
    -
    分组要求:
    -
    分组人数: {group_info.min_num} - {group_info.max_num} 人
    -
    {group_info.base_on_project ? '基于项目实施' : '不基于项目实施'}:
    +
    分组要求: {group_info.min_num} ~ {group_info.max_num}
    +
    {group_info.base_on_project ? '基于项目实施' : '不基于项目'}:
    -
    (提交作品时需要关联同组成员,组内成员作品共享)
    -
    ({group_info.base_on_project ? '基于项目,则项目管理员角色的成员可以提交作品' : '非基于项目,则任意小组成员可以提交作品'})
    -
    (各小组必须在educoder平台创建项目)
    +
    (学生提交作品时需要关联同组成员,组内成员作品共享)
    +
    ({group_info.base_on_project ? '学生必须在本平台创建项目,项目管理员可以提交作品' : '无需再平台创建项目,任意小组成员均可以提交作品'})
    + {/*
    (各小组必须在educoder平台创建项目)
    */}
    } From 8d637c79e802cfd7aacfc67c4967c85e1365671a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 24 Jun 2019 15:57:29 +0800 Subject: [PATCH 140/964] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/tpm/TPMsettings/TPMsettings.js | 3469 +++++++++-------- 1 file changed, 1736 insertions(+), 1733 deletions(-) diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index e2d14127e..351a461f4 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -1,1733 +1,1736 @@ -import React, { Component } from 'react'; - -import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker} from 'antd'; - -// import "antd/dist/antd.css"; - -import locale from 'antd/lib/date-picker/locale/zh_CN'; - -import moment from 'moment'; - -import axios from 'axios'; - -import './css/TPMsettings.css'; - -import { getImageUrl, toPath, getUrl } from 'educoder'; - -let origin = getUrl(); - -let path = getUrl("/editormd/lib/") - -const $ = window.$; - -let timeout; - -let currentValue; - -const Option = Select.Option; - -const RadioGroup = Radio.Group; - -// 恢复数据 -function md_rec_data(k,mdu,id, editor){ - if(window.sessionStorage.getItem(k+mdu) !== null){ - editor.setValue(window.sessionStorage.getItem(k+mdu)); - md_clear_data(k,mdu,id); - } -} - -// 保存数据 -function md_add_data(k,mdu,d){ - window.sessionStorage.setItem(k+mdu,d); -} - -// 清空保存的数据 -function md_clear_data(k,mdu,id){ - window.sessionStorage.removeItem(k+mdu); - var id1 = "#e_tip_"+id; - var id2 = "#e_tips_"+id; - if(k == 'content'){ - $(id2).html(""); - }else{ - $(id1).html(""); - } -} - -function md_elocalStorage(editor,mdu,id){ - if (window.sessionStorage){ - var oc = window.sessionStorage.getItem('content'+mdu); - if(oc !== null ){ - $("#e_tips_"+id).data('editor', editor); - var h = '您上次有已保存的数据,是否恢复 ? / 不恢复'; - $("#e_tips_"+id).html(h); - } - setInterval(function() { - var d = new Date(); - var h = d.getHours(); - var m = d.getMinutes(); - var s = d.getSeconds(); - h = h < 10 ? '0' + h : h; - m = m < 10 ? '0' + m : m; - s = s < 10 ? '0' + s : s; - if(editor.getValue().trim() != ""){ - md_add_data("content",mdu,editor.getValue()); - var id1 = "#e_tip_"+id; - var id2 = "#e_tips_"+id; - - $(id1).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 "); - $(id2).html(""); - } - },10000); - - }else{ - $("#e_tip_"+id).after('您的浏览器不支持localStorage.无法开启自动保存草稿服务,请升级浏览器!'); - } -} - -function create_editorMD(id, width, high, placeholder, imageUrl,initValue, callback) { - var editorName = window.editormd(id, { - width: width, - height: high, - path: path, // "/editormd/lib/" - markdown : initValue, - syncScrolling: "single", - tex: true, - tocm: true, - emoji: true, - taskList: true, - codeFold: true, - searchReplace: true, - htmlDecode: "style,script,iframe", - sequenceDiagram: true, - autoFocus: false, - placeholder: placeholder, - toolbarIcons: function () { - // Or return editormd.toolbarModes[name]; // full, simple, mini - // Using "||" set icons align right. - return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear"] - }, - toolbarCustomIcons: { - testIcon: "
    ", - testIcon1: "
    " - }, - //这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。 - saveHTMLToTextarea: true, - // 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标 - dialogMaskOpacity: 0.6, - imageUpload: true, - imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"], - imageUploadURL: imageUrl,//url - onload: function () { - // this.previewing(); - $("#" + id + " [type=\"latex\"]").bind("click", function () { - editorName.cm.replaceSelection("```latex"); - editorName.cm.replaceSelection("\n"); - editorName.cm.replaceSelection("\n"); - editorName.cm.replaceSelection("```"); - var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line - 1, 0); - }); - - $("#" + id + " [type=\"inline\"]").bind("click", function () { - editorName.cm.replaceSelection("$$$$"); - var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); - editorName.cm.focus(); - }); - $("[type=\"inline\"]").attr("title", "行内公式"); - $("[type=\"latex\"]").attr("title", "多行公式"); - - callback && callback() - } - }); - return editorName; -} - - -function updatamakedown(id){ - setTimeout(()=>{ - var shixunDescr = window.editormd.markdownToHTML(id, { - htmlDecode: "style,script,iframe", - taskList: true, - tex: true, - flowChart: true, - sequenceDiagram: true - }); - $("#"+id+" p:first").addClass("ReactMarkdown"); - $('#collaborators_list_info').show() - }, 200) -} - - -export default class TPMsettings extends Component { - constructor(props) { - super(props) - this.state = { - commandLine: 0, - Openpublic: 0, - settingsData: undefined, - webssh: 0, - use_scope: 0, - shixunsstatus: 0, - shixunsID: undefined, - exec_time: undefined, - trainee: undefined, - can_copy: undefined, - task_pass: undefined, - test_set_permission: undefined, - hide_code: undefined, - code_hidden: undefined, - forbid_copy: undefined, - vnc: undefined, - name: undefined, - scope_partment: undefined, - scopetype: false, - departmentslist: undefined, - description: '', - evaluate_script:undefined, - standard_scripts: undefined, - choice_main_type: "", - choice_small_type: [""], - choice_standard_scripts:undefined, - editordescriptios: undefined, - editorevaluate_scripts: undefined, - choice_standard_scriptssum: undefined, - visibleTemplate: false, - Executiveordervalue: "", - Compilecommandvalue: "", - Executivetyoe: false, - postapplyvisible: false, - sendsure_applyvalue: undefined, - postapplytitle: false, - shixunnametype: false, - shixunmaintype: false, - evaluate_scripttype: false, - exec_timetype: false, - traineetype: false, - standard_scriptsModal:false, - standard_scriptsModals:false, - SelectTheCommandtype:false, - multi_webssh:false, - status:0, - opers:false, - operss:false, - testscripttiptype:false, - opersss:false, - operateshixunstype:false, - opening_time:"", - opensmail:false, - scope_partmenttype:false, - newuse_scope:undefined, - scope_partments:0, - - pod_exist_time: undefined, - pod_exist_timetype: false, - shixunmemoMDvalue:"" - } - } - descriptionMD=(initValue, id)=> { - - this.contentChanged = false; - const placeholder = ""; -// amp; -// 编辑时要传memoId - const imageUrl = `/api/attachments.json`; -// 创建editorMd - - const description_editormd =create_editorMD(id, '100%', 400, placeholder, imageUrl, initValue,()=> { - setTimeout(() => { - description_editormd.resize() - description_editormd.cm && description_editormd.cm.refresh() - }, 500) - - if (initValue != undefined) { - description_editormd.setValue(initValue) - } - description_editormd.cm.on("change", (_cm, changeObj) => { - console.log('....contentChanged') - this.contentChanged = true; - }) - }); - md_elocalStorage(description_editormd, `MemoQuestion_${id}`, `${id}Question`); - this.description_editormd = description_editormd; - window.description_editormd = description_editormd; - } - - evaluate_scriptMD=(initValue, id)=> { - this.contentChanged = false; - const placeholder = ""; -// amp; -// 编辑时要传memoId - const imageUrl = `/api/attachments.json`; -// 创建editorMd - - const evaluate_script_editormd =create_editorMD(id, '100%', 400, placeholder, imageUrl, initValue,()=> { - setTimeout(() => { - evaluate_script_editormd.resize() - evaluate_script_editormd.cm && evaluate_script_editormd.cm.refresh() - }, 500) - - if (initValue != undefined) { - evaluate_script_editormd.setValue(initValue) - } - evaluate_script_editormd.cm.on("change", (_cm, changeObj) => { - console.log('....contentChanged') - this.contentChanged = true; - }) - }); - md_elocalStorage(evaluate_script_editormd, `MemoQuestion_${id}`, `${id}Question`); - this.evaluate_script_editormd = evaluate_script_editormd; - window.evaluate_script_editormd = evaluate_script_editormd; - - } - - - - componentDidMount() { - - let id=this.props.match.params.shixunId; - - let Url=`/shixuns/`+id+`/settings.json`; - - axios.get(Url).then((response)=> { - // alert(response.data.shixun.choice_standard_scripts) - if(response.status===200){ - this.setState({ - shixunsID: id, - settingsData: response.data, - webssh: response.data.shixun.webssh, - use_scope: response.data.shixun.use_scope, - shixunsstatus: response.data.shixun.status, - exec_time: response.data.shixun.exec_time, - trainee: response.data.shixun.trainee, - can_copy: response.data.shixun.can_copy, - task_pass: response.data.shixun.task_pass, - test_set_permission: response.data.shixun.test_set_permission, - hide_code: response.data.shixun.hide_code, - code_hidden: response.data.shixun.code_hidden, - forbid_copy: response.data.shixun.forbid_copy, - vnc: response.data.shixun.vnc, - name: response.data.shixun.name, - scope_partment: response.data.shixun.scope_partment, - description: response.data.shixun.description, - evaluate_script: response.data.shixun.evaluate_script, - choice_main_type: response.data.shixun.choice_main_type, - choice_small_type: response.data.shixun.choice_small_type, - choice_standard_scripts: response.data.shixun.choice_standard_scripts, - standard_scripts:response.data.shixun.standard_scripts, - multi_webssh:response.data.shixun.multi_webssh, - status:response.data.shixun.status, - opening_time:response.data.shixun.opening_time, - newuse_scope:response.data.shixun.use_scope, - scope_partments: response.data.shixun.scope_partment.length, - shixunmemoMDvalue:response.data.shixun.evaluate_script - }) - - // if(response.data.status===403){ - // message: "您没有权限进行该操作" - // this.setState({ - // :true - // message403:response.data.message - // }) - // } - - - if(response.data.shixun.multi_webssh===true){ - this.setState({ - SelectTheCommandtype:true - }) - }else{ - this.setState({ - SelectTheCommandtype:false - }) - } - if (response.data.shixun.scope_partment.length > 0) { - this.setState({ - scopetype: true - }) - } - // console.log(response.data.shixun.description) - // console.log(response.data.shixun.evaluate_script) - // console.log(response.data.shixun.description) - // this.props.identity<4&&this.props.status==0||this.props.identity===1&&this.props.status==2 - - - // this.evaluate_scriptMD(response.data.shixun.evaluate_script, "shixunmemoMD"); - - this.descriptionMD(response.data.shixun.description, "shixundescription"); - // if (response.data.shixun.status === 2) { - // - // } else if (response.data.shixun.status === 1) { - // this.props.showSnackbar("这个实训已发布不能修改!"); - // } else if (response.data.shixun.status === 3) { - // this.props.showSnackbar("这个实训已关闭不能修改!"); - // } - } - - }); - - - let departmentsUrl = `/shixuns/departments.json`; - axios.get(departmentsUrl).then((response) => { - if (response.status === 200) { - this.setState({ - departmentslist: response.data.shools_name - }); - } - }).catch((error) => { - console.log(error) - }); - - - - } - - SelectshixunCommand=(e)=>{ - // console.log( e.target.value) - this.setState({ - webssh: e.target.value, - }); - if(e.target.value===2){ - this.setState({ - SelectTheCommandtype: true, - multi_webssh:false - }); - }else{ - this.setState({ - SelectTheCommandtype: false, - multi_webssh:false - }); - } - } - - SelectOpenpublic=(e)=>{ - this.setState({ - Openpublic: e.target.value - }); - } - - can_copy=(e)=>{ - let sum = "" - if (e.target.checked === false) { - sum = 0 - } else if (e.target.checked === true) { - sum = 1 - } - this.setState({ - can_copy: sum, - }); - - } - - task_pass=(e)=>{ - - let sum = "" - if (e.target.checked === false) { - sum = 0 - } else if (e.target.checked === true) { - sum = 1 - } - this.setState({ - task_pass: sum, - }); - } - - test_set_permission=(e)=>{ - let sum = "" - if (e.target.checked === false) { - sum = 0 - } else if (e.target.checked === true) { - sum = 1 - } - this.setState({ - test_set_permission: sum, - }); - - } - - hide_code=(e)=>{ - let sum = "" - if (e.target.checked === false) { - sum = 0 - } else if (e.target.checked === true) { - sum = 1 - } - this.setState({ - hide_code: sum, - }); - - } - - code_hidden=(e)=>{ - let sum = "" - if (e.target.checked === false) { - sum = 0 - } else if (e.target.checked === true) { - sum = 1 - } - this.setState({ - code_hidden: sum, - }); - - } - forbid_copy = (e) => { - let sum = "" - if (e.target.checked === false) { - sum = 0 - } else if (e.target.checked === true) { - sum = 1 - } - this.setState({ - forbid_copy: sum, - }); - } - - shixun_vnc=(e)=>{ - let sum = "" - if (e.target.checked === false) { - sum = 0 - } else if (e.target.checked === true) { - sum = 1 - } - this.setState({ - vnc: sum, - }); - - } - shixunsname = (e) => { - // let {shixunsstatus}=this.state; - // if(shixunsstatus>0){ - // return - // } - this.setState({ - name: e.target.value, - shixunnametype:false - }) - } - - bigClass = (value) => { - let url = `/shixuns/get_mirror_script.json?mirror_id=`+value; - axios.get(url).then((response) => { - if (response.status === 200) { - // console.log(response.data) - this.setState({ - choice_main_type: value, - standard_scripts:response.data, - choice_standard_scripts:null - }) - } - }).catch((error) => { - console.log(error) - }); - - - - } - - littleClass = (value) => { - this.setState({ - choice_small_type: value - }) - } - onPodExistTimeChange = (e) => { - this.setState({ - pod_exist_time: e.target.value, - pod_exist_timetype: false, - }) - } - Timevalue = (e) => { - this.setState({ - exec_time: e.target.value - }) - } - SelectOpenpublic = (e) => { - this.setState({ - scopetype: false, - use_scope: e.target.value, - }); - if (e.target.value === 1) { - this.setState({ - scopetype: true - }); - } - - } - deleteScopeInput = (key) => { - let {scope_partment} = this.state; - let datalist = scope_partment; - datalist.splice(key, 1); - this.setState({ - scope_partment: datalist - }); - } - - shixunScopeInput = (e) => { - 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 - }); - } - // adduse_scopeinput = () => { - // let {scope_partment} = this.state; - // let array = scope_partment; - // let newarray = "" - // array.push(newarray) - // this.setState({ - // scope_partment: array, - // }); - // } - submit_edit_shixun = () => { - let { - name, description, choice_main_type, choice_small_type, choice_standard_scripts, scope_partment, choice_standard_scriptssum, - evaluate_script, exec_time, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh, - opening_time, pod_exist_time,shixunmemoMDvalue - } = this.state; - let operateauthority=this.props.identity<4&&this.props.status==0||this.props.identity===1&&this.props.status==2||this.props.identity===1&&this.props.status==1; - - const description_editormd = this.description_editormd.getValue(); - - let evaluate_script_editormd; - - if(operateauthority===true){ - // evaluate_script_editormd = this.evaluate_script_editormd.getValue(); - evaluate_script_editormd = shixunmemoMDvalue - }else{ - evaluate_script_editormd = evaluate_script; - } - - - if (name === "") { - this.setState({ - shixunnametype: true - }) - $('html').animate({ - scrollTop: 10 - }, 1000); - return - } - if (choice_main_type === "") { - this.setState({ - shixunmaintype: true - }) - $('html').animate({ - scrollTop: 800 - }, 1000); - return - } - if (evaluate_script_editormd === "") { - this.setState({ - evaluate_scripttype: true - }) - $('html').animate({ - scrollTop: 1200 - }, 1000); - return - } - if(use_scope===1){ - - if(scope_partment===undefined||scope_partment.length===0){ - this.setState({ - scope_partmenttype: true - }) - $('html').animate({ - scrollTop: 2500 - }, 1000); - this.props.showSnackbar("公开程度,指定单位为空"); - return - } - } - if (exec_time === "") { - this.setState({ - exec_timetype: true - }) - $('html').animate({ - scrollTop: 1500 - }, 1000); - return - } - - // if (!pod_exist_time) { - // this.setState({ - // pod_exist_timetype: true - // }) - // $("html, body").animate({ scrollTop: $('#pod_exist_time').offset().top - 100 }, 1000) - // return - // } - - if (trainee === "") { - this.setState({ - traineetype: true - }) - return - } - - let id = this.props.match.params.shixunId; - - let newmulti_webssh=multi_webssh; - if(newmulti_webssh===true){ - newmulti_webssh=1 - }else{ - newmulti_webssh=0 - } - - if(newmulti_webssh===null){ - newmulti_webssh=0 - } - - let Url = `/shixuns/` + id + `.json`; - let data = { - name: name, - description: description_editormd, - main_type: choice_main_type, - small_type: choice_small_type, - webssh: webssh, - user_scope: use_scope, - scope_partment: scope_partment, - can_copy: can_copy, - vnc: vnc, - test_set_permission: test_set_permission, - code_hidden: code_hidden, - trainee: trainee, - task_pass: task_pass, - standard_scripts: choice_standard_scripts, - hide_code: hide_code, - forbid_copy: forbid_copy, - exec_time: exec_time, - evaluate_script: evaluate_script_editormd, - multi_webssh:newmulti_webssh, - opening_time:opening_time, - mirror_script_id:choice_standard_scriptssum, - delType:1 - } - - axios.put(Url, data).then((response) => { - // console.log(response) - if(response.status){ - if (response.data.status === -1) { - this.props.showSnackbar(response.data.message); - return - } else { - window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges"; - } - } - - }).catch((error) => { - console.log(error) - }) - - - } - shixunsfetch = (value, callback) => { - if (timeout) { - clearTimeout(timeout); - timeout = null; - } - currentValue = value; - - function fake() { - let departmentsUrl = `/shixuns/departments.json?q=` + currentValue; - axios.get(departmentsUrl).then((response) => { - callback(response.data.shools_name); - }).catch((error) => { - console.log(error) - }); - } - - timeout = setTimeout(fake, 300); - } - shixunHandleSearch = (value) => { - this.shixunsfetch(value, departmentslist => this.setState({departmentslist})); - } - - - - - shixunsclose = () => { - let id = this.props.match.params.shixunId; - let cul = `/shixuns/` + id + `/close.json`; - axios.post(cul).then((response) => { - if(response.data.status===1){ - this.props.showSnackbar("操作成功"); - this.setState({ - operateshixunstype: false, - }); - - window.location.href = "/shixuns/" + id + "/challenges"; - } - }).catch((error) => { - console.log(error) - }) - } - - shixunsdel= () => { - let id = this.props.match.params.shixunId; - let cul = `/shixuns/` + id +`.json`; - - axios.delete(cul).then((response) => { - if(response.data.status===1){ - this.props.showSnackbar("操作成功"); - this.setState({ - operateshixunstype: false, - }); - - window.location.href = "/shixuns"; - } - }).catch((error) => { - console.log(error) - }) - } - - Executiveorder = (e) => { - this.setState({ - Executiveordervalue: e.target.value - }) - } - - Compilecommand = (e) => { - this.setState({ - Compilecommandvalue: e.target.value - }) - } - - handleCancelTemplate = (e) => { - this.setState({ - Executiveordervalue: "", - Compilecommandvalue: "", - visibleTemplate: false - }) - } - - hideModalTemplate = (e) => { - let id = this.props.match.params.shixunId; - let {Executiveordervalue, Compilecommandvalue} = this.state; - - if (Executiveordervalue === "") { - this.setState({ - Executivetyoe: true, - }); - return - } - // Executiveordervalue=String(Executiveordervalue); - // Compilecommandvalue=String(Compilecommandvalue); - let trl = `/shixuns/${id}/get_custom_script.json?compile=${Executiveordervalue}&excutive=${Compilecommandvalue}` - axios.get(trl).then((response) => { - // this.evaluate_scriptMD(response.data.shixun_script, "shixunmemoMD"); - this.setState({ - shixunmemoMDvalue:response.data.shixun_script - }) - }).catch((error) => { - console.log(error) - }); - this.setState({ - visibleTemplate: false - }) - } - - showModal = () => { - this.setState({ - visibleTemplate: true, - }); - } - Selecttrainee = (value) => { - this.setState({ - trainee: value, - }); - } - - post_apply = () => { - this.setState({ - postapplyvisible: true - }) - } - - sendsure_applyvalues = (e) => { - this.setState({ - sendsure_applyvalue: e.target.value - }) - } - - sendsure_apply = () => { - let {sendsure_applyvalue} = this.state; - let url = "/shixuns/apply_shixun_mirror.json"; - axios.post(url, { - note: sendsure_applyvalue - }).then((response) => { - if (response.status === 200) { - if (response.data.status == 1) { - this.setState({ - postapplyvisible: false, - postapplytitle: true - }) - } - - } - }).catch((error) => { - console.log(error) - }); - - } - - sendhideModaly = () => { - this.setState({ - postapplyvisible: false - }) - } - - yeshidemodel = () => { - this.setState({ - postapplytitle: false - }) - } - - SelectScput = (value, e) => { - this.setState({ - choice_standard_scriptssum: value, - choice_standard_scripts: {id:e.props.value,value:""}, - standard_scriptsModal:true - }) - } - - hidestandard_scriptsModal=()=>{ - this.setState({ - standard_scriptsModal:false, - standard_scriptsModals:false - }) - } - - get_mirror_script=()=>{ - let {choice_standard_scriptssum}=this.state; - let id = this.props.match.params.shixunId; - let pul = "/shixuns/" + id + "/get_script_contents.json?script_id=" + choice_standard_scriptssum; - axios.get(pul).then((response) => { - if(response.status===200){ - // this.evaluate_scriptMD(response.data.content, "shixunmemoMD"); - this.setState({ - standard_scriptsModal:false, - standard_scriptsModals:true, - shixunmemoMDvalue:response.data.content - }) - } - - }).catch((error) => { - console.log(error) - }) - } - - - SelectTheCommandonChange=(e)=>{ - this.setState({ - multi_webssh:e.target.checked - }) - } - - bigopen=()=>{ - this.setState({ - opers:true - }) - } - - bigopens=()=>{ - this.setState({ - opers:false, - operss:false, - opersss:false, - opensmail:false - }) - } - bigopensmal=()=>{ - this.setState({ - opensmail:true - }) - } - sbigopen=()=>{ - this.setState({ - operss:true - }) - } - - sbigopens=()=>{ - this.setState({ - operss:false - }) - } - sbigopenss=()=>{ - this.setState({ - opersss:true - }) - } - - sbigopensss=()=>{ - this.setState({ - opersss:false - }) - } - testscripttip=(val)=>{ - if(val===0){ - this.setState({ - testscripttiptype:true - }) - }else if(val===1){ - this.setState({ - testscripttiptype:false - }) - } - } - - operateshixuns=(value)=>{ - this.setState({ - operateshixunstype:true, - delType:value - }) - } - - hideoperateshixuns=()=>{ - this.setState({ - operateshixunstype:false - }) - } - onChangeTimePicker =(value, dateString)=> { - this.setState({ - opening_time:dateString - }) - } - - getshixunmemoMDvalue=(e)=>{ - this.setState({ - shixunmemoMDvalue:e.target.value - }) - } - render() { - let { - postapplyvisible, - sendsure_applyvalue, - postapplytitle, - shixunnametype, - shixunmaintype, - evaluate_scripttype, - exec_timetype, - traineetype, - standard_scripts, - description, - evaluate_script, - name, - settingsData, - webssh, - use_scope, - shixunsstatus, - shixunsID, - exec_time, - pod_exist_time, - pod_exist_timetype, - can_copy, - choice_standard_scripts, - Executiveordervalue, - Executivetyoe, - Compilecommandvalue, - task_pass, - test_set_permission, - hide_code, - forbid_copy, - code_hidden, - vnc, - scopetype, - scope_partment, - departmentslist, - trainee, - choice_main_type, - choice_small_type, - standard_scriptsModal, - standard_scriptsModals, - SelectTheCommandtype, - status, - opers, - operss, - opersss, - testscripttiptype, - operateshixunstype, - opening_time, - opensmail, - scope_partmenttype, - newuse_scope, - scope_partments, - shixunmemoMDvalue,delType - } = this.state; - - let options; - - if (departmentslist != undefined) { - options = this.state.departmentslist.map((d, k) => { - return ( - - ) - }) - } - - const dateFormat = 'YYYY-MM-DD HH:mm:ss'; - let operateauthority=this.props.identity<4&&this.props.status==0||this.props.identity===1&&this.props.status==2||this.props.identity===1&&this.props.status==1; - - return ( -
    -
    -
    - 配置 - { - this.props.identity===1&&this.props.status==2? - this.operateshixuns(2)}> - 永久关闭 - :"" - } - { - this.props.identity < 4 && this.props.status==0? - this.operateshixuns(1)}> - 删除实训 - :"" - } - { - this.props.identity == 1 && this.props.status == 2 ? - this.operateshixuns(1)}> - 删除实训 - :"" - } - - -
    - {delType===1?

    是否确认删除 ?

    :

    关闭后,
    用户不能再开始挑战了是否确认关闭 ?

    } -
    -
    - 取消 - {delType===2?确定:确定} -
    -
    - -
    - -
    - -

    实训名称

    - -
    - * -
    -
    - {settingsData === undefined ? "" : - } -
    -
    - 必填项 -
    -
    - - -
    - -
    -
    - -
    - -

    简介

    - -
    - -
    -
    -
    -

    -

    -
    - -
    -
    -

    技术平台

    - - -
    - * -
    - -

    - 列表中没有? - 申请新建 -

    - - - - - - -
    -

    新建申请已提交,请等待管理员的审核

    -
  • 我们将在1-2个工作日内与您联系 -
  • -
    -
    - 知道啦 -
    -
    -
    -
    - -
    - -
    -
    - 必填项 -
    - {/*

    请在配置页面完成后续的评测脚本设置操作

    */} - -
    -
    -
    -
    -
    -

    评测脚本

    -
    - - -
    -

    原有脚本将被新的脚本覆盖,无法撤销

    -

    是否确认执行覆盖操作

    -
    - - -
    - - -

    评测脚本生成成功!

    - -
    - - { - this.props.identity<4||this.props.power==true? - 使用自定义脚本 : "" - } - - - -
    -
  • - - -

    执行命令不能为空

    -
  • - -
  • - - -
  • -
    -
    -
    -
    - -
    -
    - * -
    - - -
    - -
    - - - {/*
    */} - {/*{evaluate_script===undefined?"":evaluate_script}*/} - - {/*
    */} - - -
    - this.testscripttip(0)}> -
    - -
    -

    - 使用自定义模板,平台无法自动更新脚本,
    - 请在关卡创建完后手动更新脚本中的必填参
    - 数和以下2个数组元素:
    - challengeProgramNames
    - sourceClassNames

    - 示例:有2个关卡的实训

    - 各关卡的待编译文件为:
    - src/step1/HelloWorld.java
    - src/step2/Other.java

    - 各关卡的编译后生成的执行文件为:
    - step1.HelloWorld
    - step2.Other

    - 则数组元素更新如下:
    - challengeProgramNames=("src/step1/
    - HelloWorld.java" "src/step2/Other.java")
    - sourceClassNames=("step1.HelloWorld
    - " "step2.Other")

    - 其它参数可按实际需求定制 -

    -
    -

    - this.testscripttip(1)}>知道了 -

    -
    -
    -
    - -
    -
    -
    - - 必填项 -
    -

    -

    -
    -
    - -
    - * - -

    程序最大执行时间

    - - - -
    - 必填项 -
    -
    - - {/*
    - * - -

    Pod存活时间

    - - - -
    - 必填项 -
    -
    */} - - -
    -

    命令行

    - - 无命令行窗口 (选中则不给学员的实践任务提供命令窗口) - 命令行练习窗口 (选中则给学员提供用于练习操作的命令行窗口) - 命令行评测窗口 (选中则给学员提供用于关卡评测的命令行窗口) - - 多个命令行窗口(选中则允许学员同时开启多个命令行窗口) - - -
    - -
    -

    公开程度

    - - 对所有公开 (选中则所有已被试用授权的用户可以学习) - 对指定单位公开 (选中则下方指定单位的已被试用授权的用户可以学习) - - -
    -
    -
    -
    -
    - -
    - (搜索并选中添加单位名称) -
    - {/*+*/} - {/*添加*/} -
    - -
    - - {/*{*/} - {/*scope_partment===undefined?"":scope_partment.map((item,key)=>{*/} - {/*return(*/} - {/*
    */} - {/*this.deleteScopeInput(key)} style={{ color: 'rgba(0,0,0,.25)' }} />}*/} - {/*value={item}*/} - {/*/>*/} - {/*
    */} - - {/*)*/} - {/*})*/} - {/*}*/} -
    - - - 请选择需要公开的单位 - -
    -
    -
    - -
    -

    发布信息

    - -
    - * - 面向学员: - -
    - -
    - 实训难易度定位,不限定用户群体 -
    - 必填项 -
    - -
    -
    - 复制: - - - - -
    - -
    - 跳关: - - - - -
    -
    - 测试集解锁: - - - - -
    - -
    - 隐藏代码窗口: - - - - -
    - -
    - 代码目录隐藏: - - - - -
    - -
    - 禁用复制粘贴: - - - - -
    - -
    - 开启时间: - - - - -
    - {/*
    */} - {/*VNC图形化:*/} - {/**/} - {/**/} - {/**/} - {/**/} - {/*
    */} - -
    - -

    - { - // this.props.identity<4&&this.props.status==0? - this.props.identity<4? -

    - 保存 - 取消 -
    :"" - } - {/*{*/} - {/*this.props.identity===1&&this.props.status==2?*/} - {/*
    */} - {/*保存*/} - {/*取消*/} - {/*/!**!/*/} - {/*/!*永久关闭*!/*/} - {/*/!**!/*/} - {/*
    :""*/} - {/*}*/} - - - - - {/*{*/} - {/*this.props.identity===1||this.props.power==true?*/} - {/*
    */} - {/*保存*/} - {/*取消*/} - {/**/} - {/**/} - {/*{status===0?"":"永久关闭"}*/} - {/**/} - {/**/} - {/*
    :""*/} - - {/*}*/} - {/*
    */} - {/*保存*/} - {/*取消*/} - {/*
    */} -

    - -
    - ); - } -} - - +import React, { Component } from 'react'; + +import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker} from 'antd'; + +// import "antd/dist/antd.css"; + +import locale from 'antd/lib/date-picker/locale/zh_CN'; + +import moment from 'moment'; + +import axios from 'axios'; + +import './css/TPMsettings.css'; + +import { getImageUrl, toPath, getUrl } from 'educoder'; + +let origin = getUrl(); + +let path = getUrl("/editormd/lib/") + +const $ = window.$; + +let timeout; + +let currentValue; + +const Option = Select.Option; + +const RadioGroup = Radio.Group; + +// 恢复数据 +function md_rec_data(k,mdu,id, editor){ + if(window.sessionStorage.getItem(k+mdu) !== null){ + editor.setValue(window.sessionStorage.getItem(k+mdu)); + md_clear_data(k,mdu,id); + } +} + +// 保存数据 +function md_add_data(k,mdu,d){ + window.sessionStorage.setItem(k+mdu,d); +} + +// 清空保存的数据 +function md_clear_data(k,mdu,id){ + window.sessionStorage.removeItem(k+mdu); + var id1 = "#e_tip_"+id; + var id2 = "#e_tips_"+id; + if(k == 'content'){ + $(id2).html(""); + }else{ + $(id1).html(""); + } +} + +function md_elocalStorage(editor,mdu,id){ + if (window.sessionStorage){ + var oc = window.sessionStorage.getItem('content'+mdu); + if(oc !== null ){ + $("#e_tips_"+id).data('editor', editor); + var h = '您上次有已保存的数据,是否恢复 ? / 不恢复'; + $("#e_tips_"+id).html(h); + } + setInterval(function() { + var d = new Date(); + var h = d.getHours(); + var m = d.getMinutes(); + var s = d.getSeconds(); + h = h < 10 ? '0' + h : h; + m = m < 10 ? '0' + m : m; + s = s < 10 ? '0' + s : s; + if(editor.getValue().trim() != ""){ + md_add_data("content",mdu,editor.getValue()); + var id1 = "#e_tip_"+id; + var id2 = "#e_tips_"+id; + + $(id1).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 "); + $(id2).html(""); + } + },10000); + + }else{ + $("#e_tip_"+id).after('您的浏览器不支持localStorage.无法开启自动保存草稿服务,请升级浏览器!'); + } +} + +function create_editorMD(id, width, high, placeholder, imageUrl,initValue, callback) { + var editorName = window.editormd(id, { + width: width, + height: high, + path: path, // "/editormd/lib/" + markdown : initValue, + syncScrolling: "single", + tex: true, + tocm: true, + emoji: true, + taskList: true, + codeFold: true, + searchReplace: true, + htmlDecode: "style,script,iframe", + sequenceDiagram: true, + autoFocus: false, + placeholder: placeholder, + toolbarIcons: function () { + // Or return editormd.toolbarModes[name]; // full, simple, mini + // Using "||" set icons align right. + return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear"] + }, + toolbarCustomIcons: { + testIcon: "
    ", + testIcon1: "
    " + }, + //这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。 + saveHTMLToTextarea: true, + // 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标 + dialogMaskOpacity: 0.6, + imageUpload: true, + imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"], + imageUploadURL: imageUrl,//url + onload: function () { + // this.previewing(); + $("#" + id + " [type=\"latex\"]").bind("click", function () { + editorName.cm.replaceSelection("```latex"); + editorName.cm.replaceSelection("\n"); + editorName.cm.replaceSelection("\n"); + editorName.cm.replaceSelection("```"); + var __Cursor = editorName.cm.getDoc().getCursor(); + editorName.cm.setCursor(__Cursor.line - 1, 0); + }); + + $("#" + id + " [type=\"inline\"]").bind("click", function () { + editorName.cm.replaceSelection("$$$$"); + var __Cursor = editorName.cm.getDoc().getCursor(); + editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); + editorName.cm.focus(); + }); + $("[type=\"inline\"]").attr("title", "行内公式"); + $("[type=\"latex\"]").attr("title", "多行公式"); + + callback && callback() + } + }); + return editorName; +} + + +function updatamakedown(id){ + setTimeout(()=>{ + var shixunDescr = window.editormd.markdownToHTML(id, { + htmlDecode: "style,script,iframe", + taskList: true, + tex: true, + flowChart: true, + sequenceDiagram: true + }); + $("#"+id+" p:first").addClass("ReactMarkdown"); + $('#collaborators_list_info').show() + }, 200) +} + + +export default class TPMsettings extends Component { + constructor(props) { + super(props) + this.state = { + commandLine: 0, + Openpublic: 0, + settingsData: undefined, + webssh: 0, + use_scope: 0, + shixunsstatus: 0, + shixunsID: undefined, + exec_time: undefined, + trainee: undefined, + can_copy: undefined, + task_pass: undefined, + test_set_permission: undefined, + hide_code: undefined, + code_hidden: undefined, + forbid_copy: undefined, + vnc: undefined, + name: undefined, + scope_partment: undefined, + scopetype: false, + departmentslist: undefined, + description: '', + evaluate_script:undefined, + standard_scripts: undefined, + choice_main_type: "", + choice_small_type: [""], + choice_standard_scripts:undefined, + editordescriptios: undefined, + editorevaluate_scripts: undefined, + choice_standard_scriptssum: undefined, + visibleTemplate: false, + Executiveordervalue: "", + Compilecommandvalue: "", + Executivetyoe: false, + postapplyvisible: false, + sendsure_applyvalue: undefined, + postapplytitle: false, + shixunnametype: false, + shixunmaintype: false, + evaluate_scripttype: false, + exec_timetype: false, + traineetype: false, + standard_scriptsModal:false, + standard_scriptsModals:false, + SelectTheCommandtype:false, + multi_webssh:false, + status:0, + opers:false, + operss:false, + testscripttiptype:false, + opersss:false, + operateshixunstype:false, + opening_time:"", + opensmail:false, + scope_partmenttype:false, + newuse_scope:undefined, + scope_partments:0, + + pod_exist_time: undefined, + pod_exist_timetype: false, + shixunmemoMDvalue:"" + } + } + descriptionMD=(initValue, id)=> { + + this.contentChanged = false; + const placeholder = ""; +// amp; +// 编辑时要传memoId + const imageUrl = `/api/attachments.json`; +// 创建editorMd + + const description_editormd =create_editorMD(id, '100%', 400, placeholder, imageUrl, initValue,()=> { + setTimeout(() => { + description_editormd.resize() + description_editormd.cm && description_editormd.cm.refresh() + }, 500) + + if (initValue != undefined) { + description_editormd.setValue(initValue) + } + description_editormd.cm.on("change", (_cm, changeObj) => { + console.log('....contentChanged') + this.contentChanged = true; + }) + }); + md_elocalStorage(description_editormd, `MemoQuestion_${id}`, `${id}Question`); + this.description_editormd = description_editormd; + window.description_editormd = description_editormd; + } + + evaluate_scriptMD=(initValue, id)=> { + this.contentChanged = false; + const placeholder = ""; +// amp; +// 编辑时要传memoId + const imageUrl = `/api/attachments.json`; +// 创建editorMd + + const evaluate_script_editormd =create_editorMD(id, '100%', 400, placeholder, imageUrl, initValue,()=> { + setTimeout(() => { + evaluate_script_editormd.resize() + evaluate_script_editormd.cm && evaluate_script_editormd.cm.refresh() + }, 500) + + if (initValue != undefined) { + evaluate_script_editormd.setValue(initValue) + } + evaluate_script_editormd.cm.on("change", (_cm, changeObj) => { + console.log('....contentChanged') + this.contentChanged = true; + }) + }); + md_elocalStorage(evaluate_script_editormd, `MemoQuestion_${id}`, `${id}Question`); + this.evaluate_script_editormd = evaluate_script_editormd; + window.evaluate_script_editormd = evaluate_script_editormd; + + } + + + + componentDidMount() { + + let id=this.props.match.params.shixunId; + + let Url=`/shixuns/`+id+`/settings.json`; + + axios.get(Url).then((response)=> { + // alert(response.data.shixun.choice_standard_scripts) + if(response.status===200){ + this.setState({ + shixunsID: id, + settingsData: response.data, + webssh: response.data.shixun.webssh, + use_scope: response.data.shixun.use_scope, + shixunsstatus: response.data.shixun.status, + exec_time: response.data.shixun.exec_time, + trainee: response.data.shixun.trainee, + can_copy: response.data.shixun.can_copy, + task_pass: response.data.shixun.task_pass, + test_set_permission: response.data.shixun.test_set_permission, + hide_code: response.data.shixun.hide_code, + code_hidden: response.data.shixun.code_hidden, + forbid_copy: response.data.shixun.forbid_copy, + vnc: response.data.shixun.vnc, + name: response.data.shixun.name, + scope_partment: response.data.shixun.scope_partment, + description: response.data.shixun.description, + evaluate_script: response.data.shixun.evaluate_script, + choice_main_type: response.data.shixun.choice_main_type, + choice_small_type: response.data.shixun.choice_small_type, + choice_standard_scripts: response.data.shixun.choice_standard_scripts, + standard_scripts:response.data.shixun.standard_scripts, + multi_webssh:response.data.shixun.multi_webssh, + status:response.data.shixun.status, + opening_time:response.data.shixun.opening_time, + newuse_scope:response.data.shixun.use_scope, + scope_partments: response.data.shixun.scope_partment.length, + shixunmemoMDvalue:response.data.shixun.evaluate_script + }) + + // if(response.data.status===403){ + // message: "您没有权限进行该操作" + // this.setState({ + // :true + // message403:response.data.message + // }) + // } + + + if(response.data.shixun.multi_webssh===true){ + this.setState({ + SelectTheCommandtype:true + }) + }else{ + this.setState({ + SelectTheCommandtype:false + }) + } + if (response.data.shixun.scope_partment.length > 0) { + this.setState({ + scopetype: true + }) + } + // console.log(response.data.shixun.description) + // console.log(response.data.shixun.evaluate_script) + // console.log(response.data.shixun.description) + // this.props.identity<4&&this.props.status==0||this.props.identity===1&&this.props.status==2 + + + // this.evaluate_scriptMD(response.data.shixun.evaluate_script, "shixunmemoMD"); + + this.descriptionMD(response.data.shixun.description, "shixundescription"); + + // this.bigClass() + // if (response.data.shixun.status === 2) { + // + // } else if (response.data.shixun.status === 1) { + // this.props.showSnackbar("这个实训已发布不能修改!"); + // } else if (response.data.shixun.status === 3) { + // this.props.showSnackbar("这个实训已关闭不能修改!"); + // } + } + + }); + + + let departmentsUrl = `/shixuns/departments.json`; + axios.get(departmentsUrl).then((response) => { + if (response.status === 200) { + this.setState({ + departmentslist: response.data.shools_name + }); + } + }).catch((error) => { + console.log(error) + }); + + + + } + + SelectshixunCommand=(e)=>{ + // console.log( e.target.value) + this.setState({ + webssh: e.target.value, + }); + if(e.target.value===2){ + this.setState({ + SelectTheCommandtype: true, + multi_webssh:false + }); + }else{ + this.setState({ + SelectTheCommandtype: false, + multi_webssh:false + }); + } + } + + SelectOpenpublic=(e)=>{ + this.setState({ + Openpublic: e.target.value + }); + } + + can_copy=(e)=>{ + let sum = "" + if (e.target.checked === false) { + sum = 0 + } else if (e.target.checked === true) { + sum = 1 + } + this.setState({ + can_copy: sum, + }); + + } + + task_pass=(e)=>{ + + let sum = "" + if (e.target.checked === false) { + sum = 0 + } else if (e.target.checked === true) { + sum = 1 + } + this.setState({ + task_pass: sum, + }); + } + + test_set_permission=(e)=>{ + let sum = "" + if (e.target.checked === false) { + sum = 0 + } else if (e.target.checked === true) { + sum = 1 + } + this.setState({ + test_set_permission: sum, + }); + + } + + hide_code=(e)=>{ + let sum = "" + if (e.target.checked === false) { + sum = 0 + } else if (e.target.checked === true) { + sum = 1 + } + this.setState({ + hide_code: sum, + }); + + } + + code_hidden=(e)=>{ + let sum = "" + if (e.target.checked === false) { + sum = 0 + } else if (e.target.checked === true) { + sum = 1 + } + this.setState({ + code_hidden: sum, + }); + + } + forbid_copy = (e) => { + let sum = "" + if (e.target.checked === false) { + sum = 0 + } else if (e.target.checked === true) { + sum = 1 + } + this.setState({ + forbid_copy: sum, + }); + } + + shixun_vnc=(e)=>{ + let sum = "" + if (e.target.checked === false) { + sum = 0 + } else if (e.target.checked === true) { + sum = 1 + } + this.setState({ + vnc: sum, + }); + + } + shixunsname = (e) => { + // let {shixunsstatus}=this.state; + // if(shixunsstatus>0){ + // return + // } + this.setState({ + name: e.target.value, + shixunnametype:false + }) + } + + bigClass = (value) => { + + let url = `/shixuns/get_mirror_script.json?mirror_id=`+value; + axios.get(url).then((response) => { + if (response.status === 200) { + // console.log(response.data) + this.setState({ + choice_main_type: value, + standard_scripts:response.data, + choice_standard_scripts:null + }) + } + }).catch((error) => { + console.log(error) + }); + + + + } + + littleClass = (value) => { + this.setState({ + choice_small_type: value + }) + } + onPodExistTimeChange = (e) => { + this.setState({ + pod_exist_time: e.target.value, + pod_exist_timetype: false, + }) + } + Timevalue = (e) => { + this.setState({ + exec_time: e.target.value + }) + } + SelectOpenpublic = (e) => { + this.setState({ + scopetype: false, + use_scope: e.target.value, + }); + if (e.target.value === 1) { + this.setState({ + scopetype: true + }); + } + + } + deleteScopeInput = (key) => { + let {scope_partment} = this.state; + let datalist = scope_partment; + datalist.splice(key, 1); + this.setState({ + scope_partment: datalist + }); + } + + shixunScopeInput = (e) => { + 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 + }); + } + // adduse_scopeinput = () => { + // let {scope_partment} = this.state; + // let array = scope_partment; + // let newarray = "" + // array.push(newarray) + // this.setState({ + // scope_partment: array, + // }); + // } + submit_edit_shixun = () => { + let { + name, description, choice_main_type, choice_small_type, choice_standard_scripts, scope_partment, choice_standard_scriptssum, + evaluate_script, exec_time, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh, + opening_time, pod_exist_time,shixunmemoMDvalue + } = this.state; + let operateauthority=this.props.identity<4&&this.props.status==0||this.props.identity===1&&this.props.status==2||this.props.identity===1&&this.props.status==1; + + const description_editormd = this.description_editormd.getValue(); + + let evaluate_script_editormd; + + if(operateauthority===true){ + // evaluate_script_editormd = this.evaluate_script_editormd.getValue(); + evaluate_script_editormd = shixunmemoMDvalue + }else{ + evaluate_script_editormd = evaluate_script; + } + + + if (name === "") { + this.setState({ + shixunnametype: true + }) + $('html').animate({ + scrollTop: 10 + }, 1000); + return + } + if (choice_main_type === "") { + this.setState({ + shixunmaintype: true + }) + $('html').animate({ + scrollTop: 800 + }, 1000); + return + } + if (evaluate_script_editormd === "") { + this.setState({ + evaluate_scripttype: true + }) + $('html').animate({ + scrollTop: 1200 + }, 1000); + return + } + if(use_scope===1){ + + if(scope_partment===undefined||scope_partment.length===0){ + this.setState({ + scope_partmenttype: true + }) + $('html').animate({ + scrollTop: 2500 + }, 1000); + this.props.showSnackbar("公开程度,指定单位为空"); + return + } + } + if (exec_time === "") { + this.setState({ + exec_timetype: true + }) + $('html').animate({ + scrollTop: 1500 + }, 1000); + return + } + + // if (!pod_exist_time) { + // this.setState({ + // pod_exist_timetype: true + // }) + // $("html, body").animate({ scrollTop: $('#pod_exist_time').offset().top - 100 }, 1000) + // return + // } + + if (trainee === "") { + this.setState({ + traineetype: true + }) + return + } + + let id = this.props.match.params.shixunId; + + let newmulti_webssh=multi_webssh; + if(newmulti_webssh===true){ + newmulti_webssh=1 + }else{ + newmulti_webssh=0 + } + + if(newmulti_webssh===null){ + newmulti_webssh=0 + } + + let Url = `/shixuns/` + id + `.json`; + let data = { + name: name, + description: description_editormd, + main_type: choice_main_type, + small_type: choice_small_type, + webssh: webssh, + user_scope: use_scope, + scope_partment: scope_partment, + can_copy: can_copy, + vnc: vnc, + test_set_permission: test_set_permission, + code_hidden: code_hidden, + trainee: trainee, + task_pass: task_pass, + standard_scripts: choice_standard_scripts, + hide_code: hide_code, + forbid_copy: forbid_copy, + exec_time: exec_time, + evaluate_script: evaluate_script_editormd, + multi_webssh:newmulti_webssh, + opening_time:opening_time, + mirror_script_id:choice_standard_scriptssum, + delType:1 + } + + axios.put(Url, data).then((response) => { + // console.log(response) + if(response.status){ + if (response.data.status === -1) { + this.props.showSnackbar(response.data.message); + return + } else { + window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges"; + } + } + + }).catch((error) => { + console.log(error) + }) + + + } + shixunsfetch = (value, callback) => { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + currentValue = value; + + function fake() { + let departmentsUrl = `/shixuns/departments.json?q=` + currentValue; + axios.get(departmentsUrl).then((response) => { + callback(response.data.shools_name); + }).catch((error) => { + console.log(error) + }); + } + + timeout = setTimeout(fake, 300); + } + shixunHandleSearch = (value) => { + this.shixunsfetch(value, departmentslist => this.setState({departmentslist})); + } + + + + + shixunsclose = () => { + let id = this.props.match.params.shixunId; + let cul = `/shixuns/` + id + `/close.json`; + axios.post(cul).then((response) => { + if(response.data.status===1){ + this.props.showSnackbar("操作成功"); + this.setState({ + operateshixunstype: false, + }); + + window.location.href = "/shixuns/" + id + "/challenges"; + } + }).catch((error) => { + console.log(error) + }) + } + + shixunsdel= () => { + let id = this.props.match.params.shixunId; + let cul = `/shixuns/` + id +`.json`; + + axios.delete(cul).then((response) => { + if(response.data.status===1){ + this.props.showSnackbar("操作成功"); + this.setState({ + operateshixunstype: false, + }); + + window.location.href = "/shixuns"; + } + }).catch((error) => { + console.log(error) + }) + } + + Executiveorder = (e) => { + this.setState({ + Executiveordervalue: e.target.value + }) + } + + Compilecommand = (e) => { + this.setState({ + Compilecommandvalue: e.target.value + }) + } + + handleCancelTemplate = (e) => { + this.setState({ + Executiveordervalue: "", + Compilecommandvalue: "", + visibleTemplate: false + }) + } + + hideModalTemplate = (e) => { + let id = this.props.match.params.shixunId; + let {Executiveordervalue, Compilecommandvalue} = this.state; + + if (Executiveordervalue === "") { + this.setState({ + Executivetyoe: true, + }); + return + } + // Executiveordervalue=String(Executiveordervalue); + // Compilecommandvalue=String(Compilecommandvalue); + let trl = `/shixuns/${id}/get_custom_script.json?compile=${Executiveordervalue}&excutive=${Compilecommandvalue}` + axios.get(trl).then((response) => { + // this.evaluate_scriptMD(response.data.shixun_script, "shixunmemoMD"); + this.setState({ + shixunmemoMDvalue:response.data.shixun_script + }) + }).catch((error) => { + console.log(error) + }); + this.setState({ + visibleTemplate: false + }) + } + + showModal = () => { + this.setState({ + visibleTemplate: true, + }); + } + Selecttrainee = (value) => { + this.setState({ + trainee: value, + }); + } + + post_apply = () => { + this.setState({ + postapplyvisible: true + }) + } + + sendsure_applyvalues = (e) => { + this.setState({ + sendsure_applyvalue: e.target.value + }) + } + + sendsure_apply = () => { + let {sendsure_applyvalue} = this.state; + let url = "/shixuns/apply_shixun_mirror.json"; + axios.post(url, { + note: sendsure_applyvalue + }).then((response) => { + if (response.status === 200) { + if (response.data.status == 1) { + this.setState({ + postapplyvisible: false, + postapplytitle: true + }) + } + + } + }).catch((error) => { + console.log(error) + }); + + } + + sendhideModaly = () => { + this.setState({ + postapplyvisible: false + }) + } + + yeshidemodel = () => { + this.setState({ + postapplytitle: false + }) + } + + SelectScput = (value, e) => { + this.setState({ + choice_standard_scriptssum: value, + choice_standard_scripts: {id:e.props.value,value:""}, + standard_scriptsModal:true + }) + } + + hidestandard_scriptsModal=()=>{ + this.setState({ + standard_scriptsModal:false, + standard_scriptsModals:false + }) + } + + get_mirror_script=()=>{ + let {choice_standard_scriptssum}=this.state; + let id = this.props.match.params.shixunId; + let pul = "/shixuns/" + id + "/get_script_contents.json?script_id=" + choice_standard_scriptssum; + axios.get(pul).then((response) => { + if(response.status===200){ + // this.evaluate_scriptMD(response.data.content, "shixunmemoMD"); + this.setState({ + standard_scriptsModal:false, + standard_scriptsModals:true, + shixunmemoMDvalue:response.data.content + }) + } + + }).catch((error) => { + console.log(error) + }) + } + + + SelectTheCommandonChange=(e)=>{ + this.setState({ + multi_webssh:e.target.checked + }) + } + + bigopen=()=>{ + this.setState({ + opers:true + }) + } + + bigopens=()=>{ + this.setState({ + opers:false, + operss:false, + opersss:false, + opensmail:false + }) + } + bigopensmal=()=>{ + this.setState({ + opensmail:true + }) + } + sbigopen=()=>{ + this.setState({ + operss:true + }) + } + + sbigopens=()=>{ + this.setState({ + operss:false + }) + } + sbigopenss=()=>{ + this.setState({ + opersss:true + }) + } + + sbigopensss=()=>{ + this.setState({ + opersss:false + }) + } + testscripttip=(val)=>{ + if(val===0){ + this.setState({ + testscripttiptype:true + }) + }else if(val===1){ + this.setState({ + testscripttiptype:false + }) + } + } + + operateshixuns=(value)=>{ + this.setState({ + operateshixunstype:true, + delType:value + }) + } + + hideoperateshixuns=()=>{ + this.setState({ + operateshixunstype:false + }) + } + onChangeTimePicker =(value, dateString)=> { + this.setState({ + opening_time:dateString + }) + } + + getshixunmemoMDvalue=(e)=>{ + this.setState({ + shixunmemoMDvalue:e.target.value + }) + } + render() { + let { + postapplyvisible, + sendsure_applyvalue, + postapplytitle, + shixunnametype, + shixunmaintype, + evaluate_scripttype, + exec_timetype, + traineetype, + standard_scripts, + description, + evaluate_script, + name, + settingsData, + webssh, + use_scope, + shixunsstatus, + shixunsID, + exec_time, + pod_exist_time, + pod_exist_timetype, + can_copy, + choice_standard_scripts, + Executiveordervalue, + Executivetyoe, + Compilecommandvalue, + task_pass, + test_set_permission, + hide_code, + forbid_copy, + code_hidden, + vnc, + scopetype, + scope_partment, + departmentslist, + trainee, + choice_main_type, + choice_small_type, + standard_scriptsModal, + standard_scriptsModals, + SelectTheCommandtype, + status, + opers, + operss, + opersss, + testscripttiptype, + operateshixunstype, + opening_time, + opensmail, + scope_partmenttype, + newuse_scope, + scope_partments, + shixunmemoMDvalue,delType + } = this.state; + + let options; + + if (departmentslist != undefined) { + options = this.state.departmentslist.map((d, k) => { + return ( + + ) + }) + } + + const dateFormat = 'YYYY-MM-DD HH:mm:ss'; + let operateauthority=this.props.identity===1?true:this.props.identity<4&&this.props.status==0; + + return ( +
    +
    +
    + 配置 + { + this.props.identity===1&&this.props.status==2? + this.operateshixuns(2)}> + 永久关闭 + :"" + } + { + this.props.identity < 4 && this.props.status==0? + this.operateshixuns(1)}> + 删除实训 + :"" + } + { + this.props.identity == 1 && this.props.status == 2 ? + this.operateshixuns(1)}> + 删除实训 + :"" + } + + +
    + {delType===1?

    是否确认删除 ?

    :

    关闭后,
    用户不能再开始挑战了是否确认关闭 ?

    } +
    +
    + 取消 + {delType===2?确定:确定} +
    +
    + +
    + +
    + +

    实训名称

    + +
    + * +
    +
    + {settingsData === undefined ? "" : + } +
    +
    + 必填项 +
    +
    + + +
    + +
    +
    + +
    + +

    简介

    + +
    + +
    +
    +
    +

    +

    +
    + +
    +
    +

    技术平台

    + + +
    + * +
    + +

    + 列表中没有? + 申请新建 +

    + + + + + + +
    +

    新建申请已提交,请等待管理员的审核

    +
  • 我们将在1-2个工作日内与您联系 +
  • +
    +
    + 知道啦 +
    +
    +
    +
    + +
    + +
    +
    + 必填项 +
    + {/*

    请在配置页面完成后续的评测脚本设置操作

    */} + +
    +
    +
    +
    +
    +

    评测脚本

    +
    + + +
    +

    原有脚本将被新的脚本覆盖,无法撤销

    +

    是否确认执行覆盖操作

    +
    + + +
    + + +

    评测脚本生成成功!

    + +
    + + { + this.props.identity<4||this.props.power==true? + 使用自定义脚本 : "" + } + + + +
    +
  • + + +

    执行命令不能为空

    +
  • + +
  • + + +
  • +
    +
    +
    +
    + +
    +
    + * +
    + + +
    + +
    + + + {/*
    */} + {/*{evaluate_script===undefined?"":evaluate_script}*/} + + {/*
    */} + + +
    + this.testscripttip(0)}> +
    + +
    +

    + 使用自定义模板,平台无法自动更新脚本,
    + 请在关卡创建完后手动更新脚本中的必填参
    + 数和以下2个数组元素:
    + challengeProgramNames
    + sourceClassNames

    + 示例:有2个关卡的实训

    + 各关卡的待编译文件为:
    + src/step1/HelloWorld.java
    + src/step2/Other.java

    + 各关卡的编译后生成的执行文件为:
    + step1.HelloWorld
    + step2.Other

    + 则数组元素更新如下:
    + challengeProgramNames=("src/step1/
    + HelloWorld.java" "src/step2/Other.java")
    + sourceClassNames=("step1.HelloWorld
    + " "step2.Other")

    + 其它参数可按实际需求定制 +

    +
    +

    + this.testscripttip(1)}>知道了 +

    +
    +
    +
    + +
    +
    +
    + + 必填项 +
    +

    +

    +
    +
    + +
    + * + +

    程序最大执行时间

    + + + +
    + 必填项 +
    +
    + + {/*
    + * + +

    Pod存活时间

    + + + +
    + 必填项 +
    +
    */} + + +
    +

    命令行

    + + 无命令行窗口 (选中则不给学员的实践任务提供命令窗口) + 命令行练习窗口 (选中则给学员提供用于练习操作的命令行窗口) + 命令行评测窗口 (选中则给学员提供用于关卡评测的命令行窗口) + + 多个命令行窗口(选中则允许学员同时开启多个命令行窗口) + + +
    + +
    +

    公开程度

    + + 对所有公开 (选中则所有已被试用授权的用户可以学习) + 对指定单位公开 (选中则下方指定单位的已被试用授权的用户可以学习) + + +
    +
    +
    +
    +
    + +
    + (搜索并选中添加单位名称) +
    + {/*+*/} + {/*添加*/} +
    + +
    + + {/*{*/} + {/*scope_partment===undefined?"":scope_partment.map((item,key)=>{*/} + {/*return(*/} + {/*
    */} + {/*this.deleteScopeInput(key)} style={{ color: 'rgba(0,0,0,.25)' }} />}*/} + {/*value={item}*/} + {/*/>*/} + {/*
    */} + + {/*)*/} + {/*})*/} + {/*}*/} +
    + + + 请选择需要公开的单位 + +
    +
    +
    + +
    +

    发布信息

    + +
    + * + 面向学员: + +
    + +
    + 实训难易度定位,不限定用户群体 +
    + 必填项 +
    + +
    +
    + 复制: + + + + +
    + +
    + 跳关: + + + + +
    +
    + 测试集解锁: + + + + +
    + +
    + 隐藏代码窗口: + + + + +
    + +
    + 代码目录隐藏: + + + + +
    + +
    + 禁用复制粘贴: + + + + +
    + +
    + 开启时间: + + + + +
    + {/*
    */} + {/*VNC图形化:*/} + {/**/} + {/**/} + {/**/} + {/**/} + {/*
    */} + +
    + +

    + { + // this.props.identity<4&&this.props.status==0? + this.props.identity<4? +

    + 保存 + 取消 +
    :"" + } + {/*{*/} + {/*this.props.identity===1&&this.props.status==2?*/} + {/*
    */} + {/*保存*/} + {/*取消*/} + {/*/!**!/*/} + {/*/!*永久关闭*!/*/} + {/*/!**!/*/} + {/*
    :""*/} + {/*}*/} + + + + + {/*{*/} + {/*this.props.identity===1||this.props.power==true?*/} + {/*
    */} + {/*保存*/} + {/*取消*/} + {/**/} + {/**/} + {/*{status===0?"":"永久关闭"}*/} + {/**/} + {/**/} + {/*
    :""*/} + + {/*}*/} + {/*
    */} + {/*保存*/} + {/*取消*/} + {/*
    */} +

    + +
    + ); + } +} + + From 3993378c4d60512230e481a589d9892cb19febd2 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 16:33:17 +0800 Subject: [PATCH 141/964] =?UTF-8?q?=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/busyWork/CommonWorkAppraise.js | 7 ++ .../courses/busyWork/CommonWorkList.js | 2 +- .../courses/busyWork/CommonWorkSetting.js | 78 ++++++++++++++----- .../GraduationTasksappraiseMainEditor.js | 3 +- .../courses/poll/PollDetailTabForthRules.js | 4 +- 5 files changed, 68 insertions(+), 26 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js index 616c86f33..77317792e 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js @@ -180,6 +180,12 @@ class CommonWorkAppraise extends Component{
    */}
    + +
    {(description || (attachments && attachments.length != 0)) &&
    内容 @@ -286,6 +292,7 @@ class CommonWorkAppraise extends Component{
    } +
    {/* task_type={datalist&&datalist.task_type} */} diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 1e8c634f6..a9090a02e 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -228,7 +228,7 @@ function buildColumns(that, student_works) { -
    {`${record.student_comment_count}名学生进行了匿评`}
    + {record.student_comment_count &&
    {`${record.student_comment_count}名学生进行了匿评`}
    }
    有效平均分:{record.student_score}分
    ) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index 1574d692d..181a34b1b 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -259,15 +259,20 @@ class CommonWorkSetting extends Component{ unified_setting: checked }) } + // 启用匿评 anonymous_comment_change = (e) => { const checked = e.target.checked; - const { end_time } = this.state; + const currentEndTime = this._getCurrentEndTime() let evaluation_start, evaluation_end, evaluation_num = 0, absence_penalty = 0; if (checked) { - if (end_time) { - evaluation_start = moment(end_time).add(7, 'days').format(dateFormat) - evaluation_end = moment(end_time).add(21, 'days').format(dateFormat) + if (currentEndTime) { + evaluation_start = moment(currentEndTime).add(7, 'days').format(dateFormat) + evaluation_end = moment(currentEndTime).add(21, 'days').format(dateFormat) + } + if (!this.state.evaluation_num) { evaluation_num = 3 + } + if (!this.state.absence_penalty) { absence_penalty = 2 } } else { @@ -310,6 +315,7 @@ class CommonWorkSetting extends Component{ absence_penalty:value }) } + // 启用匿评申诉 anonymous_appeal_change = (e) => { const { evaluation_end } = this.state; const anonymous_appeal = e.target.checked @@ -389,9 +395,10 @@ class CommonWorkSetting extends Component{ this.setState({ late_penalty: 5 }) - if (this.state.end_time && !this.state.late_time) { + const currentEndTime = this._getCurrentEndTime(); + if (currentEndTime && !this.state.late_time) { this.setState({ - late_time: moment(handleDateString(this.state.end_time)).add(1, 'months').format(dateFormat) + late_time: moment(handleDateString(currentEndTime)).add(1, 'months').format(dateFormat) }) } } @@ -469,6 +476,20 @@ class CommonWorkSetting extends Component{ // } } + _getCurrentEndTime = () => { + const { unified_setting, end_time, rules } = this.state; + if (unified_setting) { + return end_time + } else { + let max_un_unified_setting_end_time = null; + rules.map(item => { + if (!max_un_unified_setting_end_time || moment(item.end_time) > moment(max_un_unified_setting_end_time)) { + max_un_unified_setting_end_time = item.end_time; + } + }) + return max_un_unified_setting_end_time + } + } saveWorkSetting=()=>{ let workId=this.props.match.params.workId; @@ -1077,6 +1098,7 @@ class CommonWorkSetting extends Component{ course_group={adaptered_group_settings} rulesCheckInfo={(info)=>this.rulesCheckInfo(info)} flagPageEdit={true} + moduleName="作业" > } @@ -1254,7 +1276,7 @@ class CommonWorkSetting extends Component{ margin-left: 18px; } `} - +

    允许学生对自己作品的匿评评分进行申诉,由教师和助教处理申诉
    @@ -1297,7 +1319,7 @@ class CommonWorkSetting extends Component{ - + (学生提交匿评申诉的时间截点)

    {
    {appeal_time_tip}
    } @@ -1311,7 +1333,7 @@ class CommonWorkSetting extends Component{ /> - + (学生违规匿评TA人作品时,其成绩将被扣减的分值)
    {this.state.appeal_penalty_tip &&
    {this.state.appeal_penalty_tip}
    } @@ -1346,21 +1368,17 @@ class CommonWorkSetting extends Component{ 多项评分配比(选中,则按照比例计算最终成绩) - +

    计算说明:
    - 优先顺序排前的非零评分 * 100% -
    - ( 迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )
    - 例:有教师评分则教师评分100%,否则教辅评分100%,依次类推 - {/* 教师评分 * 其百分比 + 助教评分 * 其百分比 + 学生匿评平均分 * 其百分比 -
    - ( 迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )
    - -
    + 教师评分 * 其百分比 + 助教评分 * 其百分比 + 学生匿评平均分 * 其百分比 - (
    + 迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )

    注意
    - 非零百分比的评分选项,在没有评分记录的情况下,其百分比平摊到另外的评
    - 分选项上。例如:教师评分40% + 助教评分35% + 学生匿评25%,学生A没
    - 有得到教师评分,则最终成绩将按照助教评分55% + 学生匿评45%进行计算 */} + 非零百分比的评分选项,若评分记录为空,则其百分比将自动平摊到其它非零
    + 评分选项上。
    + 例:教师评分40% + 助教评分35% + 学生匿评25%,学生A没有教师评分记
    + 录,则其最终成绩按照助教评分55% + 学生匿评45%进行计算

    @@ -1392,12 +1410,30 @@ class CommonWorkSetting extends Component{ {
    {final_mode_false_tip}
    } 单项评分优先(选中,则按照优先顺序计算最终成绩) + +

    + 计算说明:
    + + 优先顺序排前的非零评分 * 100% -
    + ( 迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )
    + 例:有教师评分则教师评分100%,否则教辅评分100%,依次类推 + {/* 教师评分 * 其百分比 + 助教评分 * 其百分比 + 学生匿评平均分 * 其百分比 -
    + ( 迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )
    + +
    + 注意
    + 非零百分比的评分选项,在没有评分记录的情况下,其百分比平摊到另外的评
    + 分选项上。例如:教师评分40% + 助教评分35% + 学生匿评25%,学生A没
    + 有得到教师评分,则最终成绩将按照助教评分55% + 学生匿评45%进行计算 */} + +

    +
    教师评分 → 教辅评分 → 学生匿评评分 - (有教师评分则教师评分100%,否则教辅评分100%,依次类推 ) + {/* (有教师评分则教师评分100%,否则教辅评分100%,依次类推 ) */}
    diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js index e722ac00b..15300c628 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js @@ -197,7 +197,6 @@ class GraduationTasksappraiseMainEditor extends Component{ .mainEditor { padding: 0 10px; padding-bottom: 8px; - height: 288px; } .mainEditorTitle { margin-bottom: 6px; @@ -218,7 +217,7 @@ class GraduationTasksappraiseMainEditor extends Component{ -
    +

      - (学生收到{this.props.type==="Exercise"?"试卷":"问卷"}的时间) - (学生可以答题的时间截点) + (学生收到{this.props.moduleName || (this.props.type==="Exercise"?"试卷":"问卷")}的时间) + ({this.props.moduleName == '作业' ? '学生“按时”提交作品的时间截点' : '学生可以答题的时间截点'})

    { From 786cdff86cbec190f1837708500ba3918faa6545 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 16:46:06 +0800 Subject: [PATCH 142/964] memberNumMax --- public/react/src/modules/courses/busyWork/CommonWorkPost.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkPost.js b/public/react/src/modules/courses/busyWork/CommonWorkPost.js index c75e62a10..0193d8659 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkPost.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkPost.js @@ -173,7 +173,7 @@ class CommonWorkPost extends Component{ } if(isGroup){ if(userids!=undefined){ - if(userids.lengthmemberNumMax){ + }else if(userids.length + 1>memberNumMax){ this.setState({ minvalue: memberNumMax, setvalue:"大于", From e8b00031aae80e0ea307474e8b8a0d88ef2aeb53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 24 Jun 2019 17:13:23 +0800 Subject: [PATCH 143/964] =?UTF-8?q?=20=E5=AE=9E=E8=AE=AD=E6=9D=83=E9=99=90?= =?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/modules/tpm/TPMBanner.js | 20 +++++++++---------- .../tpm/shixunchild/Challenges/Challenges.js | 18 ++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 82c18a09d..25a6ab9c7 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -354,7 +354,7 @@ class TPMBanner extends Component { //开始实战按钮 startshixunCombat=(id)=>{ let {shixunsDetails} = this.props - if( shixunsDetails.status>1){ + if( shixunsDetails.shixun_status>1){ this.setState({ startbtn:true, hidestartshixunsreplacevalue:"" @@ -463,11 +463,11 @@ class TPMBanner extends Component { // // } if(shixunsDetails!=undefined){ - if (shixunsDetails.status === 0 ) { + if (shixunsDetails.shixun_status === 0 ) { challengeBtnText = '继续实战' - } else if (shixunsDetails.status === 1) { + } else if (shixunsDetails.shixun_status === 1) { challengeBtnText = '查看实战' - } else if (shixunsDetails.status === 3) { + } else if (shixunsDetails.shixun_status === 3) { challengeBtnText = '继续实战' }else{ challengeBtnText = "开始实战" @@ -640,7 +640,7 @@ class TPMBanner extends Component { className="fr user_default_btn task-btn-orange font-18" id="shixun_operation" data-remote="true" > - {shixunsDetails.task_operation === undefined ? "" : shixunsDetails.task_operation[0]} + {shixunsDetails.task_operation === undefined ? "" : shixunsDetails.shixun_status > 1 ? shixunsDetails.task_operation[0] : "模拟实战"} : "" @@ -707,7 +707,7 @@ class TPMBanner extends Component { {/*>{shixunsDetails.task_operation===undefined?"":shixunsDetails.task_operation[0]}:""*/} {/*}*/} - {shixunsDetails.status === 0 && this.props.identity < 4 ? + {shixunsDetails.shixun_status === 0 && this.props.identity < 4 ? 申请发布 : "" } @@ -772,7 +772,7 @@ class TPMBanner extends Component { - {shixunsDetails.status === 1 && this.props.identity < 4 ? + {shixunsDetails.shixun_status === 1 && this.props.identity < 4 ? 撤销发布 : "" } @@ -781,7 +781,7 @@ class TPMBanner extends Component { 发送至 @@ -847,7 +847,7 @@ class TPMBanner extends Component {
    - {shixunsDetails.status === 3 && + {shixunsDetails.shixun_status === 3 && 已关闭 } @@ -918,7 +918,7 @@ class TPMBanner extends Component {
    正在等待管理员的审核。在审核通过前,可以随时撤销发布
    diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js index 49d7cf016..09bab590d 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js @@ -239,7 +239,7 @@ class Challenges extends Component {

    简介 - @@ -249,7 +249,7 @@ class Challenges extends Component {

    - {ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?"": + {ChallengesDataList === undefined ? "" :ChallengesDataList&&ChallengesDataList.description===null?"":

    }

    @@ -262,7 +262,7 @@ class Challenges extends Component {

    全部任务 - {this.props.identity < 4 && this.props.status === 0 ? + {this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ? : "" } - {this.props.identity < 4 && this.props.status === 0 ? + {this.props.identity < 4 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ? this.delOperations(item.challenge_id)} - style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && this.props.status === 0 ? "block" : 'none' }} + style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }} className="fl ring-op-green mr25"> @@ -371,7 +371,7 @@ class Challenges extends Component { {item.up_url != undefined && this.operations(item.challenge_id, "up")} - style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && this.props.status === 0 ? "block" : 'none' }} + style={{ display:this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status === 0 ? "block" : 'none' }} className="fl ring-op-green mr25"> @@ -381,7 +381,7 @@ class Challenges extends Component { {item.down_url != undefined && this.operations(item.challenge_id, "down")} - style={{ display: this.props.user.admin===true?"block":this.props.identity < 4 && this.props.status === 0 ? "block" : 'none' }} + style={{ display: this.props.user.admin===true?"block":this.props.identity < 4 && ChallengesDataList.shixun_status=== 0 ? "block" : 'none' }} className="fl ring-op-green mr25"> @@ -393,7 +393,7 @@ class Challenges extends Component { item.st === 1 ? Date: Mon, 24 Jun 2019 17:41:36 +0800 Subject: [PATCH 144/964] ConnectProject --- .../courses/busyWork/CommonWorkItem.js | 19 +++++++++++++- .../courses/busyWork/ConnectProject.js | 26 ++++++++++++++++--- .../modules/courses/busyWork/commonWork.js | 23 +++++++++++++++- 3 files changed, 63 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 7f5bea2da..2ac4761e1 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -97,6 +97,13 @@ class CommonWorkItem extends Component{ setupdate = () => { } + toCreateProject = () => { + if (window.location.port == 3007) { + window.location.href = '/testbdweb.educoder.net/projects/new' + } else { + window.location.href = '/projects/new' + } + } render(){ let { mainList,workType }=this.props; const { aModalVisible, fileList, revise_reason } = this.state @@ -195,12 +202,22 @@ class CommonWorkItem extends Component{

  • { // item.work_status && item.work_status.indexOf('关联项目') != -1 && - this.props.openConnectionProject(item)}>关联项目 + + this.props.toCreateProject(item)}>创建项目 + this.props.openConnectionProject(item)}>关联项目 + + } + + { // + item.work_status && item.work_status.indexOf('取消关联') != -1 && + this.props.cancelConnectionProject(item)}>取消关联 } { // item.work_status && item.work_status.indexOf('提交作品') != -1 && this.props.toWorkPostPage(this.props.match.params, item.homework_id)}>提交作品 } + + { // item.work_status && item.work_status.indexOf('补交作品') != -1 && diff --git a/public/react/src/modules/courses/busyWork/ConnectProject.js b/public/react/src/modules/courses/busyWork/ConnectProject.js index 4e359651b..73a4da8f8 100644 --- a/public/react/src/modules/courses/busyWork/ConnectProject.js +++ b/public/react/src/modules/courses/busyWork/ConnectProject.js @@ -44,6 +44,7 @@ class ConnectProject extends Component{ }).then((result)=>{ if(result.data.status==0){ this.closeConnectionProject() + this.props.connectSuccess() this.props.showNotification('关联成功') } }).catch((error)=>{ @@ -122,7 +123,24 @@ class ConnectProject extends Component{ footer={null} destroyOnClose={true} > -
    + +
    { (projects && !!projects.length || this.state.keyword) &&
    @@ -131,7 +149,7 @@ class ConnectProject extends Component{ onSearch={this.onSearchValue} > -
    +
    { projects.map(item => { - return

    {item.name}

    + return

    + 12 ? item.name : ''} className="name">{item.name} +

    })}
    diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index 18c668efe..28199c4c0 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -279,6 +279,26 @@ class commonWork extends Component{ console.log(error) }) } + connectSuccess = () => { + let {page,search,order}=this.state; + this.getList(page,search,order); + } + + cancelConnectionProject = (work) => { + let workId=this.props.match.params.workId; + let courseId=this.props.match.params.coursesId; + + const url = `/homework_commons/${work.homework_id}/student_works/cancel_relate_project.json` + axios.get(url).then((response)=> { + if (response.data.status == 0) { + let {page,search,order}=this.state; + this.getList(page,search,order); + this.props.showNotification('取消关联成功') + } + }).catch((error)=>{ + console.log(error) + }) + } render(){ @@ -341,7 +361,7 @@ class commonWork extends Component{
    */} - + From 16e1a517c65d61477c9fcc8541c783fd04173a1e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 18:23:56 +0800 Subject: [PATCH 145/964] .state --- .../modules/courses/coursesDetail/CoursesBanner.js | 8 ++++++-- .../src/modules/courses/members/studentsList.js | 13 ++++++++----- .../src/modules/courses/members/teacherList.js | 3 ++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 74e79b172..3a1ab9331 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -1,7 +1,7 @@ import React, {Component} from 'react'; import {Link} from "react-router-dom"; import axios from 'axios'; -import {getImageUrl, trigger} from 'educoder'; +import {getImageUrl, trigger, on, off} from 'educoder'; import { Tooltip, message,Popover} from 'antd'; import CoursesListType from '../coursesPublic/CoursesListType'; import Addcourses from '../coursesPublic/Addcourses'; @@ -48,8 +48,12 @@ class CoursesBanner extends Component { componentDidMount() { this.onloadupdatabanner() - + on('updatabanner', this.updatabanner) + } + componentWillUnmount() { + off('updatabanner', this.updatabanner) } + onloadupdatabanner=()=>{ this.updatabanner() diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index ba29dfccb..3cb9bff77 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -79,7 +79,7 @@ const buildColumns = (that) => { return columns; } -// 1-按照学号排序 2-按照分班排序, +// 1-按照学生学号 2-按照分班名称, const ORDER_BY_NUM = 1; const ORDER_BY_GROUP = 2; @@ -317,6 +317,8 @@ class studentsList extends Component{ if (result.data.status == 0) { this.props.showNotification('移动成功') this.fetchAll() + this.props.updataleftNavfun() + } }).catch((error)=>{ console.log(error); @@ -362,6 +364,7 @@ class studentsList extends Component{ this.props.showNotification('删除成功') this.fetchAll() this.setState({checkBoxValues: []}) + trigger('updatabanner') } }).catch((error)=>{ console.log(error); @@ -428,9 +431,9 @@ class studentsList extends Component{ checkBoxValues, checkAllValue }=this.state; - let currentOrderName = '学号排序' + let currentOrderName = '学生学号' if (order == ORDER_BY_GROUP) { - currentOrderName = '分班排序' + currentOrderName = '分班名称' } const { coursesids } = this.props const course_group_id = this.props.match.params.course_group_id @@ -574,8 +577,8 @@ class studentsList extends Component{
  • {currentOrderName}
      -
    • this.onSortTypeChange(ORDER_BY_NUM)} >学号排序
    • -
    • this.onSortTypeChange(ORDER_BY_GROUP)} >分班排序
    • +
    • this.onSortTypeChange(ORDER_BY_NUM)} >学生学号
    • +
    • this.onSortTypeChange(ORDER_BY_GROUP)} >分班名称
  • diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 02fab16a9..c9637f1f8 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -51,7 +51,7 @@ function buildColumns(that) { dataIndex: 'role', key: 'role', }] - that.course_groups && that.course_groups.length && columns.push({ + that.state.course_groups && that.state.course_groups.length && columns.push({ title: 管理权限, width: 230, key: 'course_groups', @@ -462,6 +462,7 @@ class studentsList extends Component{ if (response.data.status == 0) { // {"status":1,"message":"删除成功"} this.props.showNotification('删除成功') + trigger('updatabanner') this.fetchAll() } }) From aac1900a5e32865e5ffae1f6b7578f968701afa7 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, 24 Jun 2019 18:30:52 +0800 Subject: [PATCH 146/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TraineetraininginformationModal.js | 266 +++-- .../shixunHomework/Trainingjobsetting.js | 75 +- .../shixunHomework/Workquestionandanswer.js | 6 +- public/stylesheets/css/common.css | 935 +++++++++--------- 4 files changed, 690 insertions(+), 592 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index 19b353367..5466ffd08 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -36,9 +36,11 @@ class TraineetraininginformationModal extends Component { props: this.props, userids: this.props.userids, game_list:this.props.game_list, + gline:0, + }) // console.log("TraineetraininginformationModal") - // console.log(JSON.stringify(this.props)) + // console.log(this.props) } @@ -47,6 +49,7 @@ class TraineetraininginformationModal extends Component { } componentDidMount() { // this.seacthdata(); + } // 设置数据 // seacthdata = () => { @@ -54,68 +57,116 @@ class TraineetraininginformationModal extends Component { // console.log(datalist) // } render() { - let columns = [ - { - title: '关卡', - dataIndex: 'number', - key: 'number', - width: 150, - align: "center", - render: (text, record) => ( - - {record.number} + const columns = [ + { + title: '关卡', + dataIndex: 'number', + key: 'number', + align: "center", + render: (text, record) => ( + + {record.number} + + ), + }, + { + title: '完成时间', + dataIndex: 'name', + key: 'name', + width: 178, + align: "center", + render: (text, record) => ( + + {record.name==='Invalid date'?"--":record.name} + + ), + }, + { + title: '耗时', + dataIndex: 'stduynumber', + key: 'stduynumber', + align: "center", + render: (text, record) => ( + + {record.stduynumber} + + ), + }, + { + title: '经验值', + key: 'classroom', + dataIndex: 'classroom', + align: "center", + render: (text, record) => ( + + {record.classroom} - ), - }, - { - title: '完成时间', - dataIndex: 'name', - key: 'name', - width: 150, - align: "center", - render: (text, record) => ( - + ), + } + ]; + const columnss = [ + { + title: '关卡', + dataIndex: 'number', + key: 'number', + width: 92, + align: "center", + render: (text, record) => ( + + {record.number} + + ), + }, + { + title: '完成时间', + dataIndex: 'name', + key: 'name', + width: 178, + align: "center", + render: (text, record) => ( + {record.name==='Invalid date'?"--":record.name} - ), - }, - { - title: '', - dataIndex: 'complete_status', - key: 'complete_status', - width: 150, - align: "center", - render: (text, record) => ( - - {record.complete_status===2?:record.complete_status===3?:""} + ), + }, + { + title: '', + dataIndex: 'complete_status', + key: 'complete_status', + width: 100, + align: "center", + render: (text, record) => ( + + {record.complete_status===2?:record.complete_status===3?:""} + - ), - }, - { - title: '耗时', - dataIndex: 'stduynumber', - key: 'stduynumber', - width: 150, - align: "center", - render: (text, record) => ( - + ), + }, + { + title: '耗时', + dataIndex: 'stduynumber', + key: 'stduynumber', + width: 92, + align: "center", + render: (text, record) => ( + {record.stduynumber} - ), - }, - { - title: '经验值', - key: 'classroom', - width: 150, - dataIndex: 'classroom', - align: "center", - render: (text, record) => ( - + ), + }, + { + title: '经验值', + key: 'classroom', + width: 92, + dataIndex: 'classroom', + align: "center", + render: (text, record) => ( + {record.classroom} - ), - } - ]; + ), + } + ]; return (
    @@ -128,62 +179,81 @@ class TraineetraininginformationModal extends Component { onCancel={this.Cancel} >
    -
    - {this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_name} - 经验值: {this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score} +
    +
    + {this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_name} + 经验值: {this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score} +
    {/**/} - - 实训报告 - + {/*这里到时候要做判断*/}
    +
    -
    +
    +
    - -
    -
    -
  • {this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.username} 通关:{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.complete_count}/{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.challenges_count}
  • -
  • 完成效率:{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.efficiency}
  • -
  • 通关时间: {this.props.viewtrainingdata === undefined ? "":moment(this.props.viewtrainingdata.passed_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"--":moment(this.props.viewtrainingdata.passed_time).format('YYYY-MM-DD HH:mm')}
  • +
    -
    -
  • 课堂最高完成效率: {this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.max_efficiency}
  • -
  • 总耗时: {this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.total_spend_time}
  • +
    +
  • {this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.username} 通关:{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.complete_count}/{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.challenges_count}
  • +
  • 完成效率:{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.efficiency}
  • +
  • 通关时间: {this.props.viewtrainingdata === undefined ? "":moment(this.props.viewtrainingdata.passed_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"--":moment(this.props.viewtrainingdata.passed_time).format('YYYY-MM-DD HH:mm')}
  • +
    +
    +
  • 课堂最高完成效率: {this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.max_efficiency}
  • +
  • 总耗时: {this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.total_spend_time}
  • +
    - { - this.props.game_list === undefined?"" : this.props.game_list.length<4? - - :"" - } - -
    - {this.props.game_list === undefined ? "" : + +
    + {this.props.game_list === undefined ? "" :
    } + + : +
    +
    + {this.props.game_list === undefined ? "" :
    } - + loading={false} + pagination={false} + onChange={this.TablePagination} + scroll={{ y: 300 }} + />} + + } + + + diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index a1896da66..88c5fc88a 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -637,12 +637,12 @@ class Trainingjobsetting extends Component { //允许补交 onChanges = (e) => { - console.log("640"); - console.log(this.state.end_time); + // console.log("640"); + // console.log(this.state.end_time); if(e.target.value ==="允许补交"){ if(this.state.end_time !== null && this.state.end_time!== undefined){ // console.log(this.state.end_time); - var times = this.state.end_time.format('YYYY-MM-DD HH:mm'); + var times = this.state.deadline.format('YYYY-MM-DD HH:mm'); this.setState({ late_time:moment(handleDateString(times)).add(1, 'months'), late_times:moment(handleDateString(times)).add(1, 'months').format('YYYY-MM-DD HH:mm'), @@ -983,16 +983,19 @@ class Trainingjobsetting extends Component { if (!startValue || !endValue) { return false; } - return startValue.valueOf() > endValue.valueOf(); + var endValues= moment(endValue).subtract(1, 'days'); + return startValue.valueOf() > endValues.valueOf(); }; + disabledEndDateend = (endValue) => { const startValue = this.state.publish_time; if (!endValue || !startValue) { return false; } - return endValue.valueOf() <= startValue.valueOf(); - }; + var endValuesys= moment(startValue).subtract(1, 'days'); + return endValue.valueOf() <= endValuesys.valueOf(); + }; disabledEndDateendd = (endsValue) => { const endValues = this.state.end_time @@ -1000,7 +1003,9 @@ class Trainingjobsetting extends Component { if (!endsValue|| !endValues) { return false; } - return endsValue.valueOf() <= endValues.valueOf(); + var endValuesyss= moment(endValues).subtract(1, 'days'); + + return endsValue.valueOf() <= endValuesyss.valueOf(); }; @@ -1156,13 +1161,15 @@ class Trainingjobsetting extends Component { deadline:undefined, }) } else { + // console.log(moment(value, "YYYY-MM-DD HH:mm")); + // console.log(moment(this.state.publish_time, "YYYY-MM-DD HH:mm")); if (moment(value, "YYYY-MM-DD HH:mm") <= moment(this.state.publish_time, "YYYY-MM-DD HH:mm")) { this.setState({ unit_e_tip: "截止时间不能早于发布时间", p_flag: true, borredss:"bor-reds", - end_time:undefined, - deadline:undefined, + end_time:value.format('YYYY-MM-DD HH:mm'), + deadline:value.format('YYYY-MM-DD HH:mm'), }) return @@ -1180,8 +1187,8 @@ class Trainingjobsetting extends Component { // this.onChangedata('end_time', value, dateString); if(this.state.allowreplenishment === "允许补交"){ this.setState({ - end_time:moment(handleDateString(dateString)).add(1, 'months'), - deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'), + end_time:moment(handleDateString(dateString)), + deadline:moment(handleDateString(dateString)).format('YYYY-MM-DD HH:mm'), late_time:moment(handleDateString(dateString)).add(2, 'months'), late_times:moment(handleDateString(dateString)).add(2, 'months').format('YYYY-MM-DD HH:mm'), }) @@ -1199,7 +1206,7 @@ class Trainingjobsetting extends Component { }) return; } - let{publish_time,unifiedsetting,rulesdata}=this.state; + let{publish_time,end_time,unifiedsetting,rulesdata}=this.state; if(unifiedsetting===true){ if (moment(value, "YYYY-MM-DD HH:mm") <= moment(publish_time)) { @@ -1207,20 +1214,30 @@ class Trainingjobsetting extends Component { hand__e_tip: "补交时间不能早于发布时间", hand_flags: true, handclass:"bor-reds", - late_times:undefined, - late_time:undefined, + late_times:value.format('YYYY-MM-DD HH:mm'), + late_time:value.format('YYYY-MM-DD HH:mm'), }) - } else { + } + else if (moment(value, "YYYY-MM-DD HH:mm") <= moment(end_time)) { + this.setState({ + hand__e_tip: "补交时间不能早于截止时间", + hand_flags: true, + handclass:"bor-reds", + late_times: value.format('YYYY-MM-DD HH:mm'), + late_time:value.format('YYYY-MM-DD HH:mm'), + }) + } + else { try { this.setState({ late_times: value.format('YYYY-MM-DD HH:mm'), + late_time:value.format('YYYY-MM-DD HH:mm'), hand__e_tip: "", hand_flags: false, handclass:"", }) - this.onChangedata('late_time', value, dateString); }catch (e) { } @@ -1241,11 +1258,11 @@ class Trainingjobsetting extends Component { }else{ this.setState({ late_times: value.format('YYYY-MM-DD HH:mm'), + late_time:value.format('YYYY-MM-DD HH:mm'), hand__e_tip: "", hand_flags: false, handclass:undefined, }) - this.onChangedata('late_time', value, dateString); } } @@ -1622,6 +1639,19 @@ class Trainingjobsetting extends Component { {this.props.isAdmin()?this.state.code_review===false?"": 代码查重 : ""} + 设置 @@ -1646,7 +1676,7 @@ class Trainingjobsetting extends Component {
    -
    +
    分值
    {/*公开设置*/} -
    +
    公开设置
    @@ -1914,7 +1942,6 @@ class Trainingjobsetting extends Component {
    -
    diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index a7c7fbad7..7ebbeb473 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -427,7 +427,7 @@ class Workquestionandanswer extends Component {
    - {jobsettingsdata === undefined|| jobsettingsdata.data.description===null? "" :
    + {jobsettingsdata === undefined|| jobsettingsdata.data.description===null? "无" :
    @@ -466,8 +466,8 @@ class Workquestionandanswer extends Component {
    - {jobsettingsdata === undefined ? "" : jobsettingsdata === null ? "" : jobsettingsdata === "null" ? "" : - jobsettingsdata.data.explanation=== undefined?"" :jobsettingsdata.data.explanation=== null?"": + {jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" : + jobsettingsdata.data.explanation=== undefined?"无" :jobsettingsdata.data.explanation=== null?"无":
    }
    diff --git a/public/stylesheets/css/common.css b/public/stylesheets/css/common.css index 3e8559230..d4e40bd12 100644 --- a/public/stylesheets/css/common.css +++ b/public/stylesheets/css/common.css @@ -1,467 +1,468 @@ -@charset "utf-8"; -/* CSS Document */ -/*html,body{ font-size:14px; line-height:2.0; height:100%;} -.newContainer{ min-height:100%; height: auto !important; height: 100%; *//*IE6不识别min-height*//*position: relative;} -.newMain{ margin: 0 auto; padding-bottom: 155px; } -.newFooter{ position: absolute; bottom: 0; width: 100%; height: 155px;background: #323232; clear:both; min-width: 1200px} -.newHeader{background: #46484c;width:100%; height: 50px; min-width: 1200px}*/ -/* 2015-06-26 */ -body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} -div,img,tr,td,table{ border:0;} -table,tr,td{border:0;} -ol,ul,li{ list-style-type:none} -blockquote { border:1px solid #d4d4d4; padding-left: 0.6em; padding-top: 0.6em; padding-right: 0.6em; padding-bottom: 0.6em; margin-left: 1.4em; margin-right: 0.4em; border-radius: 4px; font-family: "微软雅黑"; background:#e8e8e8; background-size: 100% 100%; margin-top:5px;} -a:hover {text-decoration: none; } -select,input,textarea{border:1px solid #ddd; background:#fff; color:#000; padding-left:5px} -textarea {resize: none;} -.pInline {margin:0px; padding:0px; display:inline-block;} -div.minHeight48{min-height: 48px;} - -/*常用*/ -#users_setting{clear:both;width:728px;background: #fff;padding: 10px;/*滑动门的宽度*/} -/*上传图片处理*/ -.upload_img img{max-width: 100%;} -.homepagePostIntro img{display: block} -blockquote img{max-width: 100%;} - -.none{display: none;} -.rside_back{ width:670px; margin-left:10px; background:#fff; margin-bottom:10px;} -.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; background:#dbdbdb;} -.sub_btn:hover{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;} -table{ background:#fff;} -.more{ font-weight:normal; color:#999; font-size:12px;} -.no_line{ border-bottom:none;} -.line{border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;} -.no_border{ border:none;} -.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(/images/public_icon.png) 135px -193px no-repeat; cursor:pointer;} -a.btn_message_free{ background:#ff5722; display:block; text-align:center; color:#fff; padding:3px 0; width:80px; margin-bottom:10px;} -.db {display:block;} -/*pre标签换行*/ -.break_word{word-break: break-all;word-wrap: break-word;} -.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;} -/*显隐*/ -.undis {display:none;} -.dis {display:inline-block;} -/* font & color */ -h2{ font-size:18px;} /*color:#3b94d6;*/ -h4{ font-size:14px;}/*color:#3b3b3b;*/ -.f8 {font-size:8px;} -.f10 {font-size:10px;} -.f12{font-size:12px;} -.f_12{ font-size:12px;} -.f14{font-size:14px;} -.f_14{ font-size:14px;} -.f16{font-size:16px;} -.f18{font-size:18px;} -.f20{font-size:20px;} -.fb{font-weight:bold;} -.f_b{ font-weight: bold;} -.lh20{line-height:20px;} -.lh22{line-height:22px;} -.lh24{line-height:24px;} -.lh26{line-height:26px;} -.lh27{line-height:27px;} -.fmYh{font-family:"微软雅黑";} -.font999{ color:#999;} -.fontRed{color:#770000;} -.text_c{ text-align:center;} -.text_l{ text-align:left;} -/* Float & Clear */ -.clear{ zoom:1;} -.clear:after {clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} -.cl{ clear:both; overflow:hidden; } -.fl{float:left;} -.fr{float:right;} -.f_l{ float:left;} -.f_r{ float:right;} -.float-none {float:none !important;} -.tac {text-align:center;} -.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} -.clearfix{clear:both;zoom:1} -.hidden{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} -.hide-text {overflow:hidden; white-space:nowrap;} -.flow_hidden{ width:300px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} -.white_space{white-space:nowrap;} -.pr {position:relative;} -.markPopup {width:290px; height:auto; padding:5px 0px 15px 15px; background-color:#ffffff; z-index:1000;} -.markInput { outline:none; border:1px solid #e6e6e6; height:30px; width:50px; color:#3d3c3c; margin-bottom:10px; text-align:center; margin-right:5px; padding-left:0;} -.markPercentage {margin:10px 0; border:1px solid #e6e6e6; width:70px; height:30px; outline:none; font-size:12px; color:#3d3c3c;} -/* Spacing */ -.ml2{ margin-left:2px;}.ml3{ margin-left:3px;}.ml4{ margin-left:4px;}.ml5{ margin-left:5px;}.ml7 {margin-left:7px;}.ml8{ margin-left:8px;}.ml9{ margin-left:9px;} -.ml10{ margin-left:10px;}.ml14{ margin-left:14px;}.ml15{ margin-left:15px;}.ml16{ margin-left:16px;}.ml20{ margin-left:20px;}.ml21{ margin-left:21px;} -.ml24{margin-left:24px;}.ml25{margin-left:25px;}.ml30{margin-left:30px !important;}.ml35{margin-left: 35px;}.ml36{ margin-left:36px; }.ml38{ margin-left:38px;} -.ml39{ margin-left:39px;}.ml40{ margin-left:40px;}.ml41{ margin-left:41px;}.ml42{ margin-left:42px;}.ml45{ margin-left:45px;}.ml48{ margin-left:48px;}.ml50{ margin-left: 50px;} -.ml53{margin-left:53px;}.ml55{ margin-left:55px;}.ml56{ margin-left:56px !important;}.ml58{margin-left:58px;}.ml60{ margin-left:60px;}.ml65{ margin-left:65px;}.ml63{ margin-left:63px;} -.ml70{margin-left: 70px;}.ml78{ margin-left:78px;}.ml80{ margin-left:80px;}.ml85{margin-left:85px;}.ml90{ margin-left:90px;}.ml95{margin-left:95px;}.ml100{ margin-left:100px;} -.ml110{ margin-left:110px;}.ml125 { margin-left:125px;}.ml130 { margin-left:130px;}.ml140 { margin-left:140px;}.ml150 { margin-left:150px;} -.ml160 {margin-left:160px;}.ml250 {margin-left:250px;}.ml258{ margin-left:258px;}.ml320{ margin-left:320px;}.ml358{ margin-left:358px;}.mr-5 {margin-right:-5px;} -.mr2{ margin-right:2px;}.mr3{ margin-right:3px;}.mr5{ margin-right:5px;}.mr8{ margin-right:8px;}.mr10{ margin-right:10px;}.mr12{ margin-right:12px;}.mr15 {margin-right:15px;} -.mr16 {margin-right:16px;}.mr18 {margin-right:18px;}.mr20{ margin-right:20px;}.mr25 {margin-right:25px;}.mr27 {margin-right:27px !important;}.mr30{ margin-right:30px !important;} -.mr35{ margin-right:35px;}.mr40{ margin-right:40px !important;}.mr45{margin-right: 45px;}.mr50{margin-right: 50px;}.mr55{margin-right: 55px;}.mr60 {margin-right:60px;} -.mr65 {margin-right:65px;}.mr70{margin-right: 70px;}.mr75{margin-right: 75px;}.mr80{margin-right: 80px;}.mr85{margin-right: 85px;}.mr90 {margin-right:90px !important;}.mr95 {margin-right:95px !important;} -.mr100 {margin-right:100px !important;}.mr118 {margin-right:118px !important;}.mr130 {margin-right:130px;}.mr135 {margin-right:135px;}.mr150 {margin-right:150px;}.mr200{margin-right:200px;}.mr390{margin-right:390px;}.mr400{margin-right:400px;} -.mw15{margin:0 15px;}.mr90 {margin-right:90px;}.mr95{margin-right: 95px;}.mr140 {margin-right: 140px;}.mw20{ margin: 0 20px;} -.mw380 {max-width: 380px !important;}.mw400 {max-width: 400px !important;}.mw450 {max-width: 450px !important;}.mw550 {max-width: 550px !important;} -.mt-20 {margin-top:-20px;}.mt-10 {margin-top:-10px;}.mt-4 {margin-top:-4px;}.mt-5 {margin-top:-5px;}.mt-2 {margin-top:-2px;}.mt0 {margin-top: 0px !important;} -.mt1{margin-top: 1px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px;}.mt6{ margin-top:6px;}.mt7 {margin-top:7px;} -.mt8{ margin-top:8px !important;}.mt9{ margin-top:9px !important;}.mt10{ margin-top:10px !important;}.mt12 { margin-top:12px !important;}.mt14 {margin-top:14px;} -.mt15 {margin-top:15px;}.mt16{ margin-top:16px !important;}.mt19 {margin-top:19px !important;}.mt20{margin-top: 20px;}.mt28 {margin-top:28px;}.mt30{ margin-top: 30px;} -.mt35 {margin-top:35px;}.mt40{ margin-top: 40px;}.mt45{ margin-top: 45px;}.mt50{ margin-top:50px;}.mt100{ margin-top:100px;}.mb0 {margin-bottom: 0px !important;}.mb4{ margin-bottom:4px;} -.mb5{ margin-bottom:5px;}.mb8 {margin-bottom:8px !important;}.pb5{ padding-bottom: 5px;}.mb10{ margin-bottom:10px !important;}.mb12 {margin-bottom:12px !important;} -.mb15{margin-bottom: 15px;}.mb20{ margin-bottom:20px;}.mb25{ margin-bottom:25px;}.mb30 {margin-bottom:30px;}.mb40 {margin-bottom:40px;}.pl5{ padding-left:5px;} -.pl10 {padding-left:10px;}.pr5 {padding-right:5px;}.pr10{padding-right: 10px;}.pl62 {padding-left: 62px;}.pl15{ padding-left:15px;}.pt5{ padding-top:5px;} -.pt10{ padding-top:10px;}.pb5{ padding-bottom: 5px;}.w20{ width:20px;}.w40{width: 40px;}.w45{ width: 45px;}.w46{ width: 46px;}.w48{width:48px;}.w50 {width:50px;} -.w56 {width:56px;}.w60{ width:60px;}.w61{ width:61px;}.w65{ width:65px;}.w70{ width:70px;}.w80{ width:80px;}.w90{ width:90px;}.w100 {width: 100px;}.w110{width:110px !important;} -.w108 {width:108px;}.w125{width:125px;}.w128{ width:128px;}.w130{ width:130px;}.w140{ width:140px;}.w145{ width:145px;}.w150{ width:150px;} -.w160{width:160px !important;}.w170{width:170px;}.w180{width:180px;}.w186{ width:186px;}.w190{width: 190px;}.w196{ width:196px;}.w200{width: 200px;}.w210{ width:210px;} -.w230{width:230px !important;}.w235{ width:235px !important;}.w265{ width: 265px;}.w270{ width: 270px;}.w280{ width:280px;}.w289{ width:289px !important;}.w290{ width:290px !important;} -.w300{ width:300px !important;}.w305{ width:305px;}.w330 {width:330px;}.w350 {width:350px;}.w360 {width:360px;}.w362 {width:362px;}.h400{height:400px !important;}.w430{ width:430px;} -.W440{ width:440px;}.w450 {width:450px;}.w455{width:455px !important;}.w459{ width:459px;}.w460{ width:460px;}.w465{width:465px !important;} -.w490{width:490px;}.w536{ width:536px;}.w543{ width:543px;}.w547{ width:547px;}.w557{ width:557px;}.w570 {width:570px !important;}.w576{ width:576px;}.w590{ width:590px !important;} -.w607 {width:607px;}.w664{ width:664px;}.w683{ width:683px;}.w610{ width:610px;}.w600{ width:600px !important;}.w603{ width:603px !important;} -.w606{ width:606px; }.w620{ width:620px;}.w680{ width: 680px;}.w701{width: 701px;}.w705{ width:705px;}.w708{width: 708px;}.w709{width: 709px;} -.w712{width:712px; max-width:712px; min-width:712px;}.w713{width: 713px;}.w720{width:721px;}.w730{width:730px;}.w770{ width:770px;}.h15{ height: 15px; } -.h28{height: 28px;}.h20{height: 20px;}.h22{ height:22px;}.h26{ height:26px;}.h50{ height:50px;}.h70{ height:70px;}.h200{ height:200px;} -.h400{height: 400px !important;}.h150{ height:150px;}.H60 {height:60px !important;}.H150{ height:150px;}.p10 {padding-left:10px; padding-right:10px;} -.mw150 {max-width: 150px !important;}.mw220 {max-width: 220px !important;}.mw280 {max-width:280px !important;}.mw360 {max-width: 360px !important;} -.mw380 {max-width: 380px !important;}.mw400 {max-width: 400px !important;}.mh18 {max-height: 18px;}.max_h54 {max-height:54px; }.maxHeight100 {max-height:100px; overflow-x:hidden; overflow-y:auto;} -.maxHeight200 {max-height:200px; overflow-x:hidden; overflow-y:auto;} -.W50{ width:50px;}.W120{ width:110px;}.W130{ width:130px;}.W200{ width:200px;}.W300 {width:300px !important;}.W320{ width:320px;}.W420 {width:420px;}.W440{ width:440px;} -.W700{ width:700px; max-width:700px; min-width:700px;}.W710{ width:708px;}.W800{ width:800px !important;} -.maxwidth400{max-width: 400px;}.m_w460{max-width: 460px;}.m_w500{max-width: 500px;}.m_w505{max-width: 505px;}.m_w530{max-width:860px;}a.edu-txt-850{ display: block; max-width:700px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} -a.edu-txt-800{ display: block; max-width:800px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}.m_w600{max-width: 600px;}.td_w70{ width:70px;}.td_w60{ width:60px;}.td_w110{ width:110px;}.width165{width: 165px;}.width180{width: 180px !important;} -.width285{width: 285px;}.width255{width: 255px;}.width385{width: 385px;}.width505{width: 505px;}.width525{width: 525px;}.width530{width: 530px;} -.lh23{line-height: 23px;} -/*该高度会写入配置文件*/ -.maxh360 {max-height: 810px;} -.maxh300 { max-height: 300px; } -.lh18 { line-height: 18px;} -/* Font & background Color */ -a.b_grey{ background: #F5F5F5;} -a.b_dgrey{ background: #CCC;} -a.c_orange{color:#ff5722;} -a:hover.c_orange{color: #d33503;} -a.c_lorange{color:#ff9900;} -a:hover.c_lorange{color:#fff;} -a.c_blue{ color:#3b94d6;} -a.c_eblue{color: #3784D3} -a.c_setting_blue{color: #0781B4} -a.c_dblue{ color:#09658c;} -a:hover.c_dblue{ color:#2788d0;} -a.c_white{ color:#fff;} -input.c_white { color:#fff} -a.c_dorange{ color:#fd6e2a;} -a.c_dark{color: #3e4040;} -a:hover.c_dark{color: #3ca5c6;} -a.b_blue{background: #3b94d6;} -a:hover.b_blue{background: #41a8c8;} -a.b_green{background:#28be6c;} -a:hover.b_green{background:#14ad5a;} -a.c_blue02{color: #3ca5c6;} -a:hover.c_blue02{color: #0781b4;} -a.c_red{ color:#F00;} -a:hover.c_red{ color: #C00;} -a.c_purple{color: #426e9a;} -a:hover.c_purple{color: #d33503;} -a.c_green{ color:#28be6c;} -a.c_lgrey{ color:#CCC;} -a:hover.c_lgrey{ color:#3ca5c6;} -a.c_grey{ color:#999999;} -a:hover.c_grey{ color:#333;} -.b_grey{ background: #F5F5F5;} -.b_dgrey{ background: #CCC;} -.c_orange{color:#e8770d;} -.c_dark{ color:#2d2d2d;} -.c_lorange{ color:#ff9900;} -.c_purple{color: #6883b6;} -.c_blue{ color:#3b94d6;} -.c_red{ color:#F00;} -.c_green{ color:#28be6c;} -.c_grey{color:#999;} -.c_grey02{ color:#666666;} -.c_grey03{ color:#bbbaba;} -.c_dgrey{ color:#696969;} -.c_dblue{ color:#09658c;} -.c_white {color:#fff;} -.b_blue{background:#3b94d6;} -.b_green{background:#28be6c;} -.b_w{ background:#fff !important;} -.b_slow_yellow{background:#adde18;} -.b_yellow{background:#DDDF0D;} -.b_slow_red{background:#df8538;} -.b_green2 {background:#63c360;} -.b_red {background:#d60308;} -.b_lblue{ background:#3b94d6;} - -/*font&color add by Tim*/ -.fontGrey {color:#cecece;} -.fontGrey2 {color:#888888;} -.fontGrey3 {color:#484848;} -.fontGrey4{color:#999999;} -.fontGrey5 {color:#ddd;} -.fontGrey6 {color:#7a7a7a;} -.fontGrey7 {color:#555;} -.fontBlue {color:#3498db;} -span.newsBlack {color:#4b4b4b; font-size:13px; font-weight:bold} -a.underline {text-decoration:underline;} -a.fontBlue {color:#2788d0;} -.fontBlue2 {color:#3b94d6 !important;} -a.fontGrey {color:#cecece;} -a.fontGrey2 {color:#888888;} -a.fontGrey3 {color:#555;} -a.link-black {color:#000;} -a.link-black:hover {color:#3b94d6;} -a.link-blue {color:#3b94d6;} -a.linkOrange {color:#ff7143;} -/*a.linkBlue {color:#3b94d6;}*/ -a.linkBlue:hover {color:#FF7500;} -a.linkBlue2 {color:#3498db;} -a.linkBlue2:hover {color:#2788d0;} -a.buttonBlue {background-color:#3b94d6;} -a.buttonBlue:hover {background-color:#2788d0;} -a.linkGrey {color:#484848;} -a.linkGrey:hover {color:#3b94d6;} -a.linkGrey2 {color:#888888;} -a.linkGrey2:hover {color:#484848;} -a.linkGrey3 {color:#484848;} -a.linkGrey3:hover {color:#000000;} -a.linkGrey4 {color:#484848;} -a.linkGrey4:hover {color:#2788d0;} -a.linkGrey5 {color:#484848;} -a.linkGrey5:hover {color:#3498db !important;} -a.linkGrey6 {color:#484848 !important;} -a.linkGrey6:hover {color:#ffffff !important;} -a.linkGrey7 {color:#888888;} -a.linkGrey7:hover {color:#3b94d6;} -a.bBlue {background-color:#3498db;} -a.bBlue:hover {background-color:#2788d0;} -a.bGreen {background-color:#60b25e;} -a.bGreen:hover {background-color:#51a74f;} -a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;} -a.submit_btn:hover {background-color:#3498db; color:#ffffff;} -a.link_file_a{ background:url(/images/pic_file.png) 0 0px no-repeat; padding-left:20px; } -a:hover.link_file_a{ background:url(/images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;} -a.link_file_a2{ background:url(/images/pic_file.png) 0 -15px no-repeat; padding-left: 20px;} -a.submit_btn2 {background-color: #3b94d6; padding: 3px 5px; color: #ffffff;} -a.submit_btn2:hover {background-color: #2788d0;} -/****翻页***/ -.wlist{float:right;} -.wlist li{float:left;} -.wlist a{ float:left; border:1px solid #64bdd9; padding:0 5px; margin-right:5px; color:#888;} -.wlist a:hover{border:1px solid #3b94d6; background-color:#3b94d6; color:#fff; text-decoration:none;} -.wlist_select a { background-color:#3b94d6; color:#fff;} -/*add by Tim*/ -input.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;} -input.submit_btn:hover {background-color:#3498db; color:#ffffff;} -a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} - -/* commonBtn */ -.grey_btn{background:#d9d9d9; color:#656565; font-weight:normal; text-align:center;padding:2px 10px;} -a.grey_btn{background:#d9d9d9; color:#656565; font-weight:normal; text-align:center;padding:2px 10px; display: inline-block; border-radius: 3px;} -a:hover.grey_btn{background:#717171; color:#fff;} -a.big_grey_btn{background:#e1e1e1; color:#333; font-weight:normal; padding:0px 15px; text-align:center; font-size: 12px; height: 30px; line-height: 30px;} -a:hover.big_grey_btn{background:#c3c3c3;} -.grey_n_btn{background:#d9d9d9; color:#656565; font-weight:normal;padding:2px 10px; text-align:center;} -a.grey_n_btn{background:#d9d9d9; color:#656565;font-weight:normal; padding:2px 10px; text-align:center;} -a:hover.grey_n_btn{ background:#717171; color:#fff;} -.green_btn{background:#28be6c; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;} -a.green_btn{background:#28be6c;color:#fff; font-weight:normal; padding:2px 10px; text-align:center;} -a:hover.green_btn{ background:#14ad5a;} -a.blue_btn{background:#3b94d6; color:#fff; font-weight:normal; padding:2px 10px; text-align:center; display:inline-block;border-radius:3px;} -a:hover.blue_btn{background:#2788d0;} -a.big_blue_btn{background:#3b94d6; color:#fff; font-weight:normal;padding:0px 15px; text-align:center; font-size: 12px; height: 30px; line-height: 30px;} -a:hover.big_blue_btn{background:#2788d0;} -.red_btn{ background:red; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;} -a.red_btn{background:red; color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;} -a.orange_btn_homework{background:#d63502;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;} -a.orange_btn{ background:#ff5722;color:#fff; font-weight:normal; padding:2px 10px; text-align:center; } -a:hover.orange_btn{ background:#d63502;} -.green_u_btn{border:1px solid #3cb761; padding:2px 10px; color:#3cb761;} -a.green_u_btn{border:1px solid #3cb761; padding:2px 10px; color:#3cb761;} -a:hover.green_u_btn{ background:#3cb761; color:#fff;} -.orange_u_btn{border:1px solid #ff5d31; padding:2px 10px; color:#ff5d31;} -a.orange_u_btn{border:1px solid #ff5d31; padding:2px 10px; color:#ff5d31;} -a:hover.orange_u_btn{background:#ff5d31; color:#fff;} -.bgreen_u_btn{border:1px solid #1abc9c; padding:2px 10px; color:#1abc9c;} -a.bgreen_u_btn{border:1px solid #1abc9c; padding:2px 10px; color:#1abc9c;} -a:hover.bgreen_u_btn{background:#1abc9c; color:#fff;} -.blue_u_btn{border:1px solid #3b94d6; padding:2px 10px; color:#3b94d6;} -a.blue_u_btn{border:1px solid #3b94d6; padding:2px 10px; color:#3b94d6;} -a:hover.blue_u_btn{background:#3b94d6; color:#fff;} -.blue_n_btn{ background:#3b94d6; color:#fff!important; font-weight:normal;padding:2px 10px; text-align:center;} -a.blue_n_btn{background:#3b94d6;color:#fff!important;font-weight:normal; padding:2px 10px; text-align:center;} -a:hover.blue_n_btn{ background:#329cbd;} -.green_n_btn{background:#3cb761; padding:2px 10px; color:#fff;} -a.green_n_btn{background:#3cb761; padding:2px 10px; color:#fff;} -a:hover.green_n_btn{ background:#14ad5a;} -.orange_n_btn{background:#ff5d31; padding:2px 10px; color:#fff;} -a.orange_n_btn{background:#ff5d31; padding:2px 10px; color:#fff;} -a:hover.orange_n_btn{background:#d63502;} -.bgreen_n_btn{background:#1abc9c; padding:2px 10px; color:#fff;} -a.bgreen_n_btn{background:#1abc9c; padding:2px 10px; color:#fff;} -a:hover.bgreen_n_btn{background:#08a384;} - -.nolink_btn{ background:#BCBCBC; color: #fff; padding:2px 5px;} -.more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;} -.upbtn{ margin:40px 0 0 15px; display:block; padding:2px 5px; border:1px solid #eaeaea;} -.upbtn:hover{color:#3b94d6;cursor: pointer;} -.upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer} -.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;} -.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;} -.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;} -.grey_btn_cir{ background:#b2b2b2; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;} -.red_homework_btn_cir{ background:#e74c3c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;} -.grey_homework_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;} -.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;} -.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;} -.sticky_btn_cir{ background:#3b94d6; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;} -.locked_btn_cir{background: url(/images/locked.png) 0 0 no-repeat; cursor: default;} -.bgreen_btn_cir{ background:#1abc9c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;} -.grey_border{border:1px solid #dddddd !important;} -.red-cir-btn{ background:#e74c3c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} -.green-cir-btn{ background:#28be6c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} -.button-rep { color: #888;display: inline-block;background: #eee;padding: 2px 5px;} -.green_btn_share{ background:#28be6c; padding:2px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} -.borderRadius {border-radius:5px;} -a.Blue-btn{ display:block; margin-right:15px;width:65px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} -a:hover.Blue-btn{ background:#3598db; color:#fff;} -a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#fff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} -a:hover.BlueCirBtn{ background:#3598db; color:#fff;} -a.BlueCirBtnMini{ display:block;width:40px; height:24px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} -a:hover.BlueCirBtnMini{ background:#3598db; color:#fff;} -a.BlueCirBtnMiddle{ display:block;width:50px; height:24px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} -a:hover.BlueCirBtnMiddle{ background:#3598db; color:#fff;} -/* 按钮*/ -a.btn_grey_big{ display: inline-block; border: 1px solid #ccc;color: #747474;text-align: center;font-size: 14px; padding:0 10px; height: 30px; line-height: 30px;border-radius:3px;} -a:hover.btn_grey_big{ background: #c3c3c3; color: #fff;} -a.btn_orange_big{ display:inline-block; border: 1px solid #ee4a1f;color: #ee4a1f; text-align: center; font-size: 14px; padding:0 10px; height: 30px; line-height: 30px; border-radius:3px;} -a:hover.btn_orange_big{ background: #ee4a1f;color: #fff;} -a.btn_green_big{ display:inline-block; border: 1px solid #60b25e; color: #60b25e; text-align: center;font-size: 14px; padding:0 10px; height: 30px; line-height: 30px; border-radius:3px;} -a:hover.btn_green_big{ background: #60b25e; color: #fff;} -a.sy_btn_grey{ display:inline-block; color: #333; background: #e1e1e1; text-align: center; font-size: 12px; padding:0 15px; height: 30px; line-height: 30px; border-radius:3px;} -a:hover.sy_btn_grey{ background: #c3c3c3;} -a.sy_btn_blue{ display:inline-block; color: #fff; background: #3b94d6; text-align: center; font-size: 12px; padding:0 15px; height: 30px; line-height: 30px;border-radius:3px;} -a:hover.sy_btn_blue{ background: #2788d0;} -input.sy_btn_blue{ display: inline-block; color: #fff; background: #3b94d6; text-align: center; font-size: 12px; padding:0 15px; height: 30px; line-height: 30px; border-radius:3px; cursor:pointer;} -a.sy_btn_blue_mini{ display:inline-block;color: #fff; background: #3b94d6; text-align: center; font-size: 12px; padding:0 10px; height: 26px; line-height: 26px;border-radius:3px;} -a:hover.sy_btn_blue_mini{ background: #2788d0;} -a.sy_btn_grey_mini{display:inline-block; color: #333; background: #e1e1e1; text-align: center;font-size: 12px; padding:0 10px; height: 26px; line-height: 26px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px;} -a:hover.sy_btn_grey_mini{ background: #c3c3c3;} -a.btn_grey_mid{ display:inline-block; color: #565656; background: #eaeaea; text-align: center; font-size: 12px; padding:0 10px; height: 26px; line-height: 26px; border-radius:3px;} -a:hover.btn_grey_mid{ background: #c8c8c8;} -a.sy_btn_green{ display:inline-block; color: #fff; background: #60b25e;text-align: center; font-size: 12px; padding:0 15px; height: 30px;line-height: 30px; border-radius:3px;} -a:hover.sy_btn_green{ background: #51a74f;} -a.hw_btn_blue{display: inline-block; color: #3b94d6; border:1px solid #3b94d6; background:#fff; text-align: center; font-size: 12px; padding:0 15px;height: 30px; line-height: 30px;border-radius:3px;} -a:hover.hw_btn_blue,a:active.hw_btn_blue{ background: #3b94d6; color:#fff;} -/* commonpic */ -.pic_date{ display:block; background:url(/images/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; } -.pic_add{ display:block; background:url(/images/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; } -.pic_sch{ display:block; background:url(/images/public_icon.png) -31px -195px no-repeat; width:16px; height:15px; } -.pic_mes{ display:block; background:url(/images/public_icon.png) 0px -376px no-repeat; width:20px; height:15px; padding-left:18px;} -.pic_img{ display:block; background:url(/images/public_icon.png) -31px -419px no-repeat; width:20px; height:15px; } -.pic_del{ display:block; background:url(/images/public_icon.png) 0px -235px no-repeat; width:20px; height:15px; } -.pic_del:hover{ background:url(/images/public_icon.png) -32px -235px no-repeat; } -.pic_stats{display:block; background:url(/images/public_icon.png) 0px -548px no-repeat; width:20px; height:15px;} -.pic_files{display:block; background:url(/images/public_icon.png) 0px -578px no-repeat; width:20px; height:15px;} -.pic_text{display:block; background:url(/images/public_icon.png) 0px -609px no-repeat; width:20px; height:18px;} -.pic_text02{display:block; background:url(/images/public_icon.png) 0px -642px no-repeat; width:20px; height:19px;} -.pic_edit{display:block; background:url(/images/public_icon.png) 0px -32px no-repeat; width:20px; height:15px;} -.pic_edit:hover{display:block; background:url(/images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;} -.pic_edit2{display:inline-block; background:url(/images/public_icon.png) 0px -32px no-repeat; width:20px; height:15px; vertical-align:middle; display:none;} -.pic_edit2:hover{display:inline-block; background:url(/images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;} -/*文本左对齐*/ -.tl{text-align: left;} -.embed img,embed{max-width: 100%;} -.attachments {clear: both;} -.is_public_checkbox{margin-left: 15px;margin-right: 10px;} -.author_name{color: #3ca5c6 !important;} -.ke-container-default{max-width: 100%;} -/*状态提示图标*/ -.success-icon {background:url("/images/icons_ziliao.png") 0 -28px no-repeat; padding-left:25px;} -.error-icon {background:url("/images/icons_ziliao.png") 0 -56px no-repeat; padding-left:25px;} -/*禁用*/ -.disabled {background-color:#f5f5f5;} -#popupWrap ul{cursor: default;} -.bg_checked{background-color: #3b94d6;} -/* 搜索 */ -.hw_search_box{ position:relative; } -.hw_search_box input.hw_search-input{ width:293px; height:28px; border:none; border:1px solid #e7e7e7; background:#fff; padding-left:5px;} -.hw_search_box a.hw_btn_search{display:block; width:20px; height:20px; background:url(/images/hw/icons_hw.png) 0 -57px no-repeat; position:absolute; right:5px; top:5px; cursor:pointer;float:left; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;} -.hw_search_box a:hover.hw_btn_search{background:url(/images/hw/icons_hw.png) -40px -57px no-repeat; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;} -.hw_files_icon{display:block; width:17px; height:14px; background:url(/images/hw/icons_hw.png) 0 -135px no-repeat;} -/* 编辑删除 */ -.sy_icons_edit{ display: inline-block; padding:9px;background:url(../../images/sy/sy_icons02.png) 0 1px no-repeat;} -.sy_icons_del{ padding:9px;background:url(../../images/sy/sy_icons02.png) 0 -21px no-repeat;} -.sy_icons_edit:hover{ background:url(../../images/sy/sy_icons02.png) -20px 1px no-repeat; } -.sy_icons_del:hover{ background:url(../../images/sy/sy_icons02.png) -20px -21px no-repeat;} -/* 翻页 */ -.pages a{ display:block; border:1px solid #d1d1d1; color:#888; float:left; width:30px;text-align:center; padding:3px 0; line-height:1.9; margin-right:5px;} -.pages a:hover{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;} -a.pages-big{width:50px;} -.pages .active{ background-color:#3b94d6; border:1px solid #3b94d6;color:#fff;} -.pages{ width:330px; margin:20px auto 10px;} -.pages li {display:inline-block;} - -.sy_corange{ color: #ee4a1f;} -.sy_new_orange{font-size: 12px;padding: 0 5px;border-radius: 3px;line-height: 14px;color: #ff4a1b;border: 1px solid #ff4a1b;} -.sy_cgrey{ color: #888;} -a.sy_cgrey{ color: #888;} -.sy_corange{ color: #ee4a1f;} -a.sy_corange{ color: #ee4a1f;} -a.sy_cblue{ color: #3b94d6;} -/* 新增粉色关注按钮*/ -a.y_btn_pink{ display: inline-block; color: #fff; background: #ff7d7d;text-align: center; font-size: 12px; padding:0 15px; height: 30px; line-height: 30px; border-radius:3px;} -a:hover.sy_btn_pink{ background: #e64c4c;} -.ke-block pre{ font-size:9pt; font-family:Courier New,Arial; border:1px solid #ddd; border-left:5px solid #6ce26c; background:#f6f6f6; padding:5px;} -.ke-block ol li{list-style-type: decimal;margin-left: 40px;} -.ke-block ul li{list-style-type: disc;margin-left: 40px;} -.ke-block{font-size: 14px;} -.ke-block h1{font-size: 2em;} -.ke-block h2{font-size: 1.5em;} -.ke-block h3{font-size: 1.17em;} -a.export_icon{background: url(/images/item.png) -58px -30px no-repeat; width: 45px; float: left; line-height: 41px; font-size: 14px; margin-top: -5px;} -a.export_icon:hover {background: url(/images/item.png) -58px -60px no-repeat;} -.export_icon_li:hover ul {display:block;} -.break_full_word { word-break: normal !important;word-wrap: break-word !important; } -.icons-user-homework{background:url(/images/user/home-user-left.png) 0px -150px no-repeat; } -.homework-user-leftnav-li{ height: 25px; line-height: 40px; padding-left: 25px; color: #666;background:url(/images/user/home-user-left.png) 0px -149px no-repeat; font-size: 14px; position: relative; } -.homework-user-leftnav-li:hover{ height: 25px; line-height: 40px; padding-left: 25px; background:#f4f4f4; background:url(/images/user/home-user-left.png) 0px -186px no-repeat; font-size: 14px; position: relative; } -.separator_short{margin-top: 5px; margin-bottom: 5px; margin-left: 37px; width: 433px; display: block; border-bottom: 1px solid #d9d9d9;} -.separator_long{margin-top: 5px; margin-bottom: 5px; margin-left: 37px; width: 522px; display: block; border-bottom: 1px solid #d9d9d9;} -/* 模板弹框 20161013byLB */ -#muban_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);} -.muban_popup_top{background:#3b94d6;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;} -.muban_popup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px; } -a.muban_icons_close{width:20px; height:20px;display:block;background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;} -a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;} -#muban_popup_box input,#muban_popup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;} -#muban_popup_box label.pop_box_label{width: 100px; text-align: right; display: inline-block;} -input.radio-width90{ width: 90px; } -#muban_popup_box label.pop_box_label_l {width: 100px; text-align: left; display: inline-block;} -.sy_popup_con{ margin:30px auto 0;font-size:14px; width:330px;} -.sy_popup_add li{ line-height:40px;} -.sy_popup_add label{ display:block; float:left; width:85px; text-align:right; line-height:40px;} -.email_prompt_mes{ border:1px solid #ccc; border-radius:5px; width:468px; height:60px; background:#fff;padding:5px; margin-bottom: 5px;} -a.btn{display: inline-block;border:none; padding:0 10px;color: #333;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; } -a:hover.btn{background: #c3c3c3; color: #333;} -a.btn-green{background: #60b25e; color: #fff;} -a:hover.btn-green{background: #51a74f; color: #fff;} -a.btn-blue{background: #3b94d6; color: #fff;} -a:hover.btn-blue{background: #2788d0; color: #fff;} -.sy_popup_top{ background:#3b94d6; height:40px; -webkit-border-radius: 5px 5px 0px 0px; -moz-border-radius: 5px 5px 0px 0px; -o-border-radius: 5px 5px 0px 0px; border-radius: 5px 5px 0px 0px;} -.sy_popup_top h3{ font-size:18px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px;} -.sy_popup_top_tishi{ background:#ededed; } -.sy_popup_top_tishi h3{color:#616161; font-size:16px;} -.sy_popup_con02{ margin:30px auto 0; font-size:14px; text-align:center; width:360px;} -.sy_popup_con02 ul li p{ margin-bottom:15px; text-align:center; font-size:14px; color:#616161;} -.sy_popup_con02 a{ margin:0 auto;} -#sy_popup_box{ width:460px; background:#fff; padding-bottom:30px; border-radius:5px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);} - -a.btn_blue_64_width{ width: 64px; display:inline-block; color: #fff; background: #3b94d6; text-align: center; font-size: 12px; height: 30px; line-height: 30px;border-radius:3px; } -a:hover.btn_blue_64_width{ background: #2788d0; color: #fff;} -.btn_grey_64_width{ width: 64px; display:inline-block; color: #656565; background: #d9d9d9; text-align: center; font-size: 12px; height: 30px; line-height: 30px;border-radius:3px; } -a:hover.btn_grey_64_width{ background: #717171; color: #fff;} -a.btn_green_64_width{ width: 64px; display:inline-block; color: #fff; background: #28be6c; text-align: center; font-size: 12px; height: 30px; line-height: 30px;border-radius:3px; } -a:hover.btn_green_64_width{ background: #14ad5a; color: #fff;} - - +@charset "utf-8"; +/* CSS Document */ +/*html,body{ font-size:14px; line-height:2.0; height:100%;} +.newContainer{ min-height:100%; height: auto !important; height: 100%; *//*IE6不识别min-height*//*position: relative;} +.newMain{ margin: 0 auto; padding-bottom: 155px; } +.newFooter{ position: absolute; bottom: 0; width: 100%; height: 155px;background: #323232; clear:both; min-width: 1200px} +.newHeader{background: #46484c;width:100%; height: 50px; min-width: 1200px}*/ +/* 2015-06-26 */ +body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} +div,img,tr,td,table{ border:0;} +table,tr,td{border:0;} +ol,ul,li{ list-style-type:none} +blockquote { border:1px solid #d4d4d4; padding-left: 0.6em; padding-top: 0.6em; padding-right: 0.6em; padding-bottom: 0.6em; margin-left: 1.4em; margin-right: 0.4em; border-radius: 4px; font-family: "微软雅黑"; background:#e8e8e8; background-size: 100% 100%; margin-top:5px;} +a:hover {text-decoration: none; } +select,input,textarea{border:1px solid #ddd; background:#fff; color:#000; padding-left:5px} +textarea {resize: none;} +.pInline {margin:0px; padding:0px; display:inline-block;} +div.minHeight48{min-height: 48px;} + +/*常用*/ +#users_setting{clear:both;width:728px;background: #fff;padding: 10px;/*滑动门的宽度*/} +/*上传图片处理*/ +.upload_img img{max-width: 100%;} +.homepagePostIntro img{display: block} +blockquote img{max-width: 100%;} + +.none{display: none;} +.rside_back{ width:670px; margin-left:10px; background:#fff; margin-bottom:10px;} +.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; background:#dbdbdb;} +.sub_btn:hover{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;} +table{ background:#fff;} +.more{ font-weight:normal; color:#999; font-size:12px;} +.no_line{ border-bottom:none;} +.line{border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;} +.no_border{ border:none;} +.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(/images/public_icon.png) 135px -193px no-repeat; cursor:pointer;} +a.btn_message_free{ background:#ff5722; display:block; text-align:center; color:#fff; padding:3px 0; width:80px; margin-bottom:10px;} +.db {display:block;} +/*pre标签换行*/ +.break_word{word-break: break-all;word-wrap: break-word;} +.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;} +/*显隐*/ +.undis {display:none;} +.dis {display:inline-block;} +/* font & color */ +h2{ font-size:18px;} /*color:#3b94d6;*/ +h4{ font-size:14px;}/*color:#3b3b3b;*/ +.f8 {font-size:8px;} +.f10 {font-size:10px;} +.f12{font-size:12px;} +.f_12{ font-size:12px;} +.f14{font-size:14px;} +.f_14{ font-size:14px;} +.f16{font-size:16px;} +.f18{font-size:18px;} +.f20{font-size:20px;} +.fb{font-weight:bold;} +.f_b{ font-weight: bold;} +.lh20{line-height:20px;} +.lh22{line-height:22px;} +.lh24{line-height:24px;} +.lh26{line-height:26px;} +.lh27{line-height:27px;} +.lh38{line-height: 38px !important;} +.fmYh{font-family:"微软雅黑";} +.font999{ color:#999;} +.fontRed{color:#770000;} +.text_c{ text-align:center;} +.text_l{ text-align:left;} +/* Float & Clear */ +.clear{ zoom:1;} +.clear:after {clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} +.cl{ clear:both; overflow:hidden; } +.fl{float:left;} +.fr{float:right;} +.f_l{ float:left;} +.f_r{ float:right;} +.float-none {float:none !important;} +.tac {text-align:center;} +.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} +.clearfix{clear:both;zoom:1} +.hidden{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.hide-text {overflow:hidden; white-space:nowrap;} +.flow_hidden{ width:300px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.white_space{white-space:nowrap;} +.pr {position:relative;} +.markPopup {width:290px; height:auto; padding:5px 0px 15px 15px; background-color:#ffffff; z-index:1000;} +.markInput { outline:none; border:1px solid #e6e6e6; height:30px; width:50px; color:#3d3c3c; margin-bottom:10px; text-align:center; margin-right:5px; padding-left:0;} +.markPercentage {margin:10px 0; border:1px solid #e6e6e6; width:70px; height:30px; outline:none; font-size:12px; color:#3d3c3c;} +/* Spacing */ +.ml2{ margin-left:2px;}.ml3{ margin-left:3px;}.ml4{ margin-left:4px;}.ml5{ margin-left:5px;}.ml7 {margin-left:7px;}.ml8{ margin-left:8px;}.ml9{ margin-left:9px;} +.ml10{ margin-left:10px;}.ml14{ margin-left:14px;}.ml15{ margin-left:15px;}.ml16{ margin-left:16px;}.ml20{ margin-left:20px;}.ml21{ margin-left:21px;} +.ml24{margin-left:24px;}.ml25{margin-left:25px;}.ml30{margin-left:30px !important;}.ml35{margin-left: 35px;}.ml36{ margin-left:36px; }.ml38{ margin-left:38px;} +.ml39{ margin-left:39px;}.ml40{ margin-left:40px;}.ml41{ margin-left:41px;}.ml42{ margin-left:42px;}.ml45{ margin-left:45px;}.ml48{ margin-left:48px;}.ml50{ margin-left: 50px;} +.ml53{margin-left:53px;}.ml55{ margin-left:55px;}.ml56{ margin-left:56px !important;}.ml58{margin-left:58px;}.ml60{ margin-left:60px;}.ml65{ margin-left:65px;}.ml63{ margin-left:63px;} +.ml70{margin-left: 70px;}.ml78{ margin-left:78px;}.ml80{ margin-left:80px;}.ml85{margin-left:85px;}.ml90{ margin-left:90px;}.ml95{margin-left:95px;}.ml100{ margin-left:100px;} +.ml110{ margin-left:110px;}.ml125 { margin-left:125px;}.ml130 { margin-left:130px;}.ml140 { margin-left:140px;}.ml150 { margin-left:150px;} +.ml160 {margin-left:160px;}.ml250 {margin-left:250px;}.ml258{ margin-left:258px;}.ml320{ margin-left:320px;}.ml358{ margin-left:358px;}.mr-5 {margin-right:-5px;} +.mr2{ margin-right:2px;}.mr3{ margin-right:3px;}.mr5{ margin-right:5px;}.mr8{ margin-right:8px;}.mr10{ margin-right:10px;}.mr12{ margin-right:12px;}.mr15 {margin-right:15px;} +.mr16 {margin-right:16px;}.mr18 {margin-right:18px;}.mr20{ margin-right:20px;}.mr25 {margin-right:25px;}.mr27 {margin-right:27px !important;}.mr30{ margin-right:30px !important;} +.mr35{ margin-right:35px;}.mr40{ margin-right:40px !important;}.mr45{margin-right: 45px;}.mr50{margin-right: 50px;}.mr55{margin-right: 55px;}.mr60 {margin-right:60px;} +.mr65 {margin-right:65px;}.mr70{margin-right: 70px;}.mr75{margin-right: 75px;}.mr80{margin-right: 80px;}.mr85{margin-right: 85px;}.mr90 {margin-right:90px !important;}.mr95 {margin-right:95px !important;} +.mr100 {margin-right:100px !important;}.mr118 {margin-right:118px !important;}.mr130 {margin-right:130px;}.mr135 {margin-right:135px;}.mr150 {margin-right:150px;}.mr200{margin-right:200px;}.mr390{margin-right:390px;}.mr400{margin-right:400px;} +.mw15{margin:0 15px;}.mr90 {margin-right:90px;}.mr95{margin-right: 95px;}.mr140 {margin-right: 140px;}.mw20{ margin: 0 20px;} +.mw380 {max-width: 380px !important;}.mw400 {max-width: 400px !important;}.mw450 {max-width: 450px !important;}.mw550 {max-width: 550px !important;} +.mt-20 {margin-top:-20px;}.mt-10 {margin-top:-10px;}.mt-4 {margin-top:-4px;}.mt-5 {margin-top:-5px;}.mt-2 {margin-top:-2px;}.mt0 {margin-top: 0px !important;} +.mt1{margin-top: 1px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px;}.mt6{ margin-top:6px;}.mt7 {margin-top:7px;} +.mt8{ margin-top:8px !important;}.mt9{ margin-top:9px !important;}.mt10{ margin-top:10px !important;}.mt12 { margin-top:12px !important;}.mt14 {margin-top:14px;} +.mt15 {margin-top:15px;}.mt16{ margin-top:16px !important;}.mt19 {margin-top:19px !important;}.mt20{margin-top: 20px;}.mt28 {margin-top:28px;}.mt30{ margin-top: 30px;} +.mt35 {margin-top:35px;}.mt40{ margin-top: 40px;}.mt45{ margin-top: 45px;}.mt50{ margin-top:50px;}.mt100{ margin-top:100px;}.mb0 {margin-bottom: 0px !important;}.mb4{ margin-bottom:4px;} +.mb5{ margin-bottom:5px;}.mb8 {margin-bottom:8px !important;}.pb5{ padding-bottom: 5px;}.mb10{ margin-bottom:10px !important;}.mb12 {margin-bottom:12px !important;} +.mb15{margin-bottom: 15px;}.mb20{ margin-bottom:20px;}.mb25{ margin-bottom:25px;}.mb30 {margin-bottom:30px;}.mb40 {margin-bottom:40px;}.pl5{ padding-left:5px;} +.pl10 {padding-left:10px;}.pr5 {padding-right:5px;}.pr10{padding-right: 10px;}.pl62 {padding-left: 62px;}.pl15{ padding-left:15px;}.pt5{ padding-top:5px;} +.pt10{ padding-top:10px;}.pb5{ padding-bottom: 5px;}.w20{ width:20px;}.w40{width: 40px;}.w45{ width: 45px;}.w46{ width: 46px;}.w48{width:48px;}.w50 {width:50px;} +.w56 {width:56px;}.w60{ width:60px;}.w61{ width:61px;}.w65{ width:65px;}.w70{ width:70px;}.w80{ width:80px;}.w90{ width:90px;}.w100 {width: 100px;}.w110{width:110px !important;} +.w108 {width:108px;}.w125{width:125px;}.w128{ width:128px;}.w130{ width:130px;}.w140{ width:140px;}.w145{ width:145px;}.w150{ width:150px;} +.w160{width:160px !important;}.w170{width:170px;}.w180{width:180px;}.w186{ width:186px;}.w190{width: 190px;}.w196{ width:196px;}.w200{width: 200px;}.w210{ width:210px;} +.w230{width:230px !important;}.w235{ width:235px !important;}.w265{ width: 265px;}.w270{ width: 270px;}.w280{ width:280px;}.w289{ width:289px !important;}.w290{ width:290px !important;} +.w300{ width:300px !important;}.w305{ width:305px;}.w330 {width:330px;}.w350 {width:350px;}.w360 {width:360px;}.w362 {width:362px;}.h400{height:400px !important;}.w430{ width:430px;} +.W440{ width:440px;}.w450 {width:450px;}.w455{width:455px !important;}.w459{ width:459px;}.w460{ width:460px;}.w465{width:465px !important;} +.w490{width:490px;}.w536{ width:536px;}.w543{ width:543px;}.w547{ width:547px;}.w557{ width:557px;}.w570 {width:570px !important;}.w576{ width:576px;}.w590{ width:590px !important;} +.w607 {width:607px;}.w664{ width:664px;}.w683{ width:683px;}.w610{ width:610px;}.w600{ width:600px !important;}.w603{ width:603px !important;} +.w606{ width:606px; }.w620{ width:620px;}.w680{ width: 680px;}.w701{width: 701px;}.w705{ width:705px;}.w708{width: 708px;}.w709{width: 709px;} +.w712{width:712px; max-width:712px; min-width:712px;}.w713{width: 713px;}.w720{width:721px;}.w730{width:730px;}.w770{ width:770px;}.h15{ height: 15px; } +.h28{height: 28px;}.h20{height: 20px;}.h22{ height:22px;}.h26{ height:26px;}.h50{ height:50px;}.h70{ height:70px;}.h200{ height:200px;} +.h400{height: 400px !important;}.h150{ height:150px;}.H60 {height:60px !important;}.H150{ height:150px;}.p10 {padding-left:10px; padding-right:10px;} +.mw150 {max-width: 150px !important;}.mw220 {max-width: 220px !important;}.mw280 {max-width:280px !important;}.mw360 {max-width: 360px !important;} +.mw380 {max-width: 380px !important;}.mw400 {max-width: 400px !important;}.mh18 {max-height: 18px;}.max_h54 {max-height:54px; }.maxHeight100 {max-height:100px; overflow-x:hidden; overflow-y:auto;} +.maxHeight200 {max-height:200px; overflow-x:hidden; overflow-y:auto;} +.W50{ width:50px;}.W120{ width:110px;}.W130{ width:130px;}.W200{ width:200px;}.W300 {width:300px !important;}.W320{ width:320px;}.W420 {width:420px;}.W440{ width:440px;} +.W700{ width:700px; max-width:700px; min-width:700px;}.W710{ width:708px;}.W800{ width:800px !important;} +.maxwidth400{max-width: 400px;}.m_w460{max-width: 460px;}.m_w500{max-width: 500px;}.m_w505{max-width: 505px;}.m_w530{max-width:860px;}a.edu-txt-850{ display: block; max-width:700px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} +a.edu-txt-800{ display: block; max-width:800px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}.m_w600{max-width: 600px;}.td_w70{ width:70px;}.td_w60{ width:60px;}.td_w110{ width:110px;}.width165{width: 165px;}.width180{width: 180px !important;} +.width285{width: 285px;}.width255{width: 255px;}.width385{width: 385px;}.width505{width: 505px;}.width525{width: 525px;}.width530{width: 530px;} +.lh23{line-height: 23px;} +/*该高度会写入配置文件*/ +.maxh360 {max-height: 810px;} +.maxh300 { max-height: 300px; } +.lh18 { line-height: 18px;} +/* Font & background Color */ +a.b_grey{ background: #F5F5F5;} +a.b_dgrey{ background: #CCC;} +a.c_orange{color:#ff5722;} +a:hover.c_orange{color: #d33503;} +a.c_lorange{color:#ff9900;} +a:hover.c_lorange{color:#fff;} +a.c_blue{ color:#3b94d6;} +a.c_eblue{color: #3784D3} +a.c_setting_blue{color: #0781B4} +a.c_dblue{ color:#09658c;} +a:hover.c_dblue{ color:#2788d0;} +a.c_white{ color:#fff;} +input.c_white { color:#fff} +a.c_dorange{ color:#fd6e2a;} +a.c_dark{color: #3e4040;} +a:hover.c_dark{color: #3ca5c6;} +a.b_blue{background: #3b94d6;} +a:hover.b_blue{background: #41a8c8;} +a.b_green{background:#28be6c;} +a:hover.b_green{background:#14ad5a;} +a.c_blue02{color: #3ca5c6;} +a:hover.c_blue02{color: #0781b4;} +a.c_red{ color:#F00;} +a:hover.c_red{ color: #C00;} +a.c_purple{color: #426e9a;} +a:hover.c_purple{color: #d33503;} +a.c_green{ color:#28be6c;} +a.c_lgrey{ color:#CCC;} +a:hover.c_lgrey{ color:#3ca5c6;} +a.c_grey{ color:#999999;} +a:hover.c_grey{ color:#333;} +.b_grey{ background: #F5F5F5;} +.b_dgrey{ background: #CCC;} +.c_orange{color:#e8770d;} +.c_dark{ color:#2d2d2d;} +.c_lorange{ color:#ff9900;} +.c_purple{color: #6883b6;} +.c_blue{ color:#3b94d6;} +.c_red{ color:#F00;} +.c_green{ color:#28be6c;} +.c_grey{color:#999;} +.c_grey02{ color:#666666;} +.c_grey03{ color:#bbbaba;} +.c_dgrey{ color:#696969;} +.c_dblue{ color:#09658c;} +.c_white {color:#fff;} +.b_blue{background:#3b94d6;} +.b_green{background:#28be6c;} +.b_w{ background:#fff !important;} +.b_slow_yellow{background:#adde18;} +.b_yellow{background:#DDDF0D;} +.b_slow_red{background:#df8538;} +.b_green2 {background:#63c360;} +.b_red {background:#d60308;} +.b_lblue{ background:#3b94d6;} + +/*font&color add by Tim*/ +.fontGrey {color:#cecece;} +.fontGrey2 {color:#888888;} +.fontGrey3 {color:#484848;} +.fontGrey4{color:#999999;} +.fontGrey5 {color:#ddd;} +.fontGrey6 {color:#7a7a7a;} +.fontGrey7 {color:#555;} +.fontBlue {color:#3498db;} +span.newsBlack {color:#4b4b4b; font-size:13px; font-weight:bold} +a.underline {text-decoration:underline;} +a.fontBlue {color:#2788d0;} +.fontBlue2 {color:#3b94d6 !important;} +a.fontGrey {color:#cecece;} +a.fontGrey2 {color:#888888;} +a.fontGrey3 {color:#555;} +a.link-black {color:#000;} +a.link-black:hover {color:#3b94d6;} +a.link-blue {color:#3b94d6;} +a.linkOrange {color:#ff7143;} +/*a.linkBlue {color:#3b94d6;}*/ +a.linkBlue:hover {color:#FF7500;} +a.linkBlue2 {color:#3498db;} +a.linkBlue2:hover {color:#2788d0;} +a.buttonBlue {background-color:#3b94d6;} +a.buttonBlue:hover {background-color:#2788d0;} +a.linkGrey {color:#484848;} +a.linkGrey:hover {color:#3b94d6;} +a.linkGrey2 {color:#888888;} +a.linkGrey2:hover {color:#484848;} +a.linkGrey3 {color:#484848;} +a.linkGrey3:hover {color:#000000;} +a.linkGrey4 {color:#484848;} +a.linkGrey4:hover {color:#2788d0;} +a.linkGrey5 {color:#484848;} +a.linkGrey5:hover {color:#3498db !important;} +a.linkGrey6 {color:#484848 !important;} +a.linkGrey6:hover {color:#ffffff !important;} +a.linkGrey7 {color:#888888;} +a.linkGrey7:hover {color:#3b94d6;} +a.bBlue {background-color:#3498db;} +a.bBlue:hover {background-color:#2788d0;} +a.bGreen {background-color:#60b25e;} +a.bGreen:hover {background-color:#51a74f;} +a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;} +a.submit_btn:hover {background-color:#3498db; color:#ffffff;} +a.link_file_a{ background:url(/images/pic_file.png) 0 0px no-repeat; padding-left:20px; } +a:hover.link_file_a{ background:url(/images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;} +a.link_file_a2{ background:url(/images/pic_file.png) 0 -15px no-repeat; padding-left: 20px;} +a.submit_btn2 {background-color: #3b94d6; padding: 3px 5px; color: #ffffff;} +a.submit_btn2:hover {background-color: #2788d0;} +/****翻页***/ +.wlist{float:right;} +.wlist li{float:left;} +.wlist a{ float:left; border:1px solid #64bdd9; padding:0 5px; margin-right:5px; color:#888;} +.wlist a:hover{border:1px solid #3b94d6; background-color:#3b94d6; color:#fff; text-decoration:none;} +.wlist_select a { background-color:#3b94d6; color:#fff;} +/*add by Tim*/ +input.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;} +input.submit_btn:hover {background-color:#3498db; color:#ffffff;} +a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} + +/* commonBtn */ +.grey_btn{background:#d9d9d9; color:#656565; font-weight:normal; text-align:center;padding:2px 10px;} +a.grey_btn{background:#d9d9d9; color:#656565; font-weight:normal; text-align:center;padding:2px 10px; display: inline-block; border-radius: 3px;} +a:hover.grey_btn{background:#717171; color:#fff;} +a.big_grey_btn{background:#e1e1e1; color:#333; font-weight:normal; padding:0px 15px; text-align:center; font-size: 12px; height: 30px; line-height: 30px;} +a:hover.big_grey_btn{background:#c3c3c3;} +.grey_n_btn{background:#d9d9d9; color:#656565; font-weight:normal;padding:2px 10px; text-align:center;} +a.grey_n_btn{background:#d9d9d9; color:#656565;font-weight:normal; padding:2px 10px; text-align:center;} +a:hover.grey_n_btn{ background:#717171; color:#fff;} +.green_btn{background:#28be6c; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;} +a.green_btn{background:#28be6c;color:#fff; font-weight:normal; padding:2px 10px; text-align:center;} +a:hover.green_btn{ background:#14ad5a;} +a.blue_btn{background:#3b94d6; color:#fff; font-weight:normal; padding:2px 10px; text-align:center; display:inline-block;border-radius:3px;} +a:hover.blue_btn{background:#2788d0;} +a.big_blue_btn{background:#3b94d6; color:#fff; font-weight:normal;padding:0px 15px; text-align:center; font-size: 12px; height: 30px; line-height: 30px;} +a:hover.big_blue_btn{background:#2788d0;} +.red_btn{ background:red; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;} +a.red_btn{background:red; color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;} +a.orange_btn_homework{background:#d63502;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;} +a.orange_btn{ background:#ff5722;color:#fff; font-weight:normal; padding:2px 10px; text-align:center; } +a:hover.orange_btn{ background:#d63502;} +.green_u_btn{border:1px solid #3cb761; padding:2px 10px; color:#3cb761;} +a.green_u_btn{border:1px solid #3cb761; padding:2px 10px; color:#3cb761;} +a:hover.green_u_btn{ background:#3cb761; color:#fff;} +.orange_u_btn{border:1px solid #ff5d31; padding:2px 10px; color:#ff5d31;} +a.orange_u_btn{border:1px solid #ff5d31; padding:2px 10px; color:#ff5d31;} +a:hover.orange_u_btn{background:#ff5d31; color:#fff;} +.bgreen_u_btn{border:1px solid #1abc9c; padding:2px 10px; color:#1abc9c;} +a.bgreen_u_btn{border:1px solid #1abc9c; padding:2px 10px; color:#1abc9c;} +a:hover.bgreen_u_btn{background:#1abc9c; color:#fff;} +.blue_u_btn{border:1px solid #3b94d6; padding:2px 10px; color:#3b94d6;} +a.blue_u_btn{border:1px solid #3b94d6; padding:2px 10px; color:#3b94d6;} +a:hover.blue_u_btn{background:#3b94d6; color:#fff;} +.blue_n_btn{ background:#3b94d6; color:#fff!important; font-weight:normal;padding:2px 10px; text-align:center;} +a.blue_n_btn{background:#3b94d6;color:#fff!important;font-weight:normal; padding:2px 10px; text-align:center;} +a:hover.blue_n_btn{ background:#329cbd;} +.green_n_btn{background:#3cb761; padding:2px 10px; color:#fff;} +a.green_n_btn{background:#3cb761; padding:2px 10px; color:#fff;} +a:hover.green_n_btn{ background:#14ad5a;} +.orange_n_btn{background:#ff5d31; padding:2px 10px; color:#fff;} +a.orange_n_btn{background:#ff5d31; padding:2px 10px; color:#fff;} +a:hover.orange_n_btn{background:#d63502;} +.bgreen_n_btn{background:#1abc9c; padding:2px 10px; color:#fff;} +a.bgreen_n_btn{background:#1abc9c; padding:2px 10px; color:#fff;} +a:hover.bgreen_n_btn{background:#08a384;} + +.nolink_btn{ background:#BCBCBC; color: #fff; padding:2px 5px;} +.more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;} +.upbtn{ margin:40px 0 0 15px; display:block; padding:2px 5px; border:1px solid #eaeaea;} +.upbtn:hover{color:#3b94d6;cursor: pointer;} +.upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer} +.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;} +.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;} +.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;} +.grey_btn_cir{ background:#b2b2b2; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;} +.red_homework_btn_cir{ background:#e74c3c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;} +.grey_homework_btn_cir{ background:#b2b2b2; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;} +.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;} +.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;} +.sticky_btn_cir{ background:#3b94d6; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;} +.locked_btn_cir{background: url(/images/locked.png) 0 0 no-repeat; cursor: default;} +.bgreen_btn_cir{ background:#1abc9c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;} +.grey_border{border:1px solid #dddddd !important;} +.red-cir-btn{ background:#e74c3c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.green-cir-btn{ background:#28be6c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.button-rep { color: #888;display: inline-block;background: #eee;padding: 2px 5px;} +.green_btn_share{ background:#28be6c; padding:2px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.borderRadius {border-radius:5px;} +a.Blue-btn{ display:block; margin-right:15px;width:65px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} +a:hover.Blue-btn{ background:#3598db; color:#fff;} +a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#fff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} +a:hover.BlueCirBtn{ background:#3598db; color:#fff;} +a.BlueCirBtnMini{ display:block;width:40px; height:24px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} +a:hover.BlueCirBtnMini{ background:#3598db; color:#fff;} +a.BlueCirBtnMiddle{ display:block;width:50px; height:24px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} +a:hover.BlueCirBtnMiddle{ background:#3598db; color:#fff;} +/* 按钮*/ +a.btn_grey_big{ display: inline-block; border: 1px solid #ccc;color: #747474;text-align: center;font-size: 14px; padding:0 10px; height: 30px; line-height: 30px;border-radius:3px;} +a:hover.btn_grey_big{ background: #c3c3c3; color: #fff;} +a.btn_orange_big{ display:inline-block; border: 1px solid #ee4a1f;color: #ee4a1f; text-align: center; font-size: 14px; padding:0 10px; height: 30px; line-height: 30px; border-radius:3px;} +a:hover.btn_orange_big{ background: #ee4a1f;color: #fff;} +a.btn_green_big{ display:inline-block; border: 1px solid #60b25e; color: #60b25e; text-align: center;font-size: 14px; padding:0 10px; height: 30px; line-height: 30px; border-radius:3px;} +a:hover.btn_green_big{ background: #60b25e; color: #fff;} +a.sy_btn_grey{ display:inline-block; color: #333; background: #e1e1e1; text-align: center; font-size: 12px; padding:0 15px; height: 30px; line-height: 30px; border-radius:3px;} +a:hover.sy_btn_grey{ background: #c3c3c3;} +a.sy_btn_blue{ display:inline-block; color: #fff; background: #3b94d6; text-align: center; font-size: 12px; padding:0 15px; height: 30px; line-height: 30px;border-radius:3px;} +a:hover.sy_btn_blue{ background: #2788d0;} +input.sy_btn_blue{ display: inline-block; color: #fff; background: #3b94d6; text-align: center; font-size: 12px; padding:0 15px; height: 30px; line-height: 30px; border-radius:3px; cursor:pointer;} +a.sy_btn_blue_mini{ display:inline-block;color: #fff; background: #3b94d6; text-align: center; font-size: 12px; padding:0 10px; height: 26px; line-height: 26px;border-radius:3px;} +a:hover.sy_btn_blue_mini{ background: #2788d0;} +a.sy_btn_grey_mini{display:inline-block; color: #333; background: #e1e1e1; text-align: center;font-size: 12px; padding:0 10px; height: 26px; line-height: 26px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px;} +a:hover.sy_btn_grey_mini{ background: #c3c3c3;} +a.btn_grey_mid{ display:inline-block; color: #565656; background: #eaeaea; text-align: center; font-size: 12px; padding:0 10px; height: 26px; line-height: 26px; border-radius:3px;} +a:hover.btn_grey_mid{ background: #c8c8c8;} +a.sy_btn_green{ display:inline-block; color: #fff; background: #60b25e;text-align: center; font-size: 12px; padding:0 15px; height: 30px;line-height: 30px; border-radius:3px;} +a:hover.sy_btn_green{ background: #51a74f;} +a.hw_btn_blue{display: inline-block; color: #3b94d6; border:1px solid #3b94d6; background:#fff; text-align: center; font-size: 12px; padding:0 15px;height: 30px; line-height: 30px;border-radius:3px;} +a:hover.hw_btn_blue,a:active.hw_btn_blue{ background: #3b94d6; color:#fff;} +/* commonpic */ +.pic_date{ display:block; background:url(/images/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; } +.pic_add{ display:block; background:url(/images/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; } +.pic_sch{ display:block; background:url(/images/public_icon.png) -31px -195px no-repeat; width:16px; height:15px; } +.pic_mes{ display:block; background:url(/images/public_icon.png) 0px -376px no-repeat; width:20px; height:15px; padding-left:18px;} +.pic_img{ display:block; background:url(/images/public_icon.png) -31px -419px no-repeat; width:20px; height:15px; } +.pic_del{ display:block; background:url(/images/public_icon.png) 0px -235px no-repeat; width:20px; height:15px; } +.pic_del:hover{ background:url(/images/public_icon.png) -32px -235px no-repeat; } +.pic_stats{display:block; background:url(/images/public_icon.png) 0px -548px no-repeat; width:20px; height:15px;} +.pic_files{display:block; background:url(/images/public_icon.png) 0px -578px no-repeat; width:20px; height:15px;} +.pic_text{display:block; background:url(/images/public_icon.png) 0px -609px no-repeat; width:20px; height:18px;} +.pic_text02{display:block; background:url(/images/public_icon.png) 0px -642px no-repeat; width:20px; height:19px;} +.pic_edit{display:block; background:url(/images/public_icon.png) 0px -32px no-repeat; width:20px; height:15px;} +.pic_edit:hover{display:block; background:url(/images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;} +.pic_edit2{display:inline-block; background:url(/images/public_icon.png) 0px -32px no-repeat; width:20px; height:15px; vertical-align:middle; display:none;} +.pic_edit2:hover{display:inline-block; background:url(/images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;} +/*文本左对齐*/ +.tl{text-align: left;} +.embed img,embed{max-width: 100%;} +.attachments {clear: both;} +.is_public_checkbox{margin-left: 15px;margin-right: 10px;} +.author_name{color: #3ca5c6 !important;} +.ke-container-default{max-width: 100%;} +/*状态提示图标*/ +.success-icon {background:url("/images/icons_ziliao.png") 0 -28px no-repeat; padding-left:25px;} +.error-icon {background:url("/images/icons_ziliao.png") 0 -56px no-repeat; padding-left:25px;} +/*禁用*/ +.disabled {background-color:#f5f5f5;} +#popupWrap ul{cursor: default;} +.bg_checked{background-color: #3b94d6;} +/* 搜索 */ +.hw_search_box{ position:relative; } +.hw_search_box input.hw_search-input{ width:293px; height:28px; border:none; border:1px solid #e7e7e7; background:#fff; padding-left:5px;} +.hw_search_box a.hw_btn_search{display:block; width:20px; height:20px; background:url(/images/hw/icons_hw.png) 0 -57px no-repeat; position:absolute; right:5px; top:5px; cursor:pointer;float:left; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;} +.hw_search_box a:hover.hw_btn_search{background:url(/images/hw/icons_hw.png) -40px -57px no-repeat; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;} +.hw_files_icon{display:block; width:17px; height:14px; background:url(/images/hw/icons_hw.png) 0 -135px no-repeat;} +/* 编辑删除 */ +.sy_icons_edit{ display: inline-block; padding:9px;background:url(../../images/sy/sy_icons02.png) 0 1px no-repeat;} +.sy_icons_del{ padding:9px;background:url(../../images/sy/sy_icons02.png) 0 -21px no-repeat;} +.sy_icons_edit:hover{ background:url(../../images/sy/sy_icons02.png) -20px 1px no-repeat; } +.sy_icons_del:hover{ background:url(../../images/sy/sy_icons02.png) -20px -21px no-repeat;} +/* 翻页 */ +.pages a{ display:block; border:1px solid #d1d1d1; color:#888; float:left; width:30px;text-align:center; padding:3px 0; line-height:1.9; margin-right:5px;} +.pages a:hover{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;} +a.pages-big{width:50px;} +.pages .active{ background-color:#3b94d6; border:1px solid #3b94d6;color:#fff;} +.pages{ width:330px; margin:20px auto 10px;} +.pages li {display:inline-block;} + +.sy_corange{ color: #ee4a1f;} +.sy_new_orange{font-size: 12px;padding: 0 5px;border-radius: 3px;line-height: 14px;color: #ff4a1b;border: 1px solid #ff4a1b;} +.sy_cgrey{ color: #888;} +a.sy_cgrey{ color: #888;} +.sy_corange{ color: #ee4a1f;} +a.sy_corange{ color: #ee4a1f;} +a.sy_cblue{ color: #3b94d6;} +/* 新增粉色关注按钮*/ +a.y_btn_pink{ display: inline-block; color: #fff; background: #ff7d7d;text-align: center; font-size: 12px; padding:0 15px; height: 30px; line-height: 30px; border-radius:3px;} +a:hover.sy_btn_pink{ background: #e64c4c;} +.ke-block pre{ font-size:9pt; font-family:Courier New,Arial; border:1px solid #ddd; border-left:5px solid #6ce26c; background:#f6f6f6; padding:5px;} +.ke-block ol li{list-style-type: decimal;margin-left: 40px;} +.ke-block ul li{list-style-type: disc;margin-left: 40px;} +.ke-block{font-size: 14px;} +.ke-block h1{font-size: 2em;} +.ke-block h2{font-size: 1.5em;} +.ke-block h3{font-size: 1.17em;} +a.export_icon{background: url(/images/item.png) -58px -30px no-repeat; width: 45px; float: left; line-height: 41px; font-size: 14px; margin-top: -5px;} +a.export_icon:hover {background: url(/images/item.png) -58px -60px no-repeat;} +.export_icon_li:hover ul {display:block;} +.break_full_word { word-break: normal !important;word-wrap: break-word !important; } +.icons-user-homework{background:url(/images/user/home-user-left.png) 0px -150px no-repeat; } +.homework-user-leftnav-li{ height: 25px; line-height: 40px; padding-left: 25px; color: #666;background:url(/images/user/home-user-left.png) 0px -149px no-repeat; font-size: 14px; position: relative; } +.homework-user-leftnav-li:hover{ height: 25px; line-height: 40px; padding-left: 25px; background:#f4f4f4; background:url(/images/user/home-user-left.png) 0px -186px no-repeat; font-size: 14px; position: relative; } +.separator_short{margin-top: 5px; margin-bottom: 5px; margin-left: 37px; width: 433px; display: block; border-bottom: 1px solid #d9d9d9;} +.separator_long{margin-top: 5px; margin-bottom: 5px; margin-left: 37px; width: 522px; display: block; border-bottom: 1px solid #d9d9d9;} +/* 模板弹框 20161013byLB */ +#muban_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);} +.muban_popup_top{background:#3b94d6;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;} +.muban_popup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px; } +a.muban_icons_close{width:20px; height:20px;display:block;background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;} +a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;} +#muban_popup_box input,#muban_popup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;} +#muban_popup_box label.pop_box_label{width: 100px; text-align: right; display: inline-block;} +input.radio-width90{ width: 90px; } +#muban_popup_box label.pop_box_label_l {width: 100px; text-align: left; display: inline-block;} +.sy_popup_con{ margin:30px auto 0;font-size:14px; width:330px;} +.sy_popup_add li{ line-height:40px;} +.sy_popup_add label{ display:block; float:left; width:85px; text-align:right; line-height:40px;} +.email_prompt_mes{ border:1px solid #ccc; border-radius:5px; width:468px; height:60px; background:#fff;padding:5px; margin-bottom: 5px;} +a.btn{display: inline-block;border:none; padding:0 10px;color: #333;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;line-height: 30px;-webkit-border-radius: 3px;-moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; } +a:hover.btn{background: #c3c3c3; color: #333;} +a.btn-green{background: #60b25e; color: #fff;} +a:hover.btn-green{background: #51a74f; color: #fff;} +a.btn-blue{background: #3b94d6; color: #fff;} +a:hover.btn-blue{background: #2788d0; color: #fff;} +.sy_popup_top{ background:#3b94d6; height:40px; -webkit-border-radius: 5px 5px 0px 0px; -moz-border-radius: 5px 5px 0px 0px; -o-border-radius: 5px 5px 0px 0px; border-radius: 5px 5px 0px 0px;} +.sy_popup_top h3{ font-size:18px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px;} +.sy_popup_top_tishi{ background:#ededed; } +.sy_popup_top_tishi h3{color:#616161; font-size:16px;} +.sy_popup_con02{ margin:30px auto 0; font-size:14px; text-align:center; width:360px;} +.sy_popup_con02 ul li p{ margin-bottom:15px; text-align:center; font-size:14px; color:#616161;} +.sy_popup_con02 a{ margin:0 auto;} +#sy_popup_box{ width:460px; background:#fff; padding-bottom:30px; border-radius:5px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);} + +a.btn_blue_64_width{ width: 64px; display:inline-block; color: #fff; background: #3b94d6; text-align: center; font-size: 12px; height: 30px; line-height: 30px;border-radius:3px; } +a:hover.btn_blue_64_width{ background: #2788d0; color: #fff;} +.btn_grey_64_width{ width: 64px; display:inline-block; color: #656565; background: #d9d9d9; text-align: center; font-size: 12px; height: 30px; line-height: 30px;border-radius:3px; } +a:hover.btn_grey_64_width{ background: #717171; color: #fff;} +a.btn_green_64_width{ width: 64px; display:inline-block; color: #fff; background: #28be6c; text-align: center; font-size: 12px; height: 30px; line-height: 30px;border-radius:3px; } +a:hover.btn_green_64_width{ background: #14ad5a; color: #fff;} + + From d6fb28b970ebac0f7054d920083c54a29e085bd6 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, 24 Jun 2019 23:05:56 +0800 Subject: [PATCH 147/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/shixunHomework/Listofworks.js | 4 +++- .../modules/courses/shixunHomework/Listofworksstudentone.js | 4 +++- .../src/modules/courses/shixunHomework/Trainingjobsetting.js | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 3e3bf95c4..62953fedb 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -299,9 +299,11 @@ class Listofworks extends Component { var data = { search: "", order: "", - b_order: "", + b_order: "asc", work_status: "", course_group: "", + page:1, + limit:20, } axios.post(urll, data).then((result) => { if (result !== undefined) { diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 673d864de..f456cdd5d 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -90,7 +90,9 @@ class Listofworksstudentone extends Component { var data = { search: "", order: "", - b_order: "", + b_order: "asc", + page:1, + limit:20, work_status: "", course_group: "", } diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 88c5fc88a..bd24abb02 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -141,7 +141,7 @@ class Trainingjobsetting extends Component { // console.log(homeworkid) let url = `/homework_commons/${homeworkid}/settings.json`; axios.get(url).then((result) => { - if (result.status === 200) { + if (result!=undefined) { // console.log(result.data.code_review) // console.log("设置页") // console.log(JSON.stringify(result)) @@ -1776,6 +1776,7 @@ class Trainingjobsetting extends Component { > this.rulesCheckInfo(info)} From 74ed2ec427c145a85510fba64d2b395f253847fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 25 Jun 2019 00:31:22 +0800 Subject: [PATCH 148/964] =?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 --- public/react/package.json | 4 +- .../src/modules/login/Trialapplication.js | 6 +- .../modules/tpm/TPMsettings/TPMsettings.js | 34 ++- .../tpm/TPMsettings/css/TPMsettings.css | 199 +++++++++--------- 4 files changed, 136 insertions(+), 107 deletions(-) diff --git a/public/react/package.json b/public/react/package.json index 19b8286d9..5aebf0d41 100644 --- a/public/react/package.json +++ b/public/react/package.json @@ -3,10 +3,9 @@ "version": "0.1.0", "private": true, "dependencies": { - "@novnc/novnc": "^1.1.0", - "@flatten/array": "^1.1.7", "@icedesign/base": "^0.2.5", + "@novnc/novnc": "^1.1.0", "antd": "^3.6.5", "array-flatten": "^2.1.2", "autoprefixer": "7.1.6", @@ -41,6 +40,7 @@ "fs-extra": "3.0.1", "html-webpack-plugin": "2.29.0", "immutability-helper": "^2.6.6", + "install": "^0.12.2", "jest": "20.0.4", "js-file-download": "^0.4.7", "lodash": "^4.17.5", diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index 283574938..4f8c5d114 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -77,9 +77,9 @@ class Trialapplication extends Component { //TODO 这里如果样式变了会出现css不加载的情况 }); - console.log(this.props.isRenders); - console.log("89"); - console.log(this.state.props.user_phone_binded ); + // console.log(this.props.isRenders); + // console.log("89"); + // console.log(this.state.props.user_phone_binded ); try { if (this.state.props.user_phone_binded !== undefined) { console.log(this.state.props.user_phone_binded); diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index 351a461f4..b838f7066 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -1,5 +1,8 @@ import React, { Component } from 'react'; +import MonacoEditor from 'react-monaco-editor'; + +//MonacoDiffEditor 对比模式 import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker} from 'antd'; // import "antd/dist/antd.css"; @@ -222,7 +225,8 @@ export default class TPMsettings extends Component { pod_exist_time: undefined, pod_exist_timetype: false, - shixunmemoMDvalue:"" + shixunmemoMDvalue:"", + language:"" } } descriptionMD=(initValue, id)=> { @@ -894,6 +898,7 @@ export default class TPMsettings extends Component { SelectScput = (value, e) => { this.setState({ choice_standard_scriptssum: value, + language:e.props.name, choice_standard_scripts: {id:e.props.value,value:""}, standard_scriptsModal:true }) @@ -1003,11 +1008,15 @@ export default class TPMsettings extends Component { }) } - getshixunmemoMDvalue=(e)=>{ + getshixunmemoMDvalue=(value, e)=>{ + this.setState({ - shixunmemoMDvalue:e.target.value + shixunmemoMDvalue:value }) } + + + render() { let { postapplyvisible, @@ -1370,15 +1379,26 @@ export default class TPMsettings extends Component {
    *
    -
    - +
    + {/**/} +
    diff --git a/public/react/src/modules/tpm/TPMsettings/css/TPMsettings.css b/public/react/src/modules/tpm/TPMsettings/css/TPMsettings.css index 3e7e3b190..0df6110be 100644 --- a/public/react/src/modules/tpm/TPMsettings/css/TPMsettings.css +++ b/public/react/src/modules/tpm/TPMsettings/css/TPMsettings.css @@ -1,96 +1,105 @@ -.radioStyle{ - display: block; - height: 30px; - } -#settingsMarkdown{ - background:transparent; -} -#challenge_begin{ - height: 30px; - line-height: 30px; -} -#shixundescription .CodeMirror{ - width: 570px !important; - margin-top: 31px !important; - height: 364px !important; -} -#shixundescription .editormd-preview{ - width: 567px !important; - top: 40px !important; - height: 364px !important; -} - -#shixunmemoMD .CodeMirror{ - width: 548px !important; - margin-top: 31px !important; - height: 578px !important; -} - -#shixunmemoMD .editormd-preview{ - width: 544px !important; - top: 40px !important; - height: 578px !important; -} - -.radioStyle { - display: block; - height: 30px; -} - -a.white-btn.use_scope-btn:hover { - color: #FFF !important; -} - -.shixunScopeInput { - width: 218px; - height: 33px; - display: block; - margin-bottom: 15px; -} - -.ant-modal-title { - text-align: center; -} - -a.newuse_scope-btn:hover { - border: 1px solid #F06200; - color: #fff !important; - background: #FF7500; -} - -a.newuse_scope-btn { - border: 1px solid #FF7500; - color: #FF7500 !important; -} - -.tpmprompt { - padding-left: 20px; - margin-top: -4px; -} -.ml36{ - margin-left: 26px; -} - -#shixunmemoMD{ - width:98% !important; - height: 620px !important; -} -.pdr20{ - padding-right:20px; -} - -.nonemodel{ - width: 30%; - height: 624px; - /*background: rgba(0, 0, 0, 0.65);*/ - background: #f5f5f5; - position: absolute; - z-index: 100; - opacity: 0.5; - left: 21.5%; -} - -.shixunmemoMDdiv{ - width: 99%; - height: 615px; +.radioStyle{ + display: block; + height: 30px; + } +#settingsMarkdown{ + background:transparent; +} +#challenge_begin{ + height: 30px; + line-height: 30px; +} +#shixundescription .CodeMirror{ + width: 570px !important; + margin-top: 31px !important; + height: 364px !important; +} +#shixundescription .editormd-preview{ + width: 567px !important; + top: 40px !important; + height: 364px !important; +} + +#shixunmemoMD .CodeMirror{ + width: 548px !important; + margin-top: 31px !important; + height: 578px !important; +} + +#shixunmemoMD .editormd-preview{ + width: 544px !important; + top: 40px !important; + height: 578px !important; +} + +.radioStyle { + display: block; + height: 30px; +} + +a.white-btn.use_scope-btn:hover { + color: #FFF !important; +} + +.shixunScopeInput { + width: 218px; + height: 33px; + display: block; + margin-bottom: 15px; +} + +.ant-modal-title { + text-align: center; +} + +a.newuse_scope-btn:hover { + border: 1px solid #F06200; + color: #fff !important; + background: #FF7500; +} + +a.newuse_scope-btn { + border: 1px solid #FF7500; + color: #FF7500 !important; +} + +.tpmprompt { + padding-left: 20px; + margin-top: -4px; +} +.ml36{ + margin-left: 26px; +} + +#shixunmemoMD{ + width:98% !important; + height: 620px !important; +} +#shixunmemoMDs{ + width: 98% !important; + height: 420px !important; +} +#shixunmemoMDs .CodeMirror { + /* width: 548px !important; */ + margin-top: 31px !important; + height: 402px !important; +} +.pdr20{ + padding-right:20px; +} + +.nonemodel{ + width: 59%; + height: 468px; + /*background: rgba(0, 0, 0, 0.65);*/ + background: #f5f5f5; + position: absolute; + z-index: 100; + opacity: 0.5; + left: 21.5%; +} + +.shixunmemoMDdiv{ + width: 99%; + height: 615px; } \ No newline at end of file From 7e8291d31f476fe528206f413767f8a8930dc454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 25 Jun 2019 00:48:56 +0800 Subject: [PATCH 149/964] b --- public/react/src/modules/tpm/TPMsettings/TPMsettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index b838f7066..85275e620 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -1379,7 +1379,7 @@ export default class TPMsettings extends Component {
    *
    From 8cdaf91dd5dbd86e55e3174bd029c0bf13e54a77 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 25 Jun 2019 09:18:18 +0800 Subject: [PATCH 150/964] set --- .../react/src/modules/courses/busyWork/CommonWorkSetting.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js index 181a34b1b..4a30990ef 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkSetting.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkSetting.js @@ -545,8 +545,8 @@ class CommonWorkSetting extends Component{ let temp_publish_time let temp_end_time if (unified_setting) { - let temp_publish_time = publish_time - let temp_end_time = end_time + temp_publish_time = publish_time + temp_end_time = end_time if (!temp_publish_time) { const publish_time_moment = getNextHalfHourOfMoment(moment()); temp_publish_time = publish_time_moment.format(dateFormat); From f287dd53ed321d5afbab7913a1d61565a0bd8b1f Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Tue, 25 Jun 2019 09:21:36 +0800 Subject: [PATCH 151/964] issues --- public/react/src/AppConfig.js | 1 + public/react/src/common/UrlTool.js | 11 +++ public/react/src/common/educoder.js | 2 +- .../exercise/Testpapersettinghomepage.js | 6 +- .../tasks/GraduationTasksappraise.js | 91 ++++++++----------- .../graduation/tasks/GraduationTasksedit.js | 2 +- .../tasks/GraduationTaskssetting.js | 17 ++-- .../tasks/GraduationTaskssettinglist.js | 6 +- .../tasks/GraduationTaskssettingquestions.js | 20 ++-- .../courses/members/modal/AddStudentModal.js | 21 +++-- .../modules/courses/members/teacherList.js | 4 + .../modules/courses/poll/PollDetailIndex.js | 2 + .../courses/poll/PollDetailTabSecond.js | 13 +-- .../courses/poll/PollDetailTabThird.js | 12 ++- .../poll/pollPublicBtn/ImmediatelyEnd.js | 4 +- .../poll/pollPublicBtn/ImmediatelyPublish.js | 4 +- .../src/modules/tpm/shixuns/ShixunCard.js | 6 +- .../src/modules/user/usersInfo/InfosShixun.js | 6 +- 18 files changed, 116 insertions(+), 112 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index bd3bb68fa..9ebc54de8 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -30,6 +30,7 @@ export function initAxiosInterceptors(props) { // proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.educoder.net" proxy = "https://testeduplus2.educoder.net" + proxy = "http://47.96.87.25:48080" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; diff --git a/public/react/src/common/UrlTool.js b/public/react/src/common/UrlTool.js index 2c307d13e..c0402b325 100644 --- a/public/react/src/common/UrlTool.js +++ b/public/react/src/common/UrlTool.js @@ -10,6 +10,17 @@ export function getImageUrl(path) { return `/${path}`; } +export function setImagesUrl(path){ + const local = 'http://47.96.87.25:48080' + let firstStr=path.substr(0,1); + console.log(firstStr); + if(firstStr=="/"){ + return isDev?`${local}${path}`:`${path}`; + }else{ + return isDev?`${local}/${path}`:`/${path}`; + } +} + export function getUrl(path, goTest) { // https://www.educoder.net // https://testbdweb.trustie.net diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index 285c9eac2..c77d42908 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -2,7 +2,7 @@ import { from } from '_array-flatten@2.1.2@array-flatten'; // export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil'; -export { getImageUrl as getImageUrl, getUrl as getUrl, getUploadActionUrl as getUploadActionUrl } from './UrlTool'; +export { getImageUrl as getImageUrl, getUrl as getUrl,setImagesUrl as setImagesUrl, getUploadActionUrl as getUploadActionUrl } from './UrlTool'; export { default as queryString } from './UrlTool2'; export { SnackbarHOC as SnackbarHOC } from './SnackbarHOC'; diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index f085687ff..818c882e7 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -278,7 +278,8 @@ class Testpapersettinghomepage extends Component{ className={"btn fr color-blue font-16 mt20 mr20"} checkBoxValues={[parseInt(this.props.match.params.Id)]} Exercisetype={"exercise"} - action={this.Commonheadofthetestpaper} + action={this.Commonheadofthetestpaper} + single={true} >:"":""} {isAdmin === true?Commonheadofthetestpaper!==undefined&&Commonheadofthetestpaper.user_permission.exercise_unpublish_count>0? :"":""} {isAdmin === true? 编辑试卷:""} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index 47f38746c..d2ca3855c 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -163,13 +163,13 @@ class GraduationTasksappraise extends Component{

    - {datalist&&datalist.course_name} + {datalist&&datalist.course_name} > - {datalist&&datalist.graduation_name} + {datalist&&datalist.graduation_name} > - 任务详情 + 任务详情 > - {datalist&&datalist.author_name} + {datalist&&datalist.author_name}

    @@ -195,16 +195,16 @@ class GraduationTasksappraise extends Component{
    -
    +
    -
    +
    内容
    -
    +
    {/*
    */} @@ -238,7 +238,7 @@ class GraduationTasksappraise extends Component{ {/**/} {/*{moment(datalist&&datalist.update_time).format('YYYY-MM-DD HH:mm:ss')==="Invalid date"?"":moment(datalist&&datalist.update_time).format('YYYY-MM-DD HH:mm:ss')}*/} {/**/} - 提交 + 提交 {datalist&&datalist.author_name} {moment(datalist&&datalist.commit_time).format('YYYY-MM-DD HH:mm:ss')==="Invalid date"?"":moment(datalist&&datalist.commit_time).format('YYYY-MM-DD HH:mm:ss')} @@ -248,20 +248,15 @@ class GraduationTasksappraise extends Component{
    - {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.length===0?"":
    - + {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.length===0?"": +
    补交附件
    -
    补交原因:{firelistdata&&firelistdata.revise_reason}
    - - - - {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.map((item,key)=>{ - + {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.map((item,key)=>{ return( ) - })} - - - -
    - - 更新 - {firelistdata&&firelistdata.atta_update_user} - - {moment(firelistdata&&firelistdata.atta_update_time).format('YYYY-MM-DD HH:mm:ss')==="Invalid date"?"":moment(firelistdata&&firelistdata.atta_update_time).format('YYYY-MM-DD HH:mm:ss')} - - -
    - - + })} +
    + 更新 + {firelistdata&&firelistdata.atta_update_user} + + {moment(firelistdata&&firelistdata.atta_update_time).format('YYYY-MM-DD HH:mm:ss')==="Invalid date"?"":moment(firelistdata&&firelistdata.atta_update_time).format('YYYY-MM-DD HH:mm:ss')} + +
    } - - {datalist&&datalist.project_info===undefined?"":
    - + {datalist&&datalist.project_info===undefined?"": +
    关联项目
    -
    {datalist&&datalist.project_info.name}
    -
    } {/*{*/} - { datalist === undefined?"":datalist&&datalist.task_type===undefined?"" :datalist.task_type===1? "": -
    - -
    - 其他组员 -
    -
    - {datalist&&datalist.work_members&&datalist.work_members.map((item,key)=>{ - - return( -
    - {item.user_name} -
    - ) - })} -
    + { datalist === undefined?"": datalist && datalist.task_type===undefined ?"" : datalist.task_type===1? "": datalist && datalist.work_members && datalist.work_members.length == 0 ?"": +
    +
    + 其他组员
    - } - - +
    + {datalist.work_members.map((item,key)=>{ + return( +
    + {item.user_name} +
    + ) + })} +
    +
    + }
    diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index 39116c5de..7404f69d6 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -216,7 +216,7 @@ class GraduationTasksedit extends Component{ if ( response.data.status === 0) { this.setState({ - Modalstype:true, + Modalstype:false, Modalstopval:response.data.message, ModalSave:this.cancelAttachment, Loadtype:true, diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index d1ce04697..24da98576 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -1010,10 +1010,10 @@ class GraduationTaskssettingapp extends Component{

    - {coursename} - > - 毕设任务 - > + {coursename} + > + 毕设任务 + > {/*{taskname===""?"":*/} {/**/} @@ -1022,18 +1022,17 @@ class GraduationTaskssettingapp extends Component{ {/**/} {/*}*/} - 任务详情 + 任务详情

    -
    -

    +

    diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 5907674b5..6574bd627 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1363,11 +1363,11 @@ class GraduationTaskssettinglist extends Component{

    - {taskslistdata.course_name} + {taskslistdata.course_name} > - {taskslistdata.graduation_name} + {taskslistdata.graduation_name} > - 任务详情 + 任务详情

    diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index 99c0d21c1..cdaf90ea4 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -243,29 +243,21 @@ class GraduationTasksquestions extends Component{

    - - {questionslist.course_name} + {questionslist.course_name} > - {questionslist.graduation_name} + {questionslist.graduation_name} > - {/**/} - {/*{questionslist.task_name}*/} - {/*>*/} - {/**/} - - 任务详情 - + 任务详情

    -
    -

    +

    diff --git a/public/react/src/modules/courses/members/modal/AddStudentModal.js b/public/react/src/modules/courses/members/modal/AddStudentModal.js index c9fb36134..0b747171d 100644 --- a/public/react/src/modules/courses/members/modal/AddStudentModal.js +++ b/public/react/src/modules/courses/members/modal/AddStudentModal.js @@ -19,7 +19,8 @@ class AddStudentModal extends Component{ hasMore: true, loading: false, courseGroup: '', - page: 1 + page: 1, + isSpin:false } } fetchMemberList = (arg_page) => { @@ -92,6 +93,9 @@ class AddStudentModal extends Component{ } onSendOk = () => { + this.setState({ + isSpin:true + }) if(!this.state.checkBoxValues || this.state.checkBoxValues.length == 0) { this.props.showNotification('请从列表中先选择用户。') return; @@ -111,6 +115,9 @@ class AddStudentModal extends Component{ this.setVisible(false) this.props.showNotification('添加成功') this.props.addStudentSuccess && this.props.addStudentSuccess(params) + this.setState({ + isSpin:false + }) } }) .catch(function (error) { @@ -142,7 +149,7 @@ class AddStudentModal extends Component{ } render(){ const { users, checkBoxValues, loading, hasMore, name, school_name - , courseGroup, course_groups, } = this.state + , courseGroup, course_groups,isSpin } = this.state const { moduleName } = this.props return(
    - 姓名: + 姓名: {this.setState({name: e.target.value})}} - style={{ width: '200px'}} + style={{ width: '242px'}} > 单位: {/* {this.setState({school_name: e.target.value})}} @@ -202,8 +209,8 @@ class AddStudentModal extends Component{
    {/* */} {course_groups && course_groups.length &&
    - 分班: - { course_groups.map((item) => { return })} @@ -217,6 +224,7 @@ class AddStudentModal extends Component{

    + { users && users.length ?
    {/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
    @@ -259,6 +267,7 @@ class AddStudentModal extends Component{
    : } +
    ) } diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index ac9d22119..0ee44c210 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -45,6 +45,10 @@ function buildColumns(that) { render: (content, item, index) => { return {(that.state.page - 1) * 20 + index + 1} } + },{ + title: '用户ID', + dataIndex: 'login', + key: 'login' }, { title: '姓名', dataIndex: 'name', diff --git a/public/react/src/modules/courses/poll/PollDetailIndex.js b/public/react/src/modules/courses/poll/PollDetailIndex.js index d3eebf62f..33f779591 100644 --- a/public/react/src/modules/courses/poll/PollDetailIndex.js +++ b/public/react/src/modules/courses/poll/PollDetailIndex.js @@ -118,6 +118,7 @@ class PollDetailIndex extends Component{ className={"font-16"} checkBoxValues={[this.props.match.params.pollId]} action={this.getPollInfo} + single={true} > :"" @@ -133,6 +134,7 @@ class PollDetailIndex extends Component{ className={"font-16"} checkBoxValues={[this.props.match.params.pollId]} action={this.getPollInfo} + single={true} > :"" diff --git a/public/react/src/modules/courses/poll/PollDetailTabSecond.js b/public/react/src/modules/courses/poll/PollDetailTabSecond.js index ad630eb0e..2523fcb5d 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabSecond.js +++ b/public/react/src/modules/courses/poll/PollDetailTabSecond.js @@ -63,16 +63,17 @@ class PollDetailTabSecond extends Component{ return(
    - - 第{parseInt(page-1)*parseInt(limit)+(key+1)}题: - ({map[item.question.question_type]}) + + {parseInt(page-1)*parseInt(limit)+(key+1)}、{map[item.question.question_type]} + { item.question.is_necessary==1 ? 必答:"" } + { item.question.question_type == 2 ? - { item.question.question_type == 2 ? + { item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : "可选"+item.question.min_choices+"-"+item.question.max_choices+"项" - :"" } - + :"" + }

    {item.question.question_title}

    diff --git a/public/react/src/modules/courses/poll/PollDetailTabThird.js b/public/react/src/modules/courses/poll/PollDetailTabThird.js index f06497fc9..4cecf3744 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabThird.js +++ b/public/react/src/modules/courses/poll/PollDetailTabThird.js @@ -68,15 +68,17 @@ class PollDetailTabThird extends Component{ pollDetail && pollDetail.questions.map((item,key)=>{ return(
    -

    - {map[item.question.question_type]}*Q{item.question.question_number} +

    + {item.question.question_number}、{map[item.question.question_type]} + { item.question.is_necessary==1 ? 必答:"" } + { item.question.question_type == 2 ? - { item.question.question_type == 2 ? + { item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : "可选"+item.question.min_choices+"-"+item.question.max_choices+"项" - :"" } - + :"" + }

  • {item.question.question_title}
  • { diff --git a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js index e74fe8204..3b7cfa2a4 100644 --- a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js +++ b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyEnd.js @@ -72,7 +72,7 @@ class ImmediatelyEnd extends Component{ visible:true, Topval:"学生将不能再提交试卷", // Botvalleft:"暂不截止", - Botval:`本操作只对"提交中"的分班有效`, + Botval:this.props.single ?`本操作只对"提交中"的分班有效`:"", // starttime:"发布时间:"+getNowFormatDate(1), // endtime:"截止时间:"+getNowFormatDate(2), Cancelname:"暂不截止", @@ -114,7 +114,7 @@ class ImmediatelyEnd extends Component{ visible:true, Topval:"学生将不能再提交问卷", // Botvalleft:"暂不截止", - Botval:`本操作只对"提交中"的分班有效`, + Botval:this.props.single ?`本操作只对"提交中"的分班有效`:"", // starttime:"发布时间:"+getNowFormatDate(1), // endtime:"截止时间:"+getNowFormatDate(2), Cancelname:"暂不截止", diff --git a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js index 8c472b417..c7585a390 100644 --- a/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js +++ b/public/react/src/modules/courses/poll/pollPublicBtn/ImmediatelyPublish.js @@ -80,7 +80,7 @@ class Immediatelypublish extends Component{ visible:true, Topval:"学生将立即收到试卷", // Botvalleft:"暂不发布", - Botval:`本操作只对"未发布"的分班有效`, + Botval:this.props.single ? "":`本操作只对"未发布"的分班有效`, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:this.props.getNowFormatDates(1), endtime:"截止时间:"+this.props.getNowFormatDates(2), @@ -119,7 +119,7 @@ class Immediatelypublish extends Component{ visible:true, Topval:"学生将立即收到问卷", // Botvalleft:"暂不发布", - Botval:`本操作只对"未发布"的分班有效`, + Botval:this.props.single ? "":`本操作只对"未发布"的分班有效`, starttime:"发布时间:"+moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttimes:this.props.getNowFormatDates(1), endtime:"截止时间:"+this.props.getNowFormatDates(2), diff --git a/public/react/src/modules/tpm/shixuns/ShixunCard.js b/public/react/src/modules/tpm/shixuns/ShixunCard.js index ba59418d2..7237f9e35 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunCard.js +++ b/public/react/src/modules/tpm/shixuns/ShixunCard.js @@ -9,7 +9,7 @@ import classNames from 'classnames'; // import { Rating,Loading} from '@icedesign/base'; -import {getImageUrl, toPath} from 'educoder'; +import {getImageUrl,setImagesUrl, toPath} from 'educoder'; // import { Pagination,Row,Col } from 'antd'; @@ -94,7 +94,7 @@ class ShixunCard extends Component { item.tag_name === null ? "":
    {item.tag_name} - +
    }
    @@ -105,7 +105,7 @@ class ShixunCard extends Component { {/**/} - +
    diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js index 2a1210faf..2ccb8744c 100644 --- a/public/react/src/modules/user/usersInfo/InfosShixun.js +++ b/public/react/src/modules/user/usersInfo/InfosShixun.js @@ -6,7 +6,7 @@ import Loadable from 'react-loadable'; import Loading from '../../../Loading'; import NoneData from '../../courses/coursesPublic/NoneData' import axios from 'axios'; -import {getImageUrl} from 'educoder'; +import {getImageUrl,setImagesUrl} from 'educoder'; import { TPMIndexHOC } from '../../tpm/TPMIndexHOC'; import { CNotificationHOC } from '../../courses/common/CNotificationHOC' import "./usersInfo.css" @@ -168,10 +168,10 @@ class InfosShixun extends Component{ return(
    this.turnToCourses(`/shixuns/${item.identifier}/challenges`)}> { - item.tag &&
    {item.tag}
    + item.tag &&
    {item.tag}
    } - Shixun6 +

    From 19f678e5972b581d7899f337b3a698ccc7b38de9 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, 25 Jun 2019 09:32:58 +0800 Subject: [PATCH 152/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/login/Trialapplication.js | 332 +++++++++--------- public/react/src/modules/tpm/NewHeader.js | 28 +- 2 files changed, 179 insertions(+), 181 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index 283574938..8b93fe88c 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -32,6 +32,7 @@ class Trialapplication extends Component { readonlyInput: true, user_phone_binded: false, showTrial: false, + user: undefined, } //user_phone_binded 判断是否手机号验证 // console.log("Trialapplication"); @@ -43,15 +44,32 @@ class Trialapplication extends Component { } componentWillReceiveProps(nextProps) { + // console.log("46"); + // console.log(nextProps); + // console.log(this.props); + if (nextProps.user != this.props.user) { + // console.log("50"); + // console.log(nextProps.user); + if (nextProps.user !== undefined) { + // console.log("53"); + // console.log(nextProps.user); + this.setState({ + user_phone_binded: nextProps.user.user_phone_binded, + }) + } + + + } } + //初始化数据 componentDidMount() { - console.log("53"); - - console.log(this.props.isRenders); + // console.log("53"); + // + // console.log(this.props.isRenders); if (this.props.isRenders != undefined) { this.setState({ @@ -77,21 +95,6 @@ class Trialapplication extends Component { //TODO 这里如果样式变了会出现css不加载的情况 }); - console.log(this.props.isRenders); - console.log("89"); - console.log(this.state.props.user_phone_binded ); - try { - if (this.state.props.user_phone_binded !== undefined) { - console.log(this.state.props.user_phone_binded); - this.setState({ - user_phone_binded: this.state.props.user_phone_binded, - }) - } - - } catch (e) { - console.log(e); - - } } @@ -384,154 +387,151 @@ class Trialapplication extends Component { diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 6ea5360b4..294339b54 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -170,7 +170,6 @@ class NewHeader extends Component { submitapplications:false, isRender:false, isRenders:false, - user_phone_binded:false, showTrial:false, } // console.log("176") @@ -209,18 +208,18 @@ class NewHeader extends Component { } componentDidUpdate = (prevProps) => { - if(prevProps.user!=this.props.user){ - // console.log("216") - // console.log(prevProps.user); - // console.log(this.props.user); - if(this.props.user !== undefined){ - this.setState({ - user_phone_binded :this.props.user.user_phone_binded, - }) - } - - - } + // if(prevProps.user!=this.props.user){ + // // console.log("216") + // // console.log(prevProps.user); + // // console.log(this.props.user); + // if(this.props.user !== undefined){ + // this.setState({ + // user_phone_binded :this.props.user.user_phone_binded, + // }) + // } + // + // + // } } componentWillReceiveProps(newProps, oldProps) { this.setState({ @@ -581,7 +580,6 @@ submittojoinclass=(value)=>{ user, isRender, isRenders, - user_phone_binded, }=this.state; /* 用户名称 用户头像url @@ -627,7 +625,7 @@ submittojoinclass=(value)=>{ {/* />*/} {/* :""*/} {/*}*/} - +

    {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} From 2a320fa7dbd6838819311315c6c1fd296462439d Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 25 Jun 2019 10:18:26 +0800 Subject: [PATCH 153/964] user --- .../react/src/modules/courses/members/studentsList.js | 10 ++++++++++ .../react/src/modules/courses/members/teacherList.js | 1 + 2 files changed, 11 insertions(+) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 3cb9bff77..cd97c6cfa 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -40,6 +40,15 @@ const buildColumns = (that) => { render: (id, student, index) => { return (that.state.page - 1) * 20 + index + 1 } + }, { + title: '用户id', + dataIndex: 'login', + key: 'login', + align:'center', + className:"color-grey-6", + // render: (name, record) => { + // return {name} + // } }, { title: '姓名', dataIndex: 'name', @@ -316,6 +325,7 @@ class studentsList extends Component{ }).then((result)=>{ if (result.data.status == 0) { this.props.showNotification('移动成功') + this.setState({checkBoxValues: []}) this.fetchAll() this.props.updataleftNavfun() diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index c9637f1f8..500665119 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -122,6 +122,7 @@ function buildColumns(that) { columns.push({ title: '操作', key: 'action', + align:'center', render: (text, record) => { if (record.application_id) { return ( From 30b735dc83b06caca717ac7ac9d68fd523f48ecc Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 25 Jun 2019 10:36:42 +0800 Subject: [PATCH 154/964] =?UTF-8?q?=E6=9C=AA=E7=99=BB=E5=BD=95=E7=A9=BA?= =?UTF-8?q?=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/graduation/tasks/GraduationTasksappraise.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index 18b51365e..f7f843feb 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -213,7 +213,7 @@ class GraduationTasksappraise extends Component{ {/*15M*/} {/*
    */} - {datalist&&datalist.attachments.map((item,key)=>{ + {datalist&& datalist.attachments && datalist.attachments.map((item,key)=>{ return(
    From 9f7f7483a811b4d25f168259d81fa9ae1f60753a Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 25 Jun 2019 10:44:43 +0800 Subject: [PATCH 155/964] score --- .../src/modules/courses/graduation/tasks/Graduationtaskitem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/Graduationtaskitem.js b/public/react/src/modules/courses/graduation/tasks/Graduationtaskitem.js index 98d80d042..28864521c 100644 --- a/public/react/src/modules/courses/graduation/tasks/Graduationtaskitem.js +++ b/public/react/src/modules/courses/graduation/tasks/Graduationtaskitem.js @@ -36,7 +36,7 @@ class Graduationtaskitem extends Component{ {item.time} {/* 分数 */} - {item.score}分 + {item.score && {item.score}分} { !item.is_invalid && item.delete && Date: Tue, 25 Jun 2019 11:07:06 +0800 Subject: [PATCH 156/964] vnc --- public/react/src/modules/page/MainContent.js | 11 +- public/react/src/modules/page/VNCDisplay.js | 288 +++++++++---------- 2 files changed, 152 insertions(+), 147 deletions(-) diff --git a/public/react/src/modules/page/MainContent.js b/public/react/src/modules/page/MainContent.js index bb1cd11fc..3fcaa55fd 100644 --- a/public/react/src/modules/page/MainContent.js +++ b/public/react/src/modules/page/MainContent.js @@ -33,7 +33,7 @@ class MainContent extends Component { } render() { const { challenge, output_sets, onRunCodeTest, latest_output, record, st, readRepoTimeout, - onTestSetHeaderClick, loading, codeLoading, shixun} = this.props + onTestSetHeaderClick, loading, codeLoading, shixun, vnc_url} = this.props // if (output_sets && output_sets.test_sets) { // const test_sets_array = JSON.parse("[" + output_sets.test_sets + "]"); @@ -86,9 +86,11 @@ class MainContent extends Component {
    */} - {/* { showIframeContent && vnc_url ? */} + > + : +
    @@ -143,6 +145,9 @@ class MainContent extends Component {
    + + + }
    diff --git a/public/react/src/modules/page/VNCDisplay.js b/public/react/src/modules/page/VNCDisplay.js index b8840fe02..1e443ed1d 100644 --- a/public/react/src/modules/page/VNCDisplay.js +++ b/public/react/src/modules/page/VNCDisplay.js @@ -1,154 +1,154 @@ -// import React, { Component } from 'react'; +import React, { Component } from 'react'; -// import RFB from '@novnc/novnc/lib/rfb.js'; +import RFB from '@novnc/novnc/lib/rfb.js'; -// const $ = window.$; -// // const showIframeContent = window.location.search.indexOf('vnc=1') != -1; -// class VNCDisplay extends Component { -// componentDidMount() { -// console.log(RFB) +const $ = window.$; +// const showIframeContent = window.location.search.indexOf('vnc=1') != -1; +class VNCDisplay extends Component { + componentDidMount() { + console.log(RFB) -// let rfb; -// let desktopName; -// // When this function is called we have -// // successfully connected to a server -// function connectedToServer(e) { -// status("Connected to " + desktopName); -// } -// // This function is called when we are disconnected -// function disconnectedFromServer(e) { -// if (e.detail.clean) { -// status("Disconnected"); -// } else { -// status("Something went wrong, connection is closed"); -// } -// } -// // When this function is called, the server requires -// // credentials to authenticate -// function credentialsAreRequired(e) { -// const password = prompt("Password Required:"); -// rfb.sendCredentials({ password: password }); -// } -// // When this function is called we have received -// // a desktop name from the server -// function updateDesktopName(e) { -// desktopName = e.detail.name; -// } -// // Since most operating systems will catch Ctrl+Alt+Del -// // before they get a chance to be intercepted by the browser, -// // we provide a way to emulate this key sequence. -// function sendCtrlAltDel() { -// rfb.sendCtrlAltDel(); -// return false; -// } -// // Show a status text in the top bar -// function status(text) { -// document.getElementById('status').textContent = text; -// } -// // This function extracts the value of one variable from the -// // query string. If the variable isn't defined in the URL -// // it returns the default value instead. -// function readQueryVariable(name, defaultValue) { -// // A URL with a query parameter can look like this: -// // https://www.example.com?myqueryparam=myvalue -// // -// // Note that we use location.href instead of location.search -// // because Firefox < 53 has a bug w.r.t location.search -// const re = new RegExp('.*[?&]' + name + '=([^&#]*)'), -// match = document.location.href.match(re); -// if (typeof defaultValue === 'undefined') { defaultValue = null; } -// if (match) { -// // We have to decode the URL since want the cleartext value -// return decodeURIComponent(match[1]); -// } -// return defaultValue; -// } -// document.getElementById('sendCtrlAltDelButton') -// .onclick = sendCtrlAltDel; -// // Read parameters specified in the URL query string -// // By default, use the host and port of server that served this file + let rfb; + let desktopName; + // When this function is called we have + // successfully connected to a server + function connectedToServer(e) { + status("Connected to " + desktopName); + } + // This function is called when we are disconnected + function disconnectedFromServer(e) { + if (e.detail.clean) { + status("Disconnected"); + } else { + status("Something went wrong, connection is closed"); + } + } + // When this function is called, the server requires + // credentials to authenticate + function credentialsAreRequired(e) { + const password = prompt("Password Required:"); + rfb.sendCredentials({ password: password }); + } + // When this function is called we have received + // a desktop name from the server + function updateDesktopName(e) { + desktopName = e.detail.name; + } + // Since most operating systems will catch Ctrl+Alt+Del + // before they get a chance to be intercepted by the browser, + // we provide a way to emulate this key sequence. + function sendCtrlAltDel() { + rfb.sendCtrlAltDel(); + return false; + } + // Show a status text in the top bar + function status(text) { + document.getElementById('status').textContent = text; + } + // This function extracts the value of one variable from the + // query string. If the variable isn't defined in the URL + // it returns the default value instead. + function readQueryVariable(name, defaultValue) { + // A URL with a query parameter can look like this: + // https://www.example.com?myqueryparam=myvalue + // + // Note that we use location.href instead of location.search + // because Firefox < 53 has a bug w.r.t location.search + const re = new RegExp('.*[?&]' + name + '=([^&#]*)'), + match = document.location.href.match(re); + if (typeof defaultValue === 'undefined') { defaultValue = null; } + if (match) { + // We have to decode the URL since want the cleartext value + return decodeURIComponent(match[1]); + } + return defaultValue; + } + document.getElementById('sendCtrlAltDelButton') + .onclick = sendCtrlAltDel; + // Read parameters specified in the URL query string + // By default, use the host and port of server that served this file -// // const host = readQueryVariable('host', window.location.hostname); -// // let port = readQueryVariable('port', window.location.port); -// // const password = readQueryVariable('password', ''); + // const host = readQueryVariable('host', window.location.hostname); + // let port = readQueryVariable('port', window.location.port); + // const password = readQueryVariable('password', ''); -// const { vnc_url } = this.props; -// // http://117.50.12.63:43149/vnc_lite.html?password=headless -// let _ar1 = vnc_url.split('/'); -// let ipAndPort = _ar1[2].split(':') -// let passwordAr = _ar1[3].split('password=') -// const host = ipAndPort[0] -// let port = ipAndPort[1] -// const password = passwordAr[1].split('&')[0] + const { vnc_url } = this.props; + // http://117.50.12.63:43149/vnc_lite.html?password=headless + let _ar1 = vnc_url.split('/'); + let ipAndPort = _ar1[2].split(':') + let passwordAr = _ar1[3].split('password=') + const host = ipAndPort[0] + let port = ipAndPort[1] + const password = passwordAr[1].split('&')[0] -// const path = readQueryVariable('path', 'websockify'); -// // | | | | | | -// // | | | Connect | | | -// // v v v v v v -// status("Connecting"); -// // Build the websocket URL used to connect -// let url; -// if (vnc_url.indexOf("https:") != -1) { -// url = 'wss'; -// } else { -// url = 'ws'; -// } -// url += '://' + host; -// if(port) { -// url += ':' + port; -// } -// url += '/' + path; -// // Creating a new RFB object will start a new connection -// rfb = new RFB(document.getElementById('screen'), url, -// { credentials: { password: password } }); -// // Add listeners to important events from the RFB module -// rfb.addEventListener("connect", connectedToServer); -// rfb.addEventListener("disconnect", disconnectedFromServer); -// rfb.addEventListener("credentialsrequired", credentialsAreRequired); -// rfb.addEventListener("desktopname", updateDesktopName); -// // Set parameters that can be changed on an active connection -// rfb.viewOnly = readQueryVariable('view_only', false); -// rfb.scaleViewport = readQueryVariable('scale', false); -// } + const path = readQueryVariable('path', 'websockify'); + // | | | | | | + // | | | Connect | | | + // v v v v v v + status("Connecting"); + // Build the websocket URL used to connect + let url; + if (vnc_url.indexOf("https:") != -1) { + url = 'wss'; + } else { + url = 'ws'; + } + url += '://' + host; + if(port) { + url += ':' + port; + } + url += '/' + path; + // Creating a new RFB object will start a new connection + rfb = new RFB(document.getElementById('screen'), url, + { credentials: { password: password } }); + // Add listeners to important events from the RFB module + rfb.addEventListener("connect", connectedToServer); + rfb.addEventListener("disconnect", disconnectedFromServer); + rfb.addEventListener("credentialsrequired", credentialsAreRequired); + rfb.addEventListener("desktopname", updateDesktopName); + // Set parameters that can be changed on an active connection + rfb.viewOnly = readQueryVariable('view_only', false); + rfb.scaleViewport = readQueryVariable('scale', false); + } -// render() { -// const { challenge, vnc_url } = this.props + render() { + const { challenge, vnc_url } = this.props -// return ( -//
    -// -//
    -//
    Loading
    -//
    Send CtrlAltDel
    -//
    -//
    -//
    -// ); -// } -// } + return ( +
    + +
    +
    Loading
    +
    Send CtrlAltDel
    +
    +
    +
    + ); + } +} -// export default VNCDisplay; +export default VNCDisplay; From 618efb6df1ad1118eb9a5c6cb867d25c13f6664a 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, 25 Jun 2019 11:10:49 +0800 Subject: [PATCH 157/964] =?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/shixunHomework/Listofworks.js | 21 +- .../shixunHomework/Listofworksstudentone.js | 6 +- .../TraineetraininginformationModal.js | 198 ++- public/react/src/modules/forums/Post.css | 439 ++--- .../react/src/modules/forums/RightSection.css | 5 + public/react/src/modules/login/LoginDialog.js | 2 +- public/stylesheets/educoder/edu-main.css | 1569 +++++++++-------- 7 files changed, 1132 insertions(+), 1108 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 62953fedb..2a636aa70 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -91,6 +91,7 @@ class Listofworks extends Component { unlimited: 0, unlimitedtwo: 1, code_review: false, + boolgalist:false, columns: [ { title: '序号', @@ -778,7 +779,7 @@ class Listofworks extends Component { // console.log(JSON.stringify(result)) let datalist = []; var game_list = result.data.game_list - + var boolgalist=false; for (var i = 0; i < game_list.length; i++) { datalist.push({ @@ -789,6 +790,10 @@ class Listofworks extends Component { complete_status: game_list[i].complete_status, }) + if(game_list[i].complete_status === 1){ + boolgalist=true; + } + } // console.log("viewtraining"); // console.log(datalist); @@ -796,7 +801,8 @@ class Listofworks extends Component { this.setState({ viewtrainingdata: result.data, visibles: true, - game_list: datalist + game_list: datalist, + boolgalist:boolgalist, }) } }).catch((error) => { @@ -1001,7 +1007,7 @@ class Listofworks extends Component { render() { // console.log("Listofworks.js000") - let {columns, page, limit, course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state; + let {columns, page, boolgalist,limit, course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state; // // console.log(teacherdata&&teacherdata.shixun_identifier) // console.log(course_group_info) @@ -1045,6 +1051,7 @@ class Listofworks extends Component { viewtrainingdata={viewtrainingdata} game_list={game_list} visible={visibles} + boolgalist={boolgalist} Cancel={() => this.cancelModulationModels()} /> @@ -1080,12 +1087,12 @@ class Listofworks extends Component { > {jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name} + to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"":jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name} > 作业详情

    -
    +

    {teacherdata === undefined ? "" : teacherdata.homework_name}

    @@ -1101,7 +1108,7 @@ class Listofworks extends Component {
    -
    +
    {/*请输入姓名或学号搜索*/} -
    +
    作业详情

    -
    +

    {teacherdata === undefined ? "" : teacherdata.homework_name}

    @@ -696,11 +696,11 @@ class Listofworksstudentone extends Component { typelist={teacherdata === undefined ? [""] : teacherdata.homework_status} /> 返回 + href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id===undefined?"":jobsettingsdata.data.category.category_id}`}>返回

    -
    +
    { -// -// console.log(datalist) -// } + LimitNumber=(txt)=> { + var str = txt; + if(str.length>25){ + str = str.substring(0,25)+"......" + } + return str; + } render() { - const columns = [ + var columns; + if(this.props.boolgalist === true) { + columns = [ { title: '关卡', dataIndex: 'number', key: 'number', + width: 92, align: "center", render: (text, record) => ( - - {record.number} + + {record.number} ), }, - { - title: '完成时间', - dataIndex: 'name', - key: 'name', - width: 178, - align: "center", - render: (text, record) => ( - - {record.name==='Invalid date'?"--":record.name} + { + title: '完成时间', + dataIndex: 'name', + key: 'name', + width: 178, + align: "center", + render: (text, record) => ( + + {record.name === 'Invalid date' ? "--" : record.name} - ), - }, - { - title: '耗时', - dataIndex: 'stduynumber', - key: 'stduynumber', - align: "center", - render: (text, record) => ( - - {record.stduynumber} + ), + }, + { + title: '', + dataIndex: 'complete_status', + key: 'complete_status', + width: 100, + align: "center", + render: (text, record) => ( + + {record.complete_status === 2 ? : record.complete_status === 3 ? + : ""} + - ), - }, - { - title: '经验值', - key: 'classroom', - dataIndex: 'classroom', - align: "center", - render: (text, record) => ( - - {record.classroom} + ), + }, + { + title: '耗时', + dataIndex: 'stduynumber', + key: 'stduynumber', + width: 92, + align: "center", + render: (text, record) => ( + + {record.stduynumber} - ), - } - ]; - const columnss = [ + ), + }, { - title: '关卡', - dataIndex: 'number', - key: 'number', + title: '经验值', + key: 'classroom', width: 92, + dataIndex: 'classroom', align: "center", render: (text, record) => ( - + + {record.classroom} + + ), + } + ] + } + else { + columns = [ + { + title: '关卡', + dataIndex: 'number', + key: 'number', + align: "center", + render: (text, record) => ( + {record.number} - ), - }, - { - title: '完成时间', - dataIndex: 'name', - key: 'name', - width: 178, - align: "center", - render: (text, record) => ( - + ), + }, + { + title: '完成时间', + dataIndex: 'name', + key: 'name', + width: 178, + align: "center", + render: (text, record) => ( + {record.name==='Invalid date'?"--":record.name} - ), - }, - { - title: '', - dataIndex: 'complete_status', - key: 'complete_status', - width: 100, - align: "center", - render: (text, record) => ( - - {record.complete_status===2?:record.complete_status===3?:""} - - - ), - }, - { - title: '耗时', - dataIndex: 'stduynumber', - key: 'stduynumber', - width: 92, - align: "center", - render: (text, record) => ( - + ), + }, + { + title: '耗时', + dataIndex: 'stduynumber', + key: 'stduynumber', + align: "center", + render: (text, record) => ( + {record.stduynumber} - ), - }, - { - title: '经验值', - key: 'classroom', - width: 92, - dataIndex: 'classroom', - align: "center", - render: (text, record) => ( - + ), + }, + { + title: '经验值', + key: 'classroom', + dataIndex: 'classroom', + align: "center", + render: (text, record) => ( + {record.classroom} - ), + ), + } + ] } - ]; - return (
    - {this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_name} + {this.props.viewtrainingdata === undefined ? "" : this.LimitNumber(this.props.viewtrainingdata.shixun_name)} 经验值: {this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score}
    {/**/} diff --git a/public/react/src/modules/forums/Post.css b/public/react/src/modules/forums/Post.css index 51d88dfe1..d10857a60 100644 --- a/public/react/src/modules/forums/Post.css +++ b/public/react/src/modules/forums/Post.css @@ -1,220 +1,221 @@ -/*MemoDetail --------------------------------- START */ -.educontent { - margin-bottom: 20px; -} -/* 左侧区域最小高度*/ -#forum_index_list { - min-height: 400px; - position: relative; -} - .noMemosTip { - position: absolute; - right: 10px; - top: 58px; - z-index: 999; - } -#forum_list { - background: #f9f9f9; -} - #forum_list .return_btn { - line-height: 38px; - /* margin-right: 15px; */ - font-size: 14px; - cursor: pointer; - } - #forum_list .return_btn.no_mr { - margin-right: -16px; - } - div#forum_list>div { - background: #fff; - } -.memoContent img { - max-width: 815px; -} -.memoReplies { - position: relative; - margin-top: 8px; -} - .memoReplies .-fit { - position: static; - } - .replies_count { - margin-left: 12px; - } - .replies_count .label { - color: #666666; - } - .replies_count .count { - color: #999999; - margin-left: 10px; - } - - .memoMore { - padding-top: 10px; - height: 50px; - line-height: 50px; - text-align: center; - color: rgba(69,155,230,1); - cursor: pointer; - position: relative; - } - .memoMore .writeCommentBtn{ - position: absolute; - right: 0px; - color: #666666; - top: 15px; - } - .memoMore .writeCommentBtn:hover { - color: #4DACFF; - } -/*使用md編輯器用为子回复时,宽度会变*/ -.panel-comment_item .comment_orig_content { - width: 705px; -} - -.iconfont.icon-xiazai { - font-size: 22px!important; - margin-right: 6px; -} -/* MemoDetail --------------------------------- END */ - -/* PostItem --------------------------------- START */ -.forum_table_item { - padding-left: 20px; -} - /* 置顶 */ - .forum_table_item .btn-top { - border-radius: 11px; - padding: 0px 6px; - background: #FF4343; - - } - -/* 管理员操作 */ -.edu-position-hide { - position: absolute; - top: 15px; - left: -20px; - box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); - background: #fff; - z-index: 1001; - padding: 5px 0; - z-index: 999999; -} - .edu-position-hide li a:hover { - background: #4CACFF; - color: #fff; - } -.edu-position-hidebox>a:link{ - color: #4CACFF; -} - .edu-position-hidebox:hover .edu-position-hide { - display: block; - } - .edu-position-hide li a { - display: inline-block; - height: 30px; - width: 100px; - line-height: 30px; - text-align: center; - font-size: 12px!important; - } -/* PostItem --------------------------------- END */ - - -/* MemoNew --------------------------------- START */ - -#attachments_fields div.ui-progressbar { - width: 120px; - height: 10px; - margin: 2px 0 -2px 8px; - display: inline-block; -} -.ui-widget-header { - border: 1px solid #4CACFF; - background: #4CACFF; -} -.iconfont.icon-fujian { - color: #29BD8B -} - -/* rc-select样式覆写*/ -.ecSelect { - width: 300px; -} -.ecSelect .rc-select-selection { - height: 40px; -} - .ecSelect .rc-select-search--inline .rc-select-search__field { - padding-top: 6px; - } - .ecSelect .rc-select-selection--single .rc-select-selection-selected-value - , .ecSelect .rc-select-selection__placeholder { - top: 6px; - - } - .ecSelect .rc-select-arrow { - top: 6px; - } -.defalutCancelbtn { - cursor: pointer; -} -.defalutSubmitbtnysl{ - display: block;border: 1px solid #4CACFF;background-color: #4CACFF;color: #fff!important;width: 120px;text-align: center;line-height: 40px;border-radius: 2px; - width: 130px; - height: 40px; - background: rgba(76,172,255,1); - border-radius: 4px; - font-size: 16px; - font-family: MicrosoftYaHei; - font-weight: 400; - color: rgba(255,255,255,1); -} -#attachments_fields { - margin-left: -77px; - display: flex; - flex-direction: column; -} -.uploadBtn { - /* margin-left: 46px; */ -} -#memoMD.show_content_grey { - padding: 0; -} -.newForm .attachments_fields { - /*margin-left: -39px !important*/ -} -#attachments_fields div.ui-progressbar { - width: 120px; - height: 10px; - margin: 2px 0 -2px 8px; - display: inline-block; -} -.ui-progressbar-value.ui-widget-header { - border: 1px solid #4CACFF; - background: #4CACFF; -} -/* MemoNew --------------------------------- END */ - - -/*RightMyPublish*/ -.publishMemoSection { - padding-bottom: 0px !important; -} -.advertisement { - margin-top: 10px; - height: 155px; -} -.advertisement img{ - width: 100%; -} - -/* MyPublish*/ -.returnBtn { - font-size:16px; - color:rgba(153,153,153,1); - float: right; - margin-right: 50px; - position: relative; - bottom: 12px; +/*MemoDetail --------------------------------- START */ +.educontent { + margin-bottom: 20px; +} + +/* 左侧区域最小高度*/ +#forum_index_list { + min-height: 400px; + position: relative; +} + .noMemosTip { + position: absolute; + right: 10px; + top: 58px; + z-index: 999; + } +#forum_list { + background: #f9f9f9; +} + #forum_list .return_btn { + line-height: 38px; + /* margin-right: 15px; */ + font-size: 14px; + cursor: pointer; + } + #forum_list .return_btn.no_mr { + margin-right: -16px; + } + div#forum_list>div { + background: #fff; + } +.memoContent img { + max-width: 815px; +} +.memoReplies { + position: relative; + margin-top: 8px; +} + .memoReplies .-fit { + position: static; + } + .replies_count { + margin-left: 12px; + } + .replies_count .label { + color: #666666; + } + .replies_count .count { + color: #999999; + margin-left: 10px; + } + + .memoMore { + padding-top: 10px; + height: 50px; + line-height: 50px; + text-align: center; + color: rgba(69,155,230,1); + cursor: pointer; + position: relative; + } + .memoMore .writeCommentBtn{ + position: absolute; + right: 0px; + color: #666666; + top: 15px; + } + .memoMore .writeCommentBtn:hover { + color: #4DACFF; + } +/*使用md編輯器用为子回复时,宽度会变*/ +.panel-comment_item .comment_orig_content { + width: 705px; +} + +.iconfont.icon-xiazai { + font-size: 22px!important; + margin-right: 6px; +} +/* MemoDetail --------------------------------- END */ + +/* PostItem --------------------------------- START */ +.forum_table_item { + padding-left: 20px; +} + /* 置顶 */ + .forum_table_item .btn-top { + border-radius: 11px; + padding: 0px 6px; + background: #FF4343; + + } + +/* 管理员操作 */ +.edu-position-hide { + position: absolute; + top: 15px; + left: -20px; + box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); + background: #fff; + z-index: 1001; + padding: 5px 0; + z-index: 999999; +} + .edu-position-hide li a:hover { + background: #4CACFF; + color: #fff; + } +.edu-position-hidebox>a:link{ + color: #4CACFF; +} + .edu-position-hidebox:hover .edu-position-hide { + display: block; + } + .edu-position-hide li a { + display: inline-block; + height: 30px; + width: 100px; + line-height: 30px; + text-align: center; + font-size: 12px!important; + } +/* PostItem --------------------------------- END */ + + +/* MemoNew --------------------------------- START */ + +#attachments_fields div.ui-progressbar { + width: 120px; + height: 10px; + margin: 2px 0 -2px 8px; + display: inline-block; +} +.ui-widget-header { + border: 1px solid #4CACFF; + background: #4CACFF; +} +.iconfont.icon-fujian { + color: #29BD8B +} + +/* rc-select样式覆写*/ +.ecSelect { + width: 300px; +} +.ecSelect .rc-select-selection { + height: 40px; +} + .ecSelect .rc-select-search--inline .rc-select-search__field { + padding-top: 6px; + } + .ecSelect .rc-select-selection--single .rc-select-selection-selected-value + , .ecSelect .rc-select-selection__placeholder { + top: 6px; + + } + .ecSelect .rc-select-arrow { + top: 6px; + } +.defalutCancelbtn { + cursor: pointer; +} +.defalutSubmitbtnysl{ + display: block;border: 1px solid #4CACFF;background-color: #4CACFF;color: #fff!important;width: 120px;text-align: center;line-height: 40px;border-radius: 2px; + width: 130px; + height: 40px; + background: rgba(76,172,255,1); + border-radius: 4px; + font-size: 16px; + font-family: MicrosoftYaHei; + font-weight: 400; + color: rgba(255,255,255,1); +} +#attachments_fields { + margin-left: -77px; + display: flex; + flex-direction: column; +} +.uploadBtn { + /* margin-left: 46px; */ +} +#memoMD.show_content_grey { + padding: 0; +} +.newForm .attachments_fields { + /*margin-left: -39px !important*/ +} +#attachments_fields div.ui-progressbar { + width: 120px; + height: 10px; + margin: 2px 0 -2px 8px; + display: inline-block; +} +.ui-progressbar-value.ui-widget-header { + border: 1px solid #4CACFF; + background: #4CACFF; +} +/* MemoNew --------------------------------- END */ + + +/*RightMyPublish*/ +.publishMemoSection { + padding-bottom: 0px !important; +} +.advertisement { + margin-top: 10px; + height: 155px; +} +.advertisement img{ + width: 100%; +} + +/* MyPublish*/ +.returnBtn { + font-size:16px; + color:rgba(153,153,153,1); + float: right; + margin-right: 50px; + position: relative; + bottom: 12px; } \ No newline at end of file diff --git a/public/react/src/modules/forums/RightSection.css b/public/react/src/modules/forums/RightSection.css index 73994ae24..bce57c68a 100644 --- a/public/react/src/modules/forums/RightSection.css +++ b/public/react/src/modules/forums/RightSection.css @@ -8,6 +8,11 @@ height: 30px; margin-bottom: 30px; margin-right: 35px; +} +.search-newysl { + width:237px!important; + height: 30px; + margin-bottom: 30px; } .search-new-input { padding-left: 16px; diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 1dcfd1386..82d3406ad 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -319,7 +319,7 @@ class LoginDialog extends Component { this.setState({ isRender: false }) - window.location.href="/"; + // window.location.href="/"; } loginEDU=()=>{ diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css index 314c17417..074c4ed89 100644 --- a/public/stylesheets/educoder/edu-main.css +++ b/public/stylesheets/educoder/edu-main.css @@ -1,784 +1,785 @@ -/*整体公用样式--------------主题颜色为蓝色#459be5,字体颜色为#05101a*/ -@charset "utf-8"; -body{font-size:14px; line-height:2.0;background:#fafafa!important;font-family: "微软雅黑","宋体"; color:#05101a;height: 100%;position: relative; -} -html,body{height:100%;} -body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td,span{ margin:0; padding:0;} -table,input,textarea,select,button {outline: none;border-radius: 3px; font-family: "微软雅黑","宋体"; font-size:14px;line-height:1.9;border:1px solid #eaeaea;background: #FFFFff; color:#05101A;} -textarea{resize: none;} -/*设置input框的placehoder的字体颜色*/ -input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color: #cccccc} -input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;} -input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;} -input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#cccccc;} - -div,img,tr,td,table{ border:0;} -a:link,a:visited{text-decoration:none; color:#05101a;} -a:hover {color:#459be5;} -ol, ul, li {list-style-type: none;} -select:disabled,input:disabled{background-color: #EEEEEE;} -/*万能清除浮动*/ -.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden;} -.clearfix{clear:both;zoom:1} -.cl{ clear: both; overflow: hidden;} -/*通用浮动*/ -.fl{ float: left!important;} -.fr{ float: right!important;} -/*pre标签换行*/ -.break-word{word-break: break-all;word-wrap: break-word;} -.break-word-firefox{white-space: pre-wrap !important;word-break: break-all;} -/*文字左右两端对齐*/ -.justify{text-align: justify} -.indent{text-indent: 2em;} - -.edu-name-dark{ max-width:100px; display: block; } -.edu-info-dark{ max-width:345px; display: block; } -.edu-max-h200{ height:200px; overflow: auto;} -.edu-h260{ height:260px;} -.edu-h270{ height:270px;} -.edu-h310{ height:310px;} -.edu-position{ position: relative;} -.edu-h200-auto{ max-height:200px; overflow:auto;} -.edu-h300-auto{ max-height:300px; overflow:auto;} -.edu-h350-auto{ max-height:350px; overflow:auto;} -.edu-h280-auto{ height:280px; overflow:auto;} -.edu-txt-w240{ width:240px; display: block;} -.edu-txt-w280{ width:280px; display: block;} -.edu-txt-w320{ width:320px; display: block;} -.edu-txt-w200{ width:200px; display: block;} -a.edu-txt-w280,.edu-txt-w280{ width:280px; display: inline-block;text-align: center} -a.edu-txt-w190,.edu-txt-w190{ width:190px; display: inline-block;text-align: center} -a.edu-txt-w160,.edu-txt-w160{ width:160px; display: inline-block;text-align: center} -a.edu-txt-w140,.edu-txt-w140{ width:141px; display: inline-block;text-align: center} -a.edu-txt-w130,.edu-txt-w130{ width:130px; display: inline-block;text-align: center} -a.edu-txt-w120,.edu-txt-w120{ width:120px; display: inline-block;text-align: center} -a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;text-align: center} -a.edu-txt-w90,.edu-txt-w90{ width:90px; display: inline-block;text-align: center} -a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center} - -/*超过隐藏*/ -.overellipsis{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} -.task-hide{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} -.task-hide-2{overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;} -/*隐藏*/ -.none{display: none} -.block{ display:block;} - -.boxsizing{box-sizing: border-box} - - -/*字体icon均为18px*/ -.iconfont{font-size: 18px!important;} -/*通用文字大小样式*/ -.font-n{font-weight: normal!important;} -.font-bd{font-weight: bold;} -.font-n{font-weight: normal;} -.font-12{ font-size: 12px!important;} -.font-13{ font-size: 13px!important;} -.font-14{ font-size: 14px!important;} -.font-15{ font-size: 15px!important;} -.font-16{ font-size: 16px!important;} -.font-17{ font-size: 17px!important;} -.font-18{ font-size: 18px!important;} -.font-20{ font-size: 20px!important;} -.font-22{ font-size: 22px!important;} -.font-24{ font-size: 24px!important;} -.font-26{ font-size: 26px!important;} -.font-28{ font-size: 28px!important;} -.font-30{ font-size: 30px!important;} -.font-32{ font-size: 32px!important;} -.font-36{ font-size: 36px!important;} -.font-50{ font-size: 50px!important;} -.font-60{ font-size: 60px!important;} -.font-70{ font-size: 70px!important;} - -/*a标签的下划线*/ -a.decoration{text-decoration: underline} - -/*表单*/ -.panel-form-label{ display:inline-block; width:10%; min-width:90px; text-align:right; line-height:40px; font-weight: normal; } - -/*通用内外边距*/ -.mt-10{ margin-top:-10px;}.mt-3{ margin-top:-3px;}.mt0{ margin-top:0px!important;} .mt1{ margin-top:1px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px!important;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px!important;}.mt8{ margin-top:8px;}.mt9{ margin-top:9px;}.mt10{ margin-top:10px!important;}.mt12{ margin-top:12px;}.mt13{ margin-top:13px;}.mt14{ margin-top:14px;}.mt15{ margin-top:15px!important;}.mt16{ margin-top:16px;}.mt17{ margin-top:17px;}.mt18{ margin-top:18px;}.mt20{ margin-top:20px!important;}.mt22{ margin-top:22px!important;}.mt23{ margin-top:23px!important;}.mt24{ margin-top:24px!important;}.mt25{ margin-top:25px;}.mt28{ margin-top:28px;}.mt30{ margin-top:30px!important;}.mt34{ margin-top:34px!important;}.mt35{ margin-top:35px!important;}.mt36{ margin-top:36px!important;}.mt40{ margin-top:40px;}.mt45{ margin-top:45px;}.mt46{ margin-top:46px;}.mt50{ margin-top:50px;!important;}.mt56{ margin-top:56px;!important;}.mt60{ margin-top:60px;}.mt70{ margin-top:70px;}.mt80{ margin-top:80px;}.mt95{ margin-top:95px;}.mt100{ margin-top:100px;}.mt110{ margin-top:110px;}.mt120{ margin-top:120px;}.mt130{ margin-top:130px;}.mt140{ margin-top:140px;}.mt150{ margin-top:150px;}.mt160{ margin-top:160px;} -.mb0{margin-bottom: 0px!important;}.mb3{ margin-bottom: 3px;}.mb5{ margin-bottom: 5px;}.mb7{ margin-bottom: 7px;}.mb10{ margin-bottom: 10px;}.mb11{ margin-bottom: 11px;}.mb14{ margin-bottom: 14px;}.mb15{ margin-bottom: 15px;}.mb16{ margin-bottom: 16px;}.mb20{ margin-bottom: 20px!important;}.mb25{ margin-bottom: 25px;}.mb26{ margin-bottom: 26px;}.mb28{ margin-bottom: 28px;}.mb30{ margin-bottom: 30px!important;}.mb40{ margin-bottom: 40px!important;}.mb50{ margin-bottom: 50px!important;}.mb60{ margin-bottom: 60px!important;}.mb70{ margin-bottom: 70px!important;}.mb80{ margin-bottom: 80px!important;}.mb90{ margin-bottom: 90px!important;}.mb100{ margin-bottom: 100px!important;}.mb110{ margin-bottom: 110px;} -.ml-3{ margin-left: -3px;}.ml1{margin-left: 1px;}.ml2{margin-left: 2px;}.ml3{margin-left: 3px;}.ml4{margin-left: 4px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml12{ margin-left:12px!important;}.ml13{ margin-left:13px!important;}.ml15{ margin-left: 15px;}.ml18{ margin-left: 18px;}.ml20{ margin-left: 20px;}.ml22{ margin-left: 22px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml45{ margin-left: 45px;}.ml50{ margin-left: 50px;}.ml55{ margin-left: 55px;}.ml60{ margin-left: 60px;}.ml72{ margin-left: 72px;}.ml73{ margin-left: 73px;}.ml75{ margin-left: 75px;}.ml80{ margin-left: 80px;}.ml85{margin-left:85px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml123{ margin-left: 123px;}.ml150{ margin-left: 150px;}.ml180{ margin-left: 180px;}.ml230{ margin-left: 230px;}.ml240{margin-left: 240px;}.ml250{ margin-left: 250px;}.ml290{ margin-left: 290px;} -.mr3{margin-right: 3px}.mr4{margin-right: 4px}.mr5{ margin-right: 5px;}.mr8{ margin-right: 8px;}.mr10{ margin-right: 10px;}.mr12{ margin-right:12px!important;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr24{ margin-right: 24px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr35{margin-right:35px;}.mr40{margin-right:40px;}.mr45{margin-right:45px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}.mr70{ margin-right: 70px;}.mr75{ margin-right: 75px;}.mr80{ margin-right:80px;}.mr90{ margin-right:90px;}.mr100{ margin-right: 100px;}.mr110{ margin-right:110px;}.mr350{ margin-right:350px;} - -.pt1{ padding-top:1px;}.pt3{ padding-top:3px!important;}.pt5{ padding-top:5px!important;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt17{ padding-top:17px;}.pt20{ padding-top:20px!important;}.pt25{ padding-top:25px;}.pt30{ padding-top:30px;}.pt35{ padding-top:35px;}.pt37{ padding-top:37px;}.pt40{ padding-top:40px;}.pt47{ padding-top:47px;}.pt49{ padding-top:49px;}.pt50{ padding-top:50px;}.pt60{ padding-top:60px;}.pt70{ padding-top:70px;}.pt80{ padding-top:80px;}.pt90{ padding-top:90px;}.pt100{padding-top:100px;}.pt110{ padding-top:110px;}.pt120{ padding-top:120px;}.pt130{padding-top:130px;} -.pb3{ padding-bottom:3px!important;}.pb5{ padding-bottom:5px!important;}.pb10{ padding-bottom:10px;}.pb15{ padding-bottom:15px;}.pb20{ padding-bottom:20px;}.pb25{ padding-bottom:20px;}.pb25{ padding-bottom:20px;}.pb30{ padding-bottom:30px;}.pb35{ padding-bottom:35px;}.pb40{ padding-bottom:40px;}.pb47{ padding-bottom:47px;}.pb50{ padding-bottom:50px;}.pb60{ padding-bottom:60px;}.pb70{ padding-bottom:70px;}.pb80{ padding-bottom:80px;}.pb90{ padding-bottom:90px;}.pb100{ padding-bottom:100px;}.pb110{ padding-bottom:110px;}.pb155{ padding-bottom:155px;} -.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr30{ padding-right:30px!important;}.pr35{ padding-right:35px!important;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}.pr48{ padding-right:48px;}.pr57{ padding-right:57px;}.pr60{ padding-right:60px;}.pr70{ padding-right:70px;}.pr72{ padding-right:72px;}.pr75{ padding-right:75px;}.pr88{ padding-right:88px;} - -.pl0{ padding-left:0px!important;}.pl2{ padding-left:2px;}.pl5{ padding-left:5px;}.pl7{ padding-left:7px;}.pl8{ padding-left:8px;}.pl10{ padding-left:10px;}.pl15{ padding-left:15px;}.pl20{ padding-left:20px;}.pl22{ padding-left:22px;}.pl25{ padding-left:25px;}.pl28{ padding-left:28px;}.pl30{ padding-left:30px !important;}.pl33{padding-left: 33px}.pl35{ padding-left:35px;}.pl40{ padding-left:40px;}.pl42{ padding-left:42px;}.pl45{ padding-left:45px;}.pl50{ padding-left:50px;}.pl60{ padding-left:60px;}.pl70{padding-left:70px;}.pl75{padding-left:75px;}.pl80{padding-left:80px;}.pl88{ padding-left:88px;}.pl92{padding-left:92px;}.pl100{ padding-left:100px;} -.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr7{ padding-right:7px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr25{ padding-right:25px!important;}.pr30{ padding-right:30px!important;}.pr40{ padding-right:40px;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}.pr60{padding-right:60px;}.pr75{padding-right:75px;} - - -.padding5-10{padding:5px 10px;box-sizing: border-box} -.padding5-20{padding:5px 20px;box-sizing: border-box} -.padding10{padding: 10px;box-sizing: border-box} -.padding15{padding: 15px;box-sizing: border-box} -.padding20{padding: 20px;box-sizing: border-box} -.padding10-20{padding: 10px 20px;box-sizing: border-box} -.padding10-15{padding: 10px 15px;box-sizing: border-box} -.padding10-25{padding: 10px 25px;box-sizing: border-box} -.padding10-30{padding: 10px 30px;box-sizing: border-box} - -.padding15-20{padding: 15px 20px;box-sizing: border-box} -.padding15-25{padding: 15px 25px;box-sizing: border-box} - -.padding20-40{padding: 20px 40px;box-sizing: border-box} -.padding20-30{padding: 20px 30px;box-sizing: border-box} -.padding20-15{padding: 20px 15px;box-sizing: border-box} -.padding20-10{padding: 20px 10px;box-sizing: border-box} - -.padding30{padding: 30px;box-sizing: border-box} -.padding30-20{padding: 30px 20px;box-sizing: border-box} -.padding30-40{padding: 30px 40px;box-sizing: border-box} - -.padding40{padding: 40px;box-sizing: border-box} -.padding40-30{padding: 40px 30px;box-sizing: border-box} -.padding40-20{padding: 40px 20px;box-sizing: border-box} - -.margin10{margin:10px;} -.margin15{margin:15px;} -.margin20{margin:20px;} - -/*行高*/ -.lineh-12{line-height: 12px} -.lineh-15{line-height: 15px} -.lineh-17{line-height: 17px} -.lineh-20{line-height: 20px} -.lineh-25{line-height: 25px} -.lineh-30{line-height: 30px} -.lineh-35{line-height: 35px} -.lineh-40{line-height: 40px} - -/*pre标签换行*/ -.break_word{word-break: break-all;word-wrap: break-word;} -.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;} -/*定位*/ -.pr{position: relative} -.df {display:flex;display: -webkit-flex;display: -ms-flex;} -.flex1{flex: 1;} -/*去掉IE input框输入时自带的清除按钮*/ -input::-ms-clear{display:none;} -/*自定义滚动条宽度*/ -::-webkit-scrollbar {width:7px;height:10px;background-color: #F5F5F5; } -::-webkit-scrollbar-track {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);background-color: #F5F5F5;} -::-webkit-scrollbar-thumb {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);background-color: #dadada;} - - -.newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;} -.educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/ -.newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;padding-top: 60px}/*padding-bottom根据底部的高度而定*/ - -/*高度*/ -.height-100{height: 100%;} -/*文本位置*/ -.edu-txt-center{ text-align: center!important;} -.edu-txt-left{ text-align: left!important;} -.edu-txt-right{ text-align: right!important;} - -/*背景颜色*/ -.edu-back-white{background-color:#FFFFff; } -.edu-back-greyf5{background-color: #f5f5f5!important;} -.edu-back-skyblue{background: #F4FAFF;} -.edu-back-blue{background-color:#459be6!important; } -.edu-back-blue-txt{background-color:#F7FBFF!important; } -.edu-bg-light-blue{ background:#f7f9fd; padding:5px;}/*发送实训弹框*/ -/*常用字体*/ -/*红色*/ -.color-red{color: #FF0000!important;} -/*白色*/ -.color-white{color: #ffffff!important;} -/*黑色*/ -.color-dark{color: #05101a!important;} -/*灰色*/ -.color-grey-name{color: #1A0B00!important;} -.color-grey-fa{color: #FAFAFA!important;} -.color-grey-3{color: #333!important;} -.color-grey-eb{color: #EBEBEB!important;} -.color-grey-c{color: #ccc!important;} -.color-grey-cd{color: #cdcdcd!important;} -.color-grey-9{color: #999999!important;} -.color-grey-98{color: #989898!important;} -.color-grey-8{color: #888!important;} -.color-grey-6{color: #666!important;} -.color-grey-4d{color: #4d4d4d!important;} -.color-grey-B2{color: #B2B2B2!important;} -.color-grey-B3{color: #B3B3B3!important;} -.color-grey-B4{color: #B4B4B4!important;} -.color-grey-74{color: #747A7F!important;} - - -a.color-grey-name:hover,a.color-dark:hover,a.color-grey-6:hover,a.color-grey-3:hover{color: #4cacff!important;} -a.color-grey-9:hover,a.color-grey-8:hover,a.color-grey-c:hover{color: #111C24!important;} -/*蓝色*/ -.color-blue{color: #4CACFF!important;}/*主*/ -.color-blue_4C{color: #4CACFF!important;} -a.color-blue:hover,a.color-blue_4C:hover{color: #459BE6!important;} -/*橙色*/ -.color-orange{color: #ff6800!important;}/*辅助文字*/ -.color-orange-tip{color: #FF954C!important;}/*提示文字*/ -a.color-orange:hover,a.color-orange-tip:hover{color: #F06200!important;} -/*黄色*/ -.color-yellow{color: #EFC003!important;} -.color-yellow-ff{color: #FFA800!important} -/*绿色*/ -.color-green{color: #29BD8B!important;} -a.color-green:hover{color: #28AC7F!important;} -/*红色*/ -.color-red-dd{color: #DD1717!important;} -a.color-red-dd:hover{color: #C61616!important;} -/*圆角*/ -.radius{border-radius: 50%;} -.radius4{border-radius: 4px;} -.radius2{border-radius: 2px;} - - -/*绿色圆形--例如:实训路径详情的编辑icon的背景*/ -.ring-green{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: #29BD8B;text-align: center;} -.ring-op-green{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: rgba(41,189,139,0.6);text-align: center;} -.ring-grey{width: 18px;height: 18px;line-height: 18px;display: block;border-radius: 50%;background-color:rgba(204,204,204,0.5);text-align: center;} -.ring-blue{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: #4CACFF;text-align: center;} - -.ring-orange{background-color: #FF6800;display: block;padding: 0px 3px;height: 18px;box-sizing: border-box;min-width: 18px;text-align: center;line-height: 18px;border-radius: 50%;color:#fff;font-size: 12px;} - -/*左侧label内容右对齐*/ -.label-right{min-width:75px;text-align: right;height: 35px;line-height: 35px;float: left; } - - -/*输入框样式---------宽度为百分比*/ -.input-flex-30{flex: 1;height: 30px;padding: 5px;box-sizing: border-box;} -.input-flex-35{flex: 1;height: 35px;padding: 5px;box-sizing: border-box;} -.input-flex-40{flex: 1;height: 40px;padding: 5px;box-sizing: border-box;} -.input-100-35{width: 100%;height: 35px;padding: 5px;box-sizing: border-box;} -.input-100-40{width: 100%;height: 40px;padding: 5px;box-sizing: border-box;} -.input-100-45{width: 100%;height: 45px;padding: 5px;box-sizing: border-box;} -.input-90-35{width: 90%;height: 35px;padding: 5px;box-sizing: border-box;} -.input-60-40{width: 60%;height: 40px;padding: 5px;box-sizing: border-box;} -.input-60-35{width: 60%;height: 35px;padding: 5px;box-sizing: border-box;} -.input-50-35{width: 50%;height: 35px;padding: 5px;box-sizing: border-box;} -.input-50-40{width: 50%;height: 40px;padding: 5px;box-sizing: border-box;} -.input-50-45{width: 50%;height: 45px;padding: 5px;box-sizing: border-box;} -.input-48-45{width: 48%;height: 45px;padding: 5px;box-sizing: border-box;} -/*输入框为灰色背景,获取焦点时背景变白色*/ -.greyInput{background-color: #F5F5F5;outline: none} -.greyInput:focus{background-color: #fff; border: 1px solid #ddd;} - -/*输入框样式---------宽度为固定长度*/ -.winput-240-45{width: 240px;height: 45px;padding: 5px;box-sizing: border-box;} -.winput-240-40{width: 240px;height: 40px;padding: 5px;box-sizing: border-box;} -.winput-240-35{width: 240px;height: 35px;padding: 5px;box-sizing: border-box;} -.winput-240-30{width: 240px;height: 30px;padding: 5px;box-sizing: border-box;} -.winput-190-45{width: 190px;height: 45px;padding: 5px;box-sizing: border-box;} -.winput-200-35{width: 200px;height: 35px;padding: 5px;box-sizing: border-box;} -.winput-120-40{width: 120px;height: 40px;padding: 5px;box-sizing: border-box;} -.winput-120-35{width: 120px;height: 35px;padding: 5px;box-sizing: border-box;} -.winput-120-30{width: 120px;height: 30px;padding: 5px;box-sizing: border-box;} -.winput-115-40{width: 115px;height: 40px;padding: 5px;box-sizing: border-box;} -.winput-90-40{width: 90px;height: 40px;padding: 5px;box-sizing: border-box;} -.winput-90-35{width: 90px;height: 35px;padding: 5px;box-sizing: border-box;} -.winput-240-100{width: 240px;height: 100px;padding: 5px;box-sizing: border-box;} -/*输入框样式---------高度固定*/ -.winput-90-100{width: 90%;height: 100px;padding: 5px;box-sizing: border-box;} -.winput-100-130{width: 100%;height: 130px;padding: 5px;box-sizing: border-box;} -.winput-100-150{width: 100%;height: 150px;padding: 5px;box-sizing: border-box;} -.winput-100-200{width: 100%;height: 200px;padding: 5px;box-sizing: border-box;} -.winput-90-100{width: 90%;height: 100px;padding: 5px;box-sizing: border-box;} -/*百分比宽度*/ -.width100{width: 100%;} -.width90{width: 90%;} -.width89{width: 89%;} -.width80{width: 80%;} -.width70{width: 70%;} -.width60{width: 60%;} -.width50{width: 50%;} -.width40{width: 40%;} -.width30{width: 30%;} -.width20{width: 20%;} -.width15{width: 15%;} -.width10{width: 10%;} - -/*固定大小的宽度*/ -.wid100{width: 100px;display: block} -.wid120{width: 120px;display: block} -.wid90{min-width: 90px!important;display: block} -a.edu-txt-w280,.edu-txt-w280{ width:280px; display: inline-block;text-align: center} -a.edu-txt-w200,.edu-txt-w200{ width:200px; display: inline-block;text-align: center} -a.edu-txt-w190,.edu-txt-w190{ width:190px; display: inline-block;text-align: center} -a.edu-txt-w160,.edu-txt-w160{ width:160px; display: inline-block;text-align: center} -a.edu-txt-w140,.edu-txt-w140{ width:141px; display: inline-block;text-align: center} -a.edu-txt-w130,.edu-txt-w130{ width:130px; display: inline-block;text-align: center} -a.edu-txt-w120,.edu-txt-w120{ width:120px; display: inline-block;text-align: center} -a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;text-align: center} -a.edu-txt-w90,.edu-txt-w90{ width:90px; display: inline-block;text-align: center} -a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center} -a.edu-txt-w40,.edu-txt-w40{ width:40px; display: inline-block;text-align: center} - -/*最小高度*/ -.minH-40{min-height: 490px;} -.minH-280{min-height: 280px;} -.minH-400{min-height: 400px;} -.minH-440{min-height: 440px;} -.minH-500{min-height: 500px;} -.minH-560{min-height: 560px;} -/*超出高度出现滚动条--纵向*/ -.over260{max-height: 260px;overflow-y: auto} -.over210{height: 210px;overflow-y: auto} -.over280{height: 280px;overflow-y: auto} -.over170{min-height: 170px;max-height: 170px;overflow-y: auto} - -/*---------------tab公用边框-----------------*/ -.border-bottom-orange{border-bottom: 2px solid #FC7033!important;} -.bor-bottom-orange{border-bottom: 1px solid #FF9e6a!important;} -.bor-bottom-greyE{border-bottom: 1px solid #EEEEEE!important;} -.bor-left-greyE{border-left: 1px solid #EEEEEE!important;} -.bor-top-greyE{border-top: 1px solid #EEEEEE!important;} -.bor-right-greyE{border-right: 1px solid #EEEEEE!important;} -.bor-left-greyC{border-left: 1px solid #CCC!important;} -.bor-top-greyC{border-top: 1px solid #CCC!important;} -/*---------------边框-----------------*/ -.bor-gray-c{border:1px solid #ccc;} -.bor-grey-e{border:1px solid #eee;} -.bor-grey-d{border:1px solid #ddd;} -.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-none{border:none;} -.bor-outnone{outline:none; border:0px;} - -a.decoration{text-decoration: underline!important;} - -/*下拉菜单*/ -.edu-menu-panel{position: relative;cursor: pointer} -.edu-menu-list{position: absolute;padding: 5px 0px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.2);display: none;width: 120px;background: #FFFFff;right: -5px;border-radius:0px 0px 4px 4px;color: #05101a; font-size: 14px;z-index: 9} -.edu-menu-list li{width: 100%;padding:0px 15px;box-sizing: border-box;height: 35px;line-height: 35px;cursor: pointer;} - -.edu-menuSmall-list{position: absolute;padding: 5px 0px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.2);display: none;width: 100px;background: #FFFFff;right: -5px;border-radius:0px 0px 4px 4px;color: #05101a; font-size: 14px;z-index: 9} -.edu-menuSmall-list li{width: 100%;padding:0px 10px;box-sizing: border-box;height: 30px;line-height: 30px;cursor: pointer;font-size: 12px;} - -.edu-menu-list li a,.edu-menuSmall-list li a{width: 100%;height: 100%;display: block;color: #323232;} -.edu-menu-panel:hover i,.edu-menu-panel:hover{color: #4cacff;} -.edu-menu-panel:hover .edu-menu-list,.edu-menu-panel:hover .edu-menuSmall-list{display: block} -.edu-menu-list li:hover,.edu-menuSmall-list li:hover{background: #4CACFF;} -.edu-menu-list li:hover a,.edu-menuSmall-list li:hover a{color: #fff!important;} -.currentName{display: block;width: 100%;padding:0px 15px;height: 40px;line-height: 40px;font-size: 16px;box-sizing: border-box;cursor: default} -.ul-leftline:after{position: absolute;top:0px;content: "";width: 1px;background-color: #eee;height: 100%;right: 0px;} -.overPart{width: 240px;height: 30px;position: absolute;right: 0;top: -27px;background: transparent;} -/*滑块验证*/ -.drag_slider{ position: relative; background-color: #e8e8e8; width:100%; height: 45px;color: #999999; line-height: 45px; text-align: center;border-radius: 4px;} -.drag_slider .handler{ border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; left: 0px; width: 50px; height: 43px; border: 1px solid #eee; cursor: move;} -.handler_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTEyNTVEMURGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTEyNTVEMUNGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MTc5NzNmZS02OTQxLTQyOTYtYTIwNi02NDI2YTNkOWU5YmUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+YiRG4AAAALFJREFUeNpi/P//PwMlgImBQkA9A+bOnfsIiBOxKcInh+yCaCDuByoswaIOpxwjciACFegBqZ1AvBSIS5OTk/8TkmNEjwWgQiUgtQuIjwAxUF3yX3xyGIEIFLwHpKyAWB+I1xGSwxULIGf9A7mQkBwTlhBXAFLHgPgqEAcTkmNCU6AL9d8WII4HOvk3ITkWJAXWUMlOoGQHmsE45ViQ2KuBuASoYC4Wf+OUYxz6mQkgwAAN9mIrUReCXgAAAABJRU5ErkJggg==") no-repeat center;} -.handler_ok_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDlBRDI3NjVGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDlBRDI3NjRGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphNWEzMWNhMC1hYmViLTQxNWEtYTEwZS04Y2U5NzRlN2Q4YTEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;} -.drag_slider .drag_bg{ background-color: #29bd8b; height: 45px; width: 0px;} -.drag_slider .drag_text{border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; width: 100%; -moz-user-select: none; -webkit-user-select: none; user-select: none; -o-user-select:none; -ms-user-select:none;} - -/*tip公共样式的设置:*/ -.-task-title{opacity:0;position:absolute;left:0;top:0;display:none;z-index:100000;} /*1*/ -.data-tip-down,.data-tip-left,.data-tip-right,.data-tip-top{ position:relative; box-shadow:0px 0px 8px #000; background:#000; color:#fff; max-width:300px;/*2*/ - word-wrap: break-word; text-align:center; border-radius:4px; padding:0 10px; border:1px solid #000; display:none; }/*3*/ -.data-tip-down:after,.data-tip-down:before,.data-tip-left:before,.data-tip-right:before,.data-tip-left:after,.data-tip-right:after,.data-tip-top:after,.data-tip-top:before{/*4*/ - position: absolute;content:''; width:0; height:0;}/*5*/ -.data-tip-down:after,.data-tip-down:before{left: 45%;top:-10px;/*6*/ - border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 10px solid #000; }/*7*/ -.data-tip-down:before{top:-11px;border-bottom:10px solid #000;}/*8*/ -.data-tip-left:after,.data-tip-left:before{left: -10px;top:50%; margin-top:-5px;/*9*/ - border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 10px solid #000; }/*10*/ -.data-tip-left:before{ left: -12px;border-right: 10px solid #000; }/*11*/ -.data-tip-right:after,.data-tip-right:before{right: -10px; top:50%; margin-top:-5px;/*12*/ - border-top: 5px solid transparent;border-bottom: 5px solid transparent; border-left: 10px solid #000; }/*13*/ -.data-tip-right:before{ right: -10px;border-left: 10px solid #000; }/*14*/ -.data-tip-top:after,.data-tip-top:before{left: 45%;bottom:-10px;border-left: 5px solid transparent; - border-right: 5px solid transparent;border-top: 10px solid #000;} -.data-tip-top:before{bottom:-11px;} - - -/*左右两栏排列、固定左右宽度----------ul*/ -ul.abouttable{margin: 0px auto;width: 440px;} -ul.abouttable li{width: 100%;} -ul.abouttable li .rz-label{min-width: 150px;height: 45px;line-height: 45px;text-align: right;color: #adadad;} -ul.abouttable li .second-label{min-width: 150px;height: 40px;line-height: 40px;text-align: right;color: #adadad;} -ul.abouttable li .minh-label{min-width: 150px;height: 28px;line-height: 28px;text-align: right;color: #adadad;} - - - -/* table--------------------------------*/ - -/* table-1底部边框 */ -.edu-pop-table{ width: 100%; border:1px solid #eee; border-bottom:none; background:#fff; color:#888;cursor: default} -.edu-pop-table tr{ height:40px; } -.edu-pop-table tr.edu-bg-grey{ background:#f5f5f5;} -.edu-txt-center{ text-align: center;}.edu-txt-left{ text-align: left;}.edu-txt-right{ text-align: right;} -.edu-pop-table tr th{ color:#333;border-bottom:1px solid #eee; } -.edu-pop-table tr td{border-bottom:1px solid #eee;} -.edu-pop-table.table-line tr td,.edu-pop-table.table-line tr th{ border-right:1px solid #eee;} -.edu-pop-table.table-line tr td:last-child,.edu-pop-table.table-line tr th:last-child{border-right:none;} -/*th行有背景颜色且table无边框*/ -.edu-pop-table.head-color thead tr{background: #fafbfb} -.edu-pop-table.head-color{border: none} -.edu-pop-table.head-color tr:last-child td {border: none} -/*--表格行间隔背景颜色-*/ -.edu-pop-table.interval-td{border-bottom: 1px solid #eee;} -.edu-pop-table.interval-td thead tr{background: #fafbfb} -.edu-pop-table.interval-td tbody tr:nth-child(even){background: #fafbfb} -.edu-pop-table.interval-td tbody tr td{border: none} -/*--表格行间隔背景颜色(th也没有边框)-*/ -.edu-pop-table.interval-all{border:none;border-bottom: 1px solid #eee;} -.edu-pop-table.interval-all thead th{border: none} -.edu-pop-table.interval-all thead tr{background: #fafbfb} -.edu-pop-table.interval-all tbody tr:nth-child(even){background: #fafbfb} -.edu-pop-table.interval-all tbody tr td{border: none;padding:5px 0px} -/*--表格行移入背景颜色-*/ -.edu-pop-table.hover-td tbody tr:hover{background: #EFF9FD}/*悬浮颜色为天蓝色*/ -.edu-pop-table.hover-td_1 tbody tr:hover{background:#FCF2EC}/*悬浮颜色为浅橙色*/ -/* table-2全边框 */ -.edu-pop-table-all{ width: 100%; border:1px solid #eee; background:#fff; color:#888;border-collapse: collapse} -.edu-pop-table-all tr{ height:30px; } -.edu-pop-table-all tr.edu-bg-grey{ background:#f5f5f5;} -.edu-pop-table-all tr th{ color:#333;border:1px solid #eee; } -.edu-pop-table-all tr td{border:1px solid #eee;padding: 5px} -/*table无边框、无背景颜色*/ -.allNone{background: none!important;cursor: default;border-bottom:none!important;} -.allNone tr{height: 30px!important;} - -/*数据为空公共页面*/ -img.edu-nodata-img{ width:300px; margin:50px auto 20px; display: block;} -.edu-nodata-p{ font-size: 20px; text-align: center; color:#999;border-bottom:none!important;padding-left: 18px;box-sizing: border-box;} - -/*输入为空或者错误的提示*/ -.input-none{box-shadow: 0px 0px 2px rgba(0,0,0,0.1);} -.notice{height: 25px;margin-left: 150px;} -.input-none + .notice span{display: block} - -/*列表里菜单icon移入*/ -.edu-position-hide{ position: absolute; top:15px; left:-20px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); background:#fff;z-index:1001; padding:5px 0;z-index: 999999;} -.edu-position-hide li a{ display:inline-block; height: 30px; width: 100px; line-height: 30px; text-align: center; font-size:12px!important; } -.edu-position-hide li a:hover{ background:#F1F1F1; color:#05101A;} -.edu-position-hidebox i{ color:#bcbcbc;} -.edu-position-hidebox i:hover{ color:#4CACFF;} -.edu-position-hidebox a{ color:#05101A;} -.edu-position-hidebox:hover .edu-position-hide{ display: block;} - -/*搜索(灰色背景、点击变白色)*/ -.seekPanel > input{width: 100%;height: 30px;line-height: 30px;background-color: #f4f4f4;border:1px solid #eaeaea;padding: 0px 30px 0px 5px ;box-sizing: border-box;outline: none;} -.seekPanel > input:focus{background-color: #fff;} -.seekPanel > i{position: absolute;right: 7px;top: -1px;} -/*-------------------------------------------公用按钮:以white-btn(或者edu-default-btn无padding)为基础,宽度和高度可以用padding填充,颜色用edu-color-btn,begin-----------------------------------------*/ -/*按钮*/ -/*默认按钮*/ -/*长条形按钮*/ -.default_btn{display: block;border-radius: 5px ;background: #f4f4f4;color: #cfcfcf!important;text-align: center;width: 102px;box-sizing: border-box} -/*正常按钮*/ -.white-btn{text-align:center;cursor: pointer;display: inline-block;padding: 0px 8px;border: 1px solid #ccc;color: #666;letter-spacing: 1px;font-size: 14px;height: 26px;line-height: 26px;border-radius: 3px;} -a.white-btn.orange-btn{border: 1px solid #FF7500;color: #FF7500!important;} -a.white-btn.orange-btn:hover{border: 1px solid #F06200;color: #F06200!important;} - -.defalutGreyBorder{display: block;padding: 0px 10px;border:1px solid #ccc;height: 30px;line-height: 30px;border-radius: 4px;} -a.task-btn{cursor: pointer;display: inline-block;border: none;padding: 0 12px;color: #fff;background: #CDCDCD !important;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 2px; font-weight: 400;} -/*最新按钮:以个人主页为例-------------因高度和宽度都已经固定,后续不再支持使用,*/ -.user_default_btn{cursor: pointer;font-size: 14px;display: block;width: 120px;text-align: center;height: 40px;line-height: 40px!important;border-radius: 4px;box-sizing: border-box} -.user_orange_btn{color: #fff!important;background-color: #FF6800;}/*橙色签到按钮*/ -.user_orange_btn:hover{background-color:#F06200;} -.user_grey_btn{color: #fff!important;background-color: #CCCCCC;cursor: default}/*灰色已经签到按钮*/ -.user_private_btn{color:#646464!important;background-color: #fff;border: 1px solid #989898}/*灰色私信、互相关注按钮*/ -.user_private_btn:hover{color: #B2B2B2!important;border: 1px solid #B2B2B2;} -.btn_auto{border-radius: 5px ;background: #fff;padding: 0px 18px;} - -/*可共用按钮,需添加padding或者边框*/ -.edu-default-btn{display: block;border-radius: 4px;} -a.edu-focus-btn{padding: 0px 10px;height: 30px;line-height: 30px;border: 1px solid #b2b2b2;color: #b2b2b2!important;} -a.edu-focus-btn:hover{border: 1px solid #666;color: #666!important;} - -a.edu-greenback-btn{padding: 0px 10px;background: #29BD8B;color: #fff!important;border: 1px solid #29BD8B;} -a.edu-greenline-btn{padding: 0px 10px;color: #29BD8B!important;border: 1px solid #29BD8B;} -a.edu-greenback-btn:hover{background-color: #28AC7F;} -a.edu-greenline-btn:hover{border:1px solid #28AC7F;color: #28AC7F!important;} - -a.edu-blueback-btn{padding: 0px 10px;background: #4CACFF;color: #fff!important;border: 1px solid #4CACFF;} -a.edu-blueline-btn{padding: 0px 10px;color: #4CACFF!important;border: 1px solid #4CACFF;} -a.edu-blueback-btn:hover{background-color: #459BE6;} -a.edu-blueline-btn:hover{border:1px solid #459BE6;color: #459BE6!important;} - -a.edu-orangeback-btn{background-color: #ff7500;color: #fff!important;border:1px solid #FF7500} -a.edu-orangeback-btn:hover{background-color: #F06200;} -a.edu-orangeline-btn{color: #FF7500!important;border:1px solid #FF7500} -a.edu-orangeline-btn:hover{color: #F06200!important;border:1px solid #F06200} - -a.edu-greyback-btn{padding: 0px 10px;background: #CCCCCC;color: #fff!important;border: 1px solid #CCCCCC;} -a.edu-greyback-btn:hover{background-color: #B2B2B2;} -a.edu-greyshallowline-btn{padding: 0px 10px;color: #999!important;border:1px solid #CFCFCF} -a.edu-greyline-btn{padding: 0px 10px;background: #fff;color: #666!important;border: 1px solid #eaeaea;line-height: 33px;height: 33px;} -a.edu-greyline-btn:hover,a.edu-greyshallowline-btn:hover{border:1px solid #B2B2B2;color:#B2B2B2!important;} - -/*新建页面的提交和取消按钮*/ -.defalutCancelbtn{display: block;border: 1px solid #CDCDCD;background-color: #fafafa;color: #999!important;width: 120px;text-align: center;height: 30px;line-height: 30px;border-radius: 2px; - width: 130px; - height: 40px; - background: rgba(77,124,254,0); - border: 1px solid rgba(76, 172, 255, 1); - border-radius: 4px; - line-height: 40px; - font-size: 16px; - font-family: MicrosoftYaHei; - font-weight: 400; - color: rgba(76,172,255,1) !important; -} -.defalutCancelbtn:hover{border:1px solid #B2B2B2;color: #B2B2B2!important;} -.defalutSubmitbtn{ - display: block;border: 1px solid #4CACFF;background-color: #4CACFF;color: #fff!important;width: 120px;text-align: center;line-height: 40px;border-radius: 2px; - width: 130px; - height: 40px; - background: rgba(76,172,255,1); - border-radius: 4px; - font-size: 16px; - font-family: MicrosoftYaHei; - font-weight: 400; - color: rgba(255,255,255,1); -} -.defalutSubmitbtn:hover{background-color: #459BE6;border: 1px solid #459BE6;} -/*-------------------------------------------公用按钮:以white-btn(或者edu-default-btn无padding)为基础,宽度和高度可以用padding填充,颜色用edu-color-btn,end-----------------------------------------*/ - -/*可点击按钮---蓝色*/ -.use_btn{background: #4cacff;color:#fff!important;} -a.task-btn-orange{background: #4CACFF!important; color:#fff!important;} -a:hover.task-btn-orange{background: #459BE6;} -/*可点击按钮---蓝色---蓝色边框*/ -.user_blue_btn{border: 1px solid #4CACFF;color: #4CACFF!important;} -/*可点击按钮---蓝色---蓝色背景*/ -a.user_bluebg_btn{background-color:#4CACFF;color: #fff;} -a.user_orangebg_btn{background-color:#FF6800;color: #fff;} -a.user_greybg_btn{background-color:#747A7F;color: #fff;} - - -.pointer{cursor: pointer} -.cdefault{cursor: default} - - -/*md编辑器恢复被覆盖样式*/ -.new_li li{ list-style-type: disc!important; } -.new_li ol li{ list-style-type: decimal!important; } -.new_li li{ margin-bottom: 0!important; } - -/*搜索框*/ -#pollingPanel{position: relative;width: 248px;height: 32px;} -#pollingPanel > input{width: 100%;height: 100%;border:1px solid #eaeaea;border-radius: 4px;padding: 0px 30px 0px 5px;box-sizing: border-box;background-color: #F4F4F4;} -#pollingPanel > input:focus{background-color: #fff;outline: none;} -#pollingPanel > a{position: absolute;right: 10px;top:0px;} - -/* 弹框 */ -.popupAll{width: 100%;height: 100%;position: fixed;z-index: 99998;background-color: rgba(5,16,26,0.6);left: 0;top:0;} -.task-popup{ width: 30%;background: #fff; border:1px solid #e8e8e8; border-radius:10px;} -.task-popup-text-center{ text-align: center; color: #333;} -.task-popup-title{ border-bottom: 1px solid #eee; padding:0px 15px;text-align: center;box-sizing: border-box;line-height: 70px;height: 70px; border-radius: 10px 10px 0px 0px;font-size: 16px;font-weight: bold; } -.task-popup-content{ padding:15px;} -.task-popup-submit{ margin:0px auto 15px; width: 160px;} -.task-popup-sure{ margin:0px auto 15px; width: 54px;} -.task-popup-right-sure{margin:0px auto 15px;text-align: center} -.task-popup-OK{ margin:15px auto; text-align: center} -.task-popup-bggrey{ background:#fff; color:#333;} -#closeIcon{position: absolute;color:#fefefe} -/* 模板弹框 20170407byLB */ -#task_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);} -.task_popup_top{background:#ccc;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;} -.task_popup_top h3{ font-size:14px; color:#333; line-height:40px; padding-left:10px; } -a.task_icons_close{width:20px; height:20px;display:block;background: url(../images/popup/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;} -a:hover.task_icons_close{background: url(../images/popup/sy_icons_close.png) -40px 0px no-repeat;} -.task_popup_con{ padding:20px;} -/* 模板弹框 20161013byLB */ -#muban_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);} -.muban_popup_top{background:#3b94d6;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;} -.muban_popup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px; } -a.muban_icons_close{width:20px; height:20px;display:block;background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;} -a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;} -#muban_popup_box input,#muban_pwopup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;} -#muban_popup_box label.pop_box_label{width: 100px; text-align: right; display: inline-block;} -input.radio-width90{ width: 90px; } -#muban_popup_box label.pop_box_label_l {width: 100px; text-align: left; display: inline-block;} - - -/*提示条*/ -.alert{ padding:10px;border: 1px solid transparent; text-align: center;} -.alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;} -.alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;} -.task-close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;} -.taskclose:hover{opacity: 0.5;} -.alert-red{background-color: #f2dede;border-color: #eed3d7; color: #d14f4d; text-align: left!important;} - -/*搜索的下拉列表*/ -.search_down_list a{display: block;height: 28px;line-height: 28px;padding: 0px 5px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} -.search_down_list a:hover{background: #fafafa;} - -/*白色色块--类似个人主页-学习-里面的tab*/ -.white-panel{border-radius: 2px;width: 100%;margin: 0px auto;box-sizing: border-box;padding-left: 25px;} -.white-panel li{width: 118px;height: 48px;line-height: 48px;text-align: center;color: #05101A;float: left;cursor: pointer;border:1px solid #fff;} -.white-panel li a{display: block;width: 100%;} -.white-panel li.active{border-radius: 24px;border:1px solid #4CACFF;color:#4CACFF; } -.white-panel li.active a{color:#4CACFF; } - - -/* 个人主页翻页 */ -.pages_user_show a:hover,.pages_user_show li.active a{ background-color:#4CACFF; color:#fff;border: 1px solid #4CACFF;} -.pages_user_show a{border-radius: 2px; display: inline-block;border:1px solid #d1d1d1;background-color:#fff; color:#888; float:left;text-align:center; padding:2px 10px; line-height:1.9; margin: 0 5px;} -.pages_user_show li{float: left; list-style-type: none;} -.pages_user_show ul li{list-style-type: none !important;} -.pages_user_show ul li a{color:#888} -.page_GO{text-align:center;width: 80px;border-radius: 2px;margin-left: 5px;height: 33px;padding: 0px 5px;box-sizing: border-box;float: left;border:1px solid #d1d1d1;} -/* 小翻页 */ -.pages_little_show a:hover,.pages_little_show li.active a{ background-color:#4CACFF;; color:#fff!important;border:1px solid #4CACFF} -.pages_little_show a{ display: inline-block;border:1px solid #d1d1d1; color:#888!important; float:left;text-align:center; padding:3px 3px; line-height:1.9; margin: 0 2px; font-size: 12px;} -.pages_little_show li{float: left;} - -/*左右排版结构:参考个人主页的经验值和金币等页面*/ -.leftPanel{width: 22%;float: left;} -.leftPanel li.nav{padding:10px 0px;box-sizing: border-box;} -.leftPanel li.nav a{padding-left: 40px;display: block;width: 100%;box-sizing: border-box;border-left: 2px solid #fff;height: 24px;line-height: 24px;} -.leftPanel li.nav.active a{border-left: 2px solid #4CACFF;} -.rightPanel{width:78%;float: right;} - -/*个人主页,认证的圆圈*/ -.ringauto{width: 20px;height: 20px;line-height: 20px;text-align: center;border-radius: 50%;background-color: #F4FAFF;margin-right:5px;} - -/*-------------------个人主页:右侧提示区域--------------------------*/ -.-task-sidebar{position:fixed;width:40px;height:180px;right:0;bottom:30px;z-index: 10;} -.-task-sidebar div{height: 40px;line-height: 40px;box-sizing: border-box;width:40px;background:#4CACFF;color:#fff;font-size:20px;text-align:center;margin-bottom:5px;border-radius: 4px;} -.-task-sidebar div i{ color:#fff;} -.-task-sidebar div i:hover{color: #fff!important;} -.gotop{background-color: rgba(208,207,207,0.5)!important;padding: 0px!important;} -.-task-desc{background:#494949;width:90px;line-height: 36px;text-align: center; - position: absolute;color: #fff;font-size: 13px;z-index: 999999;opacity: 0;} -.-task-desc div{position: absolute;top:10px;right: -7px;height: 13px;} -.-task-desc div img{float: left} - - -/***** loading ******/ -/*****载入中******/ -#ajax-indicator { - position: absolute; /* fixed not supported by IE*/ - background-color:#eee; - border: 1px solid #bbb; - top:35%; - left:40%; - width:20%; - /*height:5%;*/ - font-weight:bold; - text-align:center; - padding:0.6em; - z-index:100000; - opacity: 0.5; -} - -html>body #ajax-indicator { position: fixed; } - -#ajax-indicator span{ - color:#fff; - color: #333333; - background-position: 0% 40%; - background-repeat: no-repeat; - background-image: url(/images/loading.gif); - padding-left: 26px; - vertical-align: bottom; - z-index:100000; -} -/*最新、最热*/ -.bestChoose.active{color: #4CACFF;} - - -/*实训路径选择实训*/ -.edu-filter-cir-grey{color: #666!important;width: auto;padding:0px 15px; font-size:14px !important; text-align: center;background: #f3f3f3;border-radius: 10px;display: block; height:25px; line-height:25px;} -.edu-filter-cir-grey:hover{background: #4cacff; color: #ffffff!important;} -.edu-filter-cir-grey.active{background: #4cacff; color: #ffffff!important; font-size: 14px !important;} - - -.with10{ width: 10%;box-sizing: border-box}.with12{ width: 12%;box-sizing: border-box}.with13{ width: 13%;box-sizing: border-box}.with14{ width: 14%;box-sizing: border-box}.with15{ width: 15%;box-sizing: border-box} -.with20{ width: 20%;box-sizing: border-box}.with22{ width: 22%;box-sizing: border-box}.with23{ width: 23%;box-sizing: border-box}.with25{ width: 25%;box-sizing: border-box} -.with30{ width: 30%;box-sizing: border-box}.with35{ width: 35%;box-sizing: border-box} -.with40{ width: 40%;box-sizing: border-box}.with45{ width: 45%;box-sizing: border-box}.with49{ width: 49%;box-sizing: border-box} -.with50{ width: 50%;box-sizing: border-box}.with55{ width: 55%;box-sizing: border-box} -.with52{ width: 52%;box-sizing: border-box}.with48{ width: 48%;box-sizing: border-box} -.with60{ width: 60%;box-sizing: border-box}.with65{ width: 65%;box-sizing: border-box} -.with70{ width: 70%;box-sizing: border-box}.with73{ width: 73%;box-sizing: border-box}.with75{ width: 75%;box-sizing: border-box}.with77{ width: 77%;box-sizing: border-box}.with78{ width: 78%;box-sizing: border-box} -.with80{ width: 80%;box-sizing: border-box}.with85{ width: 85%;box-sizing: border-box} -.with87{ width: 87%;box-sizing: border-box}.with90{ width: 90%;box-sizing: border-box}.with95{ width: 95%;box-sizing: border-box} -.with100{ width: 100%;} - -.transform-90{ - transform:rotate(-90deg); - -ms-transform:rotate(-90deg); /* IE 9 */ - -moz-transform:rotate(-90deg); /* Firefox */ - -webkit-transform:rotate(-90deg); /* Safari 和 Chrome */ - -o-transform:rotate(-90deg); -} - -.newplayVedio{ - font-size: 86px !important; -} -.icon-qizhi{ - font-size:30px !important; -} -.icon-31{ - font-size: 68px !important; -} - -/*置顶*/ -.btn-cir {display: inline-block;padding: 0px 5px;border-radius: 25px;line-height: 20px;font-size: 12px;} -.btn-cir-red{background:red;color: #fff; font-weight: normal;cursor: default} -.btn-cir-red:hover{background:red;color: #fff!important;} -.btn-cir-grey{background: #e1e1e1;color: #8c8c8c;font-weight: normal;border: 1px solid #e1e1e1} - -/*动态标签*/ -.edu-filter-btn{cursor: default;display: inline-block; padding:0px 9px; color:#666; background:#fff; text-align: center; border-radius:10px; font-size:12px; height:18px; line-height:18px;} -.edu-filter-btn-blue{border:1px solid #3498db; color:#3498db;} -.edu-filter-btn-orange{border:1px solid #ff6800; color:#ff6800!important;}/*提交中、评阅中*/ -.edu-filter-btn-red{border:1px solid #DD1717; color:#DD1717;}/*已截止、未开启补交*/ -.edu-filter-btn-green{border:1px solid #29BD8B; color:#29BD8B!important;}/*申诉中、已开启补交*/ -.edu-filter-btn-appeal{border:1px solid #FF4343; color:#FF4343!important;}/*申诉中*/ -.edu-filter-btn-yellow{border:1px solid #ef9324; color:#ef9324;} -.edu-filter-btn-danger{background:#d72e36; color:#fff;} -.edu-filter-btn-late{border:1px solid #3fbcff; color: #3fbcff;} -.edu-filter-btn-no-late{border:1px solid #747A7F;color: #747A7F;}/*未发布*/ -.edu-filter-btn-end{border: 1px solid #999999;color: #999999;}/*已结束*/ -/*动态按钮*/ -.edu-activity-orange{background-color:#FF6800;color:#fff!important;cursor: pointer;border: 1px solid #ff6800;}/*修改作品、补交作品、立即补交、补交附件*/ -.edu-activity-blue{background-color:#4CACFF;color:#fff!important;cursor: pointer;border: 1px solid #4CACFF;}/*开始实战、开始答题、继续答题、继续实战、提交作品*/ -.edu-activity-grey{background-color:#747A7F;color:#fff!important;cursor: pointer;border: 1px solid #747A7F;}/*匿评作品*/ -.edu-activity-green{background-color:#29BD8B;color:#fff!important;cursor: pointer;border: 1px solid #29BD8B;}/*查看作品、查看实战、查看答题*/ -.edu-activity-light-grey{background-color:#cbcbcb;color:#fff!important;cursor: pointer;border: 1px solid #cbcbcb;}/*取消关联*/ -/*课堂设置页面*/ -.course-ul-nav{width: 100%;border-bottom: 1px solid #EBEBEB;} -.course-ul-nav a{display: inline-block;padding: 20px;font-size: 18px;text-align: center;width: 94px;position: relative} -.course-ul-nav a.active,.course-ul-nav a:hover{color: #4CACFF;} -.course-ul-nav a.active:after{content: '';width: 94px;left: 20px;bottom: 0px;height: 2px;background-color: #4CACFF;position: absolute} - -/*-----下拉框--------*/ -.down-select{display:none;position: absolute;z-index: 10;left: 0px;width: 100%;overflow-y: auto;background: #fff;max-height: 200px;border:1px solid #eee;} -.down-select p{height: 35px;line-height: 35px;padding-left: 5px;cursor: pointer} -.down-select p:hover{background: #f3f4f6} - - - -.paddingLeft28{padding-left:28px;} - -.ant-modal-header{ - border-radius: 10px; -} - -.color656565{ - color:#656565; -} - -.colorC8161D{ - color:#C8161D; -} - -.bor-reds{ - border:1px solid #FF0000!important; - border-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} -.editormd-dialog-footer{ - padding: 0px; -} \ No newline at end of file +/*整体公用样式--------------主题颜色为蓝色#459be5,字体颜色为#05101a*/ +@charset "utf-8"; +body{font-size:14px; line-height:2.0;background:#fafafa!important;font-family: "微软雅黑","宋体"; color:#05101a;height: 100%;position: relative; +} +html,body{height:100%;} +body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td,span{ margin:0; padding:0;} +table,input,textarea,select,button {outline: none;border-radius: 3px; font-family: "微软雅黑","宋体"; font-size:14px;line-height:1.9;border:1px solid #eaeaea;background: #FFFFff; color:#05101A;} +textarea{resize: none;} +/*设置input框的placehoder的字体颜色*/ +input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color: #cccccc} +input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;} +input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;} +input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#cccccc;} + +div,img,tr,td,table{ border:0;} +a:link,a:visited{text-decoration:none; color:#05101a;} +a:hover {color:#459be5;} +ol, ul, li {list-style-type: none;} +select:disabled,input:disabled{background-color: #EEEEEE;} +/*万能清除浮动*/ +.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden;} +.clearfix{clear:both;zoom:1} +.cl{ clear: both; overflow: hidden;} +/*通用浮动*/ +.fl{ float: left!important;} +.fr{ float: right!important;} +/*pre标签换行*/ +.break-word{word-break: break-all;word-wrap: break-word;} +.break-word-firefox{white-space: pre-wrap !important;word-break: break-all;} +/*文字左右两端对齐*/ +.justify{text-align: justify} +.indent{text-indent: 2em;} + +.edu-name-dark{ max-width:100px; display: block; } +.edu-info-dark{ max-width:345px; display: block; } +.edu-max-h200{ height:200px; overflow: auto;} +.edu-h260{ height:260px;} +.edu-h270{ height:270px;} +.edu-h310{ height:310px;} +.edu-position{ position: relative;} +.edu-h200-auto{ max-height:200px; overflow:auto;} +.edu-h300-auto{ max-height:300px; overflow:auto;} +.edu-h350-auto{ max-height:350px; overflow:auto;} +.edu-h280-auto{ height:280px; overflow:auto;} +.edu-txt-w240{ width:240px; display: block;} +.edu-txt-w280{ width:280px; display: block;} +.edu-txt-w320{ width:320px; display: block;} +.edu-txt-w200{ width:200px; display: block;} +a.edu-txt-w280,.edu-txt-w280{ width:280px; display: inline-block;text-align: center} +a.edu-txt-w190,.edu-txt-w190{ width:190px; display: inline-block;text-align: center} +a.edu-txt-w160,.edu-txt-w160{ width:160px; display: inline-block;text-align: center} +a.edu-txt-w140,.edu-txt-w140{ width:141px; display: inline-block;text-align: center} +a.edu-txt-w130,.edu-txt-w130{ width:130px; display: inline-block;text-align: center} +a.edu-txt-w120,.edu-txt-w120{ width:120px; display: inline-block;text-align: center} +a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;text-align: center} +a.edu-txt-w90,.edu-txt-w90{ width:90px; display: inline-block;text-align: center} +a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center} + +/*超过隐藏*/ +.overellipsis{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} +.task-hide{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.task-hide-2{overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;} +/*隐藏*/ +.none{display: none} +.block{ display:block;} + +.boxsizing{box-sizing: border-box} + + +/*字体icon均为18px*/ +.iconfont{font-size: 18px!important;} +/*通用文字大小样式*/ +.font-n{font-weight: normal!important;} +.font-bd{font-weight: bold;} +.font-n{font-weight: normal;} +.font-12{ font-size: 12px!important;} +.font-13{ font-size: 13px!important;} +.font-14{ font-size: 14px!important;} +.font-15{ font-size: 15px!important;} +.font-16{ font-size: 16px!important;} +.font-17{ font-size: 17px!important;} +.font-18{ font-size: 18px!important;} +.font-20{ font-size: 20px!important;} +.font-22{ font-size: 22px!important;} +.font-24{ font-size: 24px!important;} +.font-26{ font-size: 26px!important;} +.font-28{ font-size: 28px!important;} +.font-30{ font-size: 30px!important;} +.font-32{ font-size: 32px!important;} +.font-36{ font-size: 36px!important;} +.font-50{ font-size: 50px!important;} +.font-60{ font-size: 60px!important;} +.font-70{ font-size: 70px!important;} + +/*a标签的下划线*/ +a.decoration{text-decoration: underline} + +/*表单*/ +.panel-form-label{ display:inline-block; width:10%; min-width:90px; text-align:right; line-height:40px; font-weight: normal; } + +/*通用内外边距*/ +.mt-10{ margin-top:-10px;}.mt-3{ margin-top:-3px;}.mt0{ margin-top:0px!important;} .mt1{ margin-top:1px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px!important;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px!important;}.mt8{ margin-top:8px;}.mt9{ margin-top:9px;}.mt10{ margin-top:10px!important;}.mt12{ margin-top:12px;}.mt13{ margin-top:13px;}.mt14{ margin-top:14px;}.mt15{ margin-top:15px!important;}.mt16{ margin-top:16px;}.mt17{ margin-top:17px;}.mt18{ margin-top:18px;}.mt20{ margin-top:20px!important;}.mt22{ margin-top:22px!important;}.mt23{ margin-top:23px!important;}.mt24{ margin-top:24px!important;}.mt25{ margin-top:25px;}.mt28{ margin-top:28px;}.mt30{ margin-top:30px!important;}.mt34{ margin-top:34px!important;}.mt35{ margin-top:35px!important;}.mt36{ margin-top:36px!important;}.mt40{ margin-top:40px;}.mt45{ margin-top:45px;}.mt46{ margin-top:46px;}.mt50{ margin-top:50px;!important;}.mt56{ margin-top:56px;!important;}.mt60{ margin-top:60px;}.mt70{ margin-top:70px;}.mt80{ margin-top:80px;}.mt95{ margin-top:95px;}.mt100{ margin-top:100px;}.mt110{ margin-top:110px;}.mt120{ margin-top:120px;}.mt130{ margin-top:130px;}.mt140{ margin-top:140px;}.mt150{ margin-top:150px;}.mt160{ margin-top:160px;} +.mb0{margin-bottom: 0px!important;}.mb3{ margin-bottom: 3px;}.mb5{ margin-bottom: 5px;}.mb7{ margin-bottom: 7px;}.mb10{ margin-bottom: 10px;}.mb11{ margin-bottom: 11px;}.mb14{ margin-bottom: 14px;}.mb15{ margin-bottom: 15px;}.mb16{ margin-bottom: 16px;}.mb20{ margin-bottom: 20px!important;}.mb25{ margin-bottom: 25px;}.mb26{ margin-bottom: 26px;}.mb28{ margin-bottom: 28px;}.mb30{ margin-bottom: 30px!important;}.mb40{ margin-bottom: 40px!important;}.mb50{ margin-bottom: 50px!important;}.mb60{ margin-bottom: 60px!important;}.mb70{ margin-bottom: 70px!important;}.mb80{ margin-bottom: 80px!important;}.mb90{ margin-bottom: 90px!important;}.mb100{ margin-bottom: 100px!important;}.mb110{ margin-bottom: 110px;} +.ml-3{ margin-left: -3px;}.ml1{margin-left: 1px;}.ml2{margin-left: 2px;}.ml3{margin-left: 3px;}.ml4{margin-left: 4px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml12{ margin-left:12px!important;}.ml13{ margin-left:13px!important;}.ml15{ margin-left: 15px;}.ml18{ margin-left: 18px;}.ml20{ margin-left: 20px;}.ml22{ margin-left: 22px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml45{ margin-left: 45px;}.ml50{ margin-left: 50px;}.ml55{ margin-left: 55px;}.ml60{ margin-left: 60px;}.ml72{ margin-left: 72px;}.ml73{ margin-left: 73px;}.ml75{ margin-left: 75px;}.ml80{ margin-left: 80px;}.ml85{margin-left:85px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml123{ margin-left: 123px;}.ml150{ margin-left: 150px;}.ml180{ margin-left: 180px;}.ml230{ margin-left: 230px;}.ml240{margin-left: 240px;}.ml250{ margin-left: 250px;}.ml290{ margin-left: 290px;} +.mr3{margin-right: 3px}.mr4{margin-right: 4px}.mr5{ margin-right: 5px;}.mr8{ margin-right: 8px;}.mr10{ margin-right: 10px;}.mr12{ margin-right:12px!important;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr24{ margin-right: 24px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr35{margin-right:35px;}.mr40{margin-right:40px;}.mr45{margin-right:45px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}.mr70{ margin-right: 70px;}.mr75{ margin-right: 75px;}.mr80{ margin-right:80px;}.mr90{ margin-right:90px;}.mr100{ margin-right: 100px;}.mr110{ margin-right:110px;}.mr350{ margin-right:350px;} + +.pt1{ padding-top:1px;}.pt3{ padding-top:3px!important;}.pt5{ padding-top:5px!important;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt17{ padding-top:17px;}.pt20{ padding-top:20px!important;}.pt25{ padding-top:25px;}.pt30{ padding-top:30px;}.pt35{ padding-top:35px;}.pt37{ padding-top:37px;}.pt40{ padding-top:40px;}.pt47{ padding-top:47px;}.pt49{ padding-top:49px;}.pt50{ padding-top:50px;}.pt60{ padding-top:60px;}.pt70{ padding-top:70px;}.pt80{ padding-top:80px;}.pt90{ padding-top:90px;}.pt100{padding-top:100px;}.pt110{ padding-top:110px;}.pt120{ padding-top:120px;}.pt130{padding-top:130px;} +.pb3{ padding-bottom:3px!important;}.pb5{ padding-bottom:5px!important;}.pb10{ padding-bottom:10px;}.pb15{ padding-bottom:15px;}.pb20{ padding-bottom:20px;}.pb25{ padding-bottom:20px;}.pb25{ padding-bottom:20px;}.pb30{ padding-bottom:30px;}.pb35{ padding-bottom:35px;}.pb40{ padding-bottom:40px;}.pb47{ padding-bottom:47px;}.pb50{ padding-bottom:50px;}.pb60{ padding-bottom:60px;}.pb70{ padding-bottom:70px;}.pb80{ padding-bottom:80px;}.pb90{ padding-bottom:90px;}.pb100{ padding-bottom:100px;}.pb110{ padding-bottom:110px;}.pb155{ padding-bottom:155px;} +.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr30{ padding-right:30px!important;}.pr35{ padding-right:35px!important;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}.pr48{ padding-right:48px;}.pr57{ padding-right:57px;}.pr60{ padding-right:60px;}.pr70{ padding-right:70px;}.pr72{ padding-right:72px;}.pr75{ padding-right:75px;}.pr88{ padding-right:88px;} + +.pl0{ padding-left:0px!important;}.pl2{ padding-left:2px;}.pl5{ padding-left:5px;}.pl7{ padding-left:7px;}.pl8{ padding-left:8px;}.pl10{ padding-left:10px;}.pl15{ padding-left:15px;}.pl20{ padding-left:20px;}.pl22{ padding-left:22px;}.pl25{ padding-left:25px;}.pl28{ padding-left:28px;}.pl30{ padding-left:30px !important;}.pl33{padding-left: 33px}.pl35{ padding-left:35px;}.pl40{ padding-left:40px;}.pl42{ padding-left:42px;}.pl45{ padding-left:45px;}.pl50{ padding-left:50px;}.pl60{ padding-left:60px;}.pl70{padding-left:70px;}.pl75{padding-left:75px;}.pl80{padding-left:80px;}.pl88{ padding-left:88px;}.pl92{padding-left:92px;}.pl100{ padding-left:100px;} +.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr7{ padding-right:7px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr25{ padding-right:25px!important;}.pr30{ padding-right:30px!important;}.pr40{ padding-right:40px;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}.pr60{padding-right:60px;}.pr75{padding-right:75px;} + + +.padding5-10{padding:5px 10px;box-sizing: border-box} +.padding5-20{padding:5px 20px;box-sizing: border-box} +.padding10{padding: 10px;box-sizing: border-box} +.padding15{padding: 15px;box-sizing: border-box} +.padding20{padding: 20px;box-sizing: border-box} +.padding10-20{padding: 10px 20px;box-sizing: border-box} +.padding10-15{padding: 10px 15px;box-sizing: border-box} +.padding10-25{padding: 10px 25px;box-sizing: border-box} +.padding10-30{padding: 10px 30px;box-sizing: border-box} + +.padding15-20{padding: 15px 20px;box-sizing: border-box} +.padding15-25{padding: 15px 25px;box-sizing: border-box} + +.padding20-40{padding: 20px 40px;box-sizing: border-box} +.padding20-30{padding: 20px 30px;box-sizing: border-box} +.padding20-15{padding: 20px 15px;box-sizing: border-box} +.padding20-10{padding: 20px 10px;box-sizing: border-box} + +.padding30{padding: 30px;box-sizing: border-box} +.padding30-20{padding: 30px 20px;box-sizing: border-box} +.padding30-40{padding: 30px 40px;box-sizing: border-box} + +.padding40{padding: 40px;box-sizing: border-box} +.padding40-30{padding: 40px 30px;box-sizing: border-box} +.padding40-20{padding: 40px 20px;box-sizing: border-box} + +.margin10{margin:10px;} +.margin15{margin:15px;} +.margin20{margin:20px;} + +/*行高*/ +.lineh-12{line-height: 12px} +.lineh-15{line-height: 15px} +.lineh-17{line-height: 17px} +.lineh-20{line-height: 20px} +.lineh-25{line-height: 25px} +.lineh-30{line-height: 30px} +.lineh-35{line-height: 35px} +.lineh-40{line-height: 40px} + +/*pre标签换行*/ +.break_word{word-break: break-all;word-wrap: break-word;} +.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;} +/*定位*/ +.pr{position: relative} +.df {display:flex;display: -webkit-flex;display: -ms-flex;} +.flex1{flex: 1;} +/*去掉IE input框输入时自带的清除按钮*/ +input::-ms-clear{display:none;} +/*自定义滚动条宽度*/ +::-webkit-scrollbar {width:7px;height:10px;background-color: #F5F5F5; } +::-webkit-scrollbar-track {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);background-color: #F5F5F5;} +::-webkit-scrollbar-thumb {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);background-color: #dadada;} + + +.newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;} +.educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/ +.newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;padding-top: 60px}/*padding-bottom根据底部的高度而定*/ + +/*高度*/ +.height-100{height: 100%;} +/*文本位置*/ +.edu-txt-center{ text-align: center!important;} +.edu-txt-left{ text-align: left!important;} +.edu-txt-right{ text-align: right!important;} + +/*背景颜色*/ +.edu-back-white{background-color:#FFFFff; } +.edu-back-greyf5{background-color: #f5f5f5!important;} +.edu-back-skyblue{background: #F4FAFF;} +.edu-back-blue{background-color:#459be6!important; } +.edu-back-blue-txt{background-color:#F7FBFF!important; } +.edu-bg-light-blue{ background:#f7f9fd; padding:5px;}/*发送实训弹框*/ +/*常用字体*/ +/*红色*/ +.color-red{color: #FF0000!important;} +/*白色*/ +.color-white{color: #ffffff!important;} +/*黑色*/ +.color-dark{color: #05101a!important;} +/*灰色*/ +.color-grey-name{color: #1A0B00!important;} +.color-grey-fa{color: #FAFAFA!important;} +.color-grey-3{color: #333!important;} +.color-grey-eb{color: #EBEBEB!important;} +.color-grey-c{color: #ccc!important;} +.color-grey-cd{color: #cdcdcd!important;} +.color-grey-9{color: #999999!important;} +.color-grey-98{color: #989898!important;} +.color-grey-8{color: #888!important;} +.color-grey-6{color: #666!important;} +.color-grey-4d{color: #4d4d4d!important;} +.color-grey-B2{color: #B2B2B2!important;} +.color-grey-B3{color: #B3B3B3!important;} +.color-grey-B4{color: #B4B4B4!important;} +.color-grey-74{color: #747A7F!important;} + + +a.color-grey-name:hover,a.color-dark:hover,a.color-grey-6:hover,a.color-grey-3:hover{color: #4cacff!important;} +a.color-grey-9:hover,a.color-grey-8:hover,a.color-grey-c:hover{color: #111C24!important;} +/*蓝色*/ +.color-blue{color: #4CACFF!important;}/*主*/ +.color-blue_4C{color: #4CACFF!important;} +a.color-blue:hover,a.color-blue_4C:hover{color: #459BE6!important;} +/*橙色*/ +.color-orange{color: #ff6800!important;}/*辅助文字*/ +.color-orange-tip{color: #FF954C!important;}/*提示文字*/ +a.color-orange:hover,a.color-orange-tip:hover{color: #F06200!important;} +/*黄色*/ +.color-yellow{color: #EFC003!important;} +.color-yellow-ff{color: #FFA800!important} +/*绿色*/ +.color-green{color: #29BD8B!important;} +a.color-green:hover{color: #28AC7F!important;} +/*红色*/ +.color-red-dd{color: #DD1717!important;} +a.color-red-dd:hover{color: #C61616!important;} +/*圆角*/ +.radius{border-radius: 50%;} +.radius4{border-radius: 4px;} +.radius2{border-radius: 2px;} + + +/*绿色圆形--例如:实训路径详情的编辑icon的背景*/ +.ring-green{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: #29BD8B;text-align: center;} +.ring-op-green{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: rgba(41,189,139,0.6);text-align: center;} +.ring-grey{width: 18px;height: 18px;line-height: 18px;display: block;border-radius: 50%;background-color:rgba(204,204,204,0.5);text-align: center;} +.ring-blue{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: #4CACFF;text-align: center;} + +.ring-orange{background-color: #FF6800;display: block;padding: 0px 3px;height: 18px;box-sizing: border-box;min-width: 18px;text-align: center;line-height: 18px;border-radius: 50%;color:#fff;font-size: 12px;} + +/*左侧label内容右对齐*/ +.label-right{min-width:75px;text-align: right;height: 35px;line-height: 35px;float: left; } + + +/*输入框样式---------宽度为百分比*/ +.input-flex-30{flex: 1;height: 30px;padding: 5px;box-sizing: border-box;} +.input-flex-35{flex: 1;height: 35px;padding: 5px;box-sizing: border-box;} +.input-flex-40{flex: 1;height: 40px;padding: 5px;box-sizing: border-box;} +.input-100-35{width: 100%;height: 35px;padding: 5px;box-sizing: border-box;} +.input-100-40{width: 100%;height: 40px;padding: 5px;box-sizing: border-box;} +.input-100-45{width: 100%;height: 45px;padding: 5px;box-sizing: border-box;} +.input-90-35{width: 90%;height: 35px;padding: 5px;box-sizing: border-box;} +.input-60-40{width: 60%;height: 40px;padding: 5px;box-sizing: border-box;} +.input-60-35{width: 60%;height: 35px;padding: 5px;box-sizing: border-box;} +.input-50-35{width: 50%;height: 35px;padding: 5px;box-sizing: border-box;} +.input-50-40{width: 50%;height: 40px;padding: 5px;box-sizing: border-box;} +.input-50-45{width: 50%;height: 45px;padding: 5px;box-sizing: border-box;} +.input-48-45{width: 48%;height: 45px;padding: 5px;box-sizing: border-box;} +/*输入框为灰色背景,获取焦点时背景变白色*/ +.greyInput{background-color: #F5F5F5;outline: none} +.greyInput:focus{background-color: #fff; border: 1px solid #ddd;} + +/*输入框样式---------宽度为固定长度*/ +.winput-240-45{width: 240px;height: 45px;padding: 5px;box-sizing: border-box;} +.winput-240-40{width: 240px;height: 40px;padding: 5px;box-sizing: border-box;} +.winput-240-35{width: 240px;height: 35px;padding: 5px;box-sizing: border-box;} +.winput-240-30{width: 240px;height: 30px;padding: 5px;box-sizing: border-box;} +.winput-190-45{width: 190px;height: 45px;padding: 5px;box-sizing: border-box;} +.winput-200-35{width: 200px;height: 35px;padding: 5px;box-sizing: border-box;} +.winput-120-40{width: 120px;height: 40px;padding: 5px;box-sizing: border-box;} +.winput-120-35{width: 120px;height: 35px;padding: 5px;box-sizing: border-box;} +.winput-120-30{width: 120px;height: 30px;padding: 5px;box-sizing: border-box;} +.winput-115-40{width: 115px;height: 40px;padding: 5px;box-sizing: border-box;} +.winput-90-40{width: 90px;height: 40px;padding: 5px;box-sizing: border-box;} +.winput-90-35{width: 90px;height: 35px;padding: 5px;box-sizing: border-box;} +.winput-240-100{width: 240px;height: 100px;padding: 5px;box-sizing: border-box;} +/*输入框样式---------高度固定*/ +.winput-90-100{width: 90%;height: 100px;padding: 5px;box-sizing: border-box;} +.winput-100-130{width: 100%;height: 130px;padding: 5px;box-sizing: border-box;} +.winput-100-150{width: 100%;height: 150px;padding: 5px;box-sizing: border-box;} +.winput-100-200{width: 100%;height: 200px;padding: 5px;box-sizing: border-box;} +.winput-90-100{width: 90%;height: 100px;padding: 5px;box-sizing: border-box;} +/*百分比宽度*/ +.width100{width: 100%;} +.width90{width: 90%;} +.width89{width: 89%;} +.width80{width: 80%;} +.width70{width: 70%;} +.width60{width: 60%;} +.width50{width: 50%;} +.width40{width: 40%;} +.width30{width: 30%;} +.width20{width: 20%;} +.width15{width: 15%;} +.width10{width: 10%;} + +/*固定大小的宽度*/ +.wid100{width: 100px;display: block} +.wid120{width: 120px;display: block} +.wid90{min-width: 90px!important;display: block} +a.edu-txt-w280,.edu-txt-w280{ width:280px; display: inline-block;text-align: center} +a.edu-txt-w200,.edu-txt-w200{ width:200px; display: inline-block;text-align: center} +a.edu-txt-w190,.edu-txt-w190{ width:190px; display: inline-block;text-align: center} +a.edu-txt-w160,.edu-txt-w160{ width:160px; display: inline-block;text-align: center} +a.edu-txt-w140,.edu-txt-w140{ width:141px; display: inline-block;text-align: center} +a.edu-txt-w130,.edu-txt-w130{ width:130px; display: inline-block;text-align: center} +a.edu-txt-w120,.edu-txt-w120{ width:120px; display: inline-block;text-align: center} +a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;text-align: center} +a.edu-txt-w90,.edu-txt-w90{ width:90px; display: inline-block;text-align: center} +a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center} +a.edu-txt-w40,.edu-txt-w40{ width:40px; display: inline-block;text-align: center} + +/*最小高度*/ +.minH-40{min-height: 490px;} +.minH-280{min-height: 280px;} +.minH-400{min-height: 400px;} +.minH-440{min-height: 440px;} +.minH-500{min-height: 500px;} +.minH-560{min-height: 560px;} +/*超出高度出现滚动条--纵向*/ +.over260{max-height: 260px;overflow-y: auto} +.over210{height: 210px;overflow-y: auto} +.over280{height: 280px;overflow-y: auto} +.over170{min-height: 170px;max-height: 170px;overflow-y: auto} + +/*---------------tab公用边框-----------------*/ +.border-bottom-orange{border-bottom: 2px solid #FC7033!important;} +.bor-bottom-orange{border-bottom: 1px solid #FF9e6a!important;} +.bor-bottom-greyE{border-bottom: 1px solid #EEEEEE!important;} +.bor-left-greyE{border-left: 1px solid #EEEEEE!important;} +.bor-top-greyE{border-top: 1px solid #EEEEEE!important;} +.bor-right-greyE{border-right: 1px solid #EEEEEE!important;} +.bor-left-greyC{border-left: 1px solid #CCC!important;} +.bor-top-greyC{border-top: 1px solid #CCC!important;} +/*---------------边框-----------------*/ +.bor-gray-c{border:1px solid #ccc;} +.bor-grey-e{border:1px solid #eee;} +.bor-grey-d{border:1px solid #ddd;} +.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-none{border:none;} +.bor-outnone{outline:none; border:0px;} + +a.decoration{text-decoration: underline!important;} + +/*下拉菜单*/ +.edu-menu-panel{position: relative;cursor: pointer} +.edu-menu-list{position: absolute;padding: 5px 0px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.2);display: none;width: 120px;background: #FFFFff;right: -5px;border-radius:0px 0px 4px 4px;color: #05101a; font-size: 14px;z-index: 9} +.edu-menu-list li{width: 100%;padding:0px 15px;box-sizing: border-box;height: 35px;line-height: 35px;cursor: pointer;} + +.edu-menuSmall-list{position: absolute;padding: 5px 0px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.2);display: none;width: 100px;background: #FFFFff;right: -5px;border-radius:0px 0px 4px 4px;color: #05101a; font-size: 14px;z-index: 9} +.edu-menuSmall-list li{width: 100%;padding:0px 10px;box-sizing: border-box;height: 30px;line-height: 30px;cursor: pointer;font-size: 12px;} + +.edu-menu-list li a,.edu-menuSmall-list li a{width: 100%;height: 100%;display: block;color: #323232;} +.edu-menu-panel:hover i,.edu-menu-panel:hover{color: #4cacff;} +.edu-menu-panel:hover .edu-menu-list,.edu-menu-panel:hover .edu-menuSmall-list{display: block} +.edu-menu-list li:hover,.edu-menuSmall-list li:hover{background: #4CACFF;} +.edu-menu-list li:hover a,.edu-menuSmall-list li:hover a{color: #fff!important;} +.currentName{display: block;width: 100%;padding:0px 15px;height: 40px;line-height: 40px;font-size: 16px;box-sizing: border-box;cursor: default} +.ul-leftline:after{position: absolute;top:0px;content: "";width: 1px;background-color: #eee;height: 100%;right: 0px;} +.overPart{width: 240px;height: 30px;position: absolute;right: 0;top: -27px;background: transparent;} +/*滑块验证*/ +.drag_slider{ position: relative; background-color: #e8e8e8; width:100%; height: 45px;color: #999999; line-height: 45px; text-align: center;border-radius: 4px;} +.drag_slider .handler{ border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; left: 0px; width: 50px; height: 43px; border: 1px solid #eee; cursor: move;} +.handler_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTEyNTVEMURGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTEyNTVEMUNGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MTc5NzNmZS02OTQxLTQyOTYtYTIwNi02NDI2YTNkOWU5YmUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+YiRG4AAAALFJREFUeNpi/P//PwMlgImBQkA9A+bOnfsIiBOxKcInh+yCaCDuByoswaIOpxwjciACFegBqZ1AvBSIS5OTk/8TkmNEjwWgQiUgtQuIjwAxUF3yX3xyGIEIFLwHpKyAWB+I1xGSwxULIGf9A7mQkBwTlhBXAFLHgPgqEAcTkmNCU6AL9d8WII4HOvk3ITkWJAXWUMlOoGQHmsE45ViQ2KuBuASoYC4Wf+OUYxz6mQkgwAAN9mIrUReCXgAAAABJRU5ErkJggg==") no-repeat center;} +.handler_ok_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDlBRDI3NjVGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDlBRDI3NjRGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphNWEzMWNhMC1hYmViLTQxNWEtYTEwZS04Y2U5NzRlN2Q4YTEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;} +.drag_slider .drag_bg{ background-color: #29bd8b; height: 45px; width: 0px;} +.drag_slider .drag_text{border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; width: 100%; -moz-user-select: none; -webkit-user-select: none; user-select: none; -o-user-select:none; -ms-user-select:none;} + +/*tip公共样式的设置:*/ +.-task-title{opacity:0;position:absolute;left:0;top:0;display:none;z-index:100000;} /*1*/ +.data-tip-down,.data-tip-left,.data-tip-right,.data-tip-top{ position:relative; box-shadow:0px 0px 8px #000; background:#000; color:#fff; max-width:300px;/*2*/ + word-wrap: break-word; text-align:center; border-radius:4px; padding:0 10px; border:1px solid #000; display:none; }/*3*/ +.data-tip-down:after,.data-tip-down:before,.data-tip-left:before,.data-tip-right:before,.data-tip-left:after,.data-tip-right:after,.data-tip-top:after,.data-tip-top:before{/*4*/ + position: absolute;content:''; width:0; height:0;}/*5*/ +.data-tip-down:after,.data-tip-down:before{left: 45%;top:-10px;/*6*/ + border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 10px solid #000; }/*7*/ +.data-tip-down:before{top:-11px;border-bottom:10px solid #000;}/*8*/ +.data-tip-left:after,.data-tip-left:before{left: -10px;top:50%; margin-top:-5px;/*9*/ + border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 10px solid #000; }/*10*/ +.data-tip-left:before{ left: -12px;border-right: 10px solid #000; }/*11*/ +.data-tip-right:after,.data-tip-right:before{right: -10px; top:50%; margin-top:-5px;/*12*/ + border-top: 5px solid transparent;border-bottom: 5px solid transparent; border-left: 10px solid #000; }/*13*/ +.data-tip-right:before{ right: -10px;border-left: 10px solid #000; }/*14*/ +.data-tip-top:after,.data-tip-top:before{left: 45%;bottom:-10px;border-left: 5px solid transparent; + border-right: 5px solid transparent;border-top: 10px solid #000;} +.data-tip-top:before{bottom:-11px;} + + +/*左右两栏排列、固定左右宽度----------ul*/ +ul.abouttable{margin: 0px auto;width: 440px;} +ul.abouttable li{width: 100%;} +ul.abouttable li .rz-label{min-width: 150px;height: 45px;line-height: 45px;text-align: right;color: #adadad;} +ul.abouttable li .second-label{min-width: 150px;height: 40px;line-height: 40px;text-align: right;color: #adadad;} +ul.abouttable li .minh-label{min-width: 150px;height: 28px;line-height: 28px;text-align: right;color: #adadad;} + + + +/* table--------------------------------*/ + +/* table-1底部边框 */ +.edu-pop-table{ width: 100%; border:1px solid #eee; border-bottom:none; background:#fff; color:#888;cursor: default} +.edu-pop-table tr{ height:40px; } +.edu-pop-table tr.edu-bg-grey{ background:#f5f5f5;} +.edu-txt-center{ text-align: center;}.edu-txt-left{ text-align: left;}.edu-txt-right{ text-align: right;} +.edu-pop-table tr th{ color:#333;border-bottom:1px solid #eee; } +.edu-pop-table tr td{border-bottom:1px solid #eee;} +.edu-pop-table.table-line tr td,.edu-pop-table.table-line tr th{ border-right:1px solid #eee;} +.edu-pop-table.table-line tr td:last-child,.edu-pop-table.table-line tr th:last-child{border-right:none;} +/*th行有背景颜色且table无边框*/ +.edu-pop-table.head-color thead tr{background: #fafbfb} +.edu-pop-table.head-color{border: none} +.edu-pop-table.head-color tr:last-child td {border: none} +/*--表格行间隔背景颜色-*/ +.edu-pop-table.interval-td{border-bottom: 1px solid #eee;} +.edu-pop-table.interval-td thead tr{background: #fafbfb} +.edu-pop-table.interval-td tbody tr:nth-child(even){background: #fafbfb} +.edu-pop-table.interval-td tbody tr td{border: none} +/*--表格行间隔背景颜色(th也没有边框)-*/ +.edu-pop-table.interval-all{border:none;border-bottom: 1px solid #eee;} +.edu-pop-table.interval-all thead th{border: none} +.edu-pop-table.interval-all thead tr{background: #fafbfb} +.edu-pop-table.interval-all tbody tr:nth-child(even){background: #fafbfb} +.edu-pop-table.interval-all tbody tr td{border: none;padding:5px 0px} +/*--表格行移入背景颜色-*/ +.edu-pop-table.hover-td tbody tr:hover{background: #EFF9FD}/*悬浮颜色为天蓝色*/ +.edu-pop-table.hover-td_1 tbody tr:hover{background:#FCF2EC}/*悬浮颜色为浅橙色*/ +/* table-2全边框 */ +.edu-pop-table-all{ width: 100%; border:1px solid #eee; background:#fff; color:#888;border-collapse: collapse} +.edu-pop-table-all tr{ height:30px; } +.edu-pop-table-all tr.edu-bg-grey{ background:#f5f5f5;} +.edu-pop-table-all tr th{ color:#333;border:1px solid #eee; } +.edu-pop-table-all tr td{border:1px solid #eee;padding: 5px} +/*table无边框、无背景颜色*/ +.allNone{background: none!important;cursor: default;border-bottom:none!important;} +.allNone tr{height: 30px!important;} + +/*数据为空公共页面*/ +img.edu-nodata-img{ width:300px; margin:50px auto 20px; display: block;} +.edu-nodata-p{ font-size: 20px; text-align: center; color:#999;border-bottom:none!important;padding-left: 18px;box-sizing: border-box;} + +/*输入为空或者错误的提示*/ +.input-none{box-shadow: 0px 0px 2px rgba(0,0,0,0.1);} +.notice{height: 25px;margin-left: 150px;} +.input-none + .notice span{display: block} + +/*列表里菜单icon移入*/ +.edu-position-hide{ position: absolute; top:15px; left:-20px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); background:#fff;z-index:1001; padding:5px 0;z-index: 999999;} +.edu-position-hide li a{ display:inline-block; height: 30px; width: 100px; line-height: 30px; text-align: center; font-size:12px!important; } +.edu-position-hide li a:hover{ background:#F1F1F1; color:#05101A;} +.edu-position-hidebox i{ color:#bcbcbc;} +.edu-position-hidebox i:hover{ color:#4CACFF;} +.edu-position-hidebox a{ color:#05101A;} +.edu-position-hidebox:hover .edu-position-hide{ display: block;} + +/*搜索(灰色背景、点击变白色)*/ +.seekPanel > input{width: 100%;height: 30px;line-height: 30px;background-color: #f4f4f4;border:1px solid #eaeaea;padding: 0px 30px 0px 5px ;box-sizing: border-box;outline: none;} +.seekPanel > input:focus{background-color: #fff;} +.seekPanel > i{position: absolute;right: 7px;top: -1px;} +/*-------------------------------------------公用按钮:以white-btn(或者edu-default-btn无padding)为基础,宽度和高度可以用padding填充,颜色用edu-color-btn,begin-----------------------------------------*/ +/*按钮*/ +/*默认按钮*/ +/*长条形按钮*/ +.default_btn{display: block;border-radius: 5px ;background: #f4f4f4;color: #cfcfcf!important;text-align: center;width: 102px;box-sizing: border-box} +/*正常按钮*/ +.white-btn{text-align:center;cursor: pointer;display: inline-block;padding: 0px 8px;border: 1px solid #ccc;color: #666;letter-spacing: 1px;font-size: 14px;height: 26px;line-height: 26px;border-radius: 3px;} +a.white-btn.orange-btn{border: 1px solid #FF7500;color: #FF7500!important;} +a.white-btn.orange-btn:hover{border: 1px solid #F06200;color: #F06200!important;} + +.defalutGreyBorder{display: block;padding: 0px 10px;border:1px solid #ccc;height: 30px;line-height: 30px;border-radius: 4px;} +a.task-btn{cursor: pointer;display: inline-block;border: none;padding: 0 12px;color: #fff;background: #CDCDCD !important;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 2px; font-weight: 400;} +/*最新按钮:以个人主页为例-------------因高度和宽度都已经固定,后续不再支持使用,*/ +.user_default_btn{cursor: pointer;font-size: 14px;display: block;width: 120px;text-align: center;height: 40px;line-height: 40px!important;border-radius: 4px;box-sizing: border-box} +.user_orange_btn{color: #fff!important;background-color: #FF6800;}/*橙色签到按钮*/ +.user_orange_btn:hover{background-color:#F06200;} +.user_grey_btn{color: #fff!important;background-color: #CCCCCC;cursor: default}/*灰色已经签到按钮*/ +.user_private_btn{color:#646464!important;background-color: #fff;border: 1px solid #989898}/*灰色私信、互相关注按钮*/ +.user_private_btn:hover{color: #B2B2B2!important;border: 1px solid #B2B2B2;} +.btn_auto{border-radius: 5px ;background: #fff;padding: 0px 18px;} + +/*可共用按钮,需添加padding或者边框*/ +.edu-default-btn{display: block;border-radius: 4px;} +a.edu-focus-btn{padding: 0px 10px;height: 30px;line-height: 30px;border: 1px solid #b2b2b2;color: #b2b2b2!important;} +a.edu-focus-btn:hover{border: 1px solid #666;color: #666!important;} + +a.edu-greenback-btn{padding: 0px 10px;background: #29BD8B;color: #fff!important;border: 1px solid #29BD8B;} +a.edu-greenline-btn{padding: 0px 10px;color: #29BD8B!important;border: 1px solid #29BD8B;} +a.edu-greenback-btn:hover{background-color: #28AC7F;} +a.edu-greenline-btn:hover{border:1px solid #28AC7F;color: #28AC7F!important;} + +a.edu-blueback-btn{padding: 0px 10px;background: #4CACFF;color: #fff!important;border: 1px solid #4CACFF;} +a.edu-blueline-btn{padding: 0px 10px;color: #4CACFF!important;border: 1px solid #4CACFF;} +a.edu-blueback-btn:hover{background-color: #459BE6;} +a.edu-blueline-btn:hover{border:1px solid #459BE6;color: #459BE6!important;} + +a.edu-orangeback-btn{background-color: #ff7500;color: #fff!important;border:1px solid #FF7500} +a.edu-orangeback-btn:hover{background-color: #F06200;} +a.edu-orangeline-btn{color: #FF7500!important;border:1px solid #FF7500} +a.edu-orangeline-btn:hover{color: #F06200!important;border:1px solid #F06200} + +a.edu-greyback-btn{padding: 0px 10px;background: #CCCCCC;color: #fff!important;border: 1px solid #CCCCCC;} +a.edu-greyback-btn:hover{background-color: #B2B2B2;} +a.edu-greyshallowline-btn{padding: 0px 10px;color: #999!important;border:1px solid #CFCFCF} +a.edu-greyline-btn{padding: 0px 10px;background: #fff;color: #666!important;border: 1px solid #eaeaea;line-height: 33px;height: 33px;} +a.edu-greyline-btn:hover,a.edu-greyshallowline-btn:hover{border:1px solid #B2B2B2;color:#B2B2B2!important;} + +/*新建页面的提交和取消按钮*/ +.defalutCancelbtn{display: block;border: 1px solid #CDCDCD;background-color: #fafafa;color: #999!important;width: 120px;text-align: center;height: 30px;line-height: 30px;border-radius: 2px; + width: 130px; + height: 40px; + background: rgba(77,124,254,0); + border: 1px solid rgba(76, 172, 255, 1); + border-radius: 4px; + line-height: 40px; + font-size: 16px; + font-family: MicrosoftYaHei; + font-weight: 400; + color: rgba(76,172,255,1) !important; +} +.defalutCancelbtn:hover{border:1px solid #B2B2B2;color: #B2B2B2!important;} +.defalutSubmitbtn{ + display: block;border: 1px solid #4CACFF;background-color: #4CACFF;color: #fff!important;width: 120px;text-align: center;line-height: 40px;border-radius: 2px; + width: 130px; + height: 40px; + background: rgba(76,172,255,1); + border-radius: 4px; + font-size: 16px; + font-family: MicrosoftYaHei; + font-weight: 400; + color: rgba(255,255,255,1); +} +.defalutSubmitbtn:hover{background-color: #459BE6;border: 1px solid #459BE6;} +/*-------------------------------------------公用按钮:以white-btn(或者edu-default-btn无padding)为基础,宽度和高度可以用padding填充,颜色用edu-color-btn,end-----------------------------------------*/ + +/*可点击按钮---蓝色*/ +.use_btn{background: #4cacff;color:#fff!important;} +a.task-btn-orange{background: #4CACFF!important; color:#fff!important;} +a:hover.task-btn-orange{background: #459BE6;} +/*可点击按钮---蓝色---蓝色边框*/ +.user_blue_btn{border: 1px solid #4CACFF;color: #4CACFF!important;} +/*可点击按钮---蓝色---蓝色背景*/ +a.user_bluebg_btn{background-color:#4CACFF;color: #fff;} +a.user_orangebg_btn{background-color:#FF6800;color: #fff;} +a.user_greybg_btn{background-color:#747A7F;color: #fff;} + + +.pointer{cursor: pointer} +.cdefault{cursor: default} + + +/*md编辑器恢复被覆盖样式*/ +.new_li li{ list-style-type: disc!important; } +.new_li ol li{ list-style-type: decimal!important; } +.new_li li{ margin-bottom: 0!important; } + +/*搜索框*/ +#pollingPanel{position: relative;width: 248px;height: 32px;} +#pollingPanel > input{width: 100%;height: 100%;border:1px solid #eaeaea;border-radius: 4px;padding: 0px 30px 0px 5px;box-sizing: border-box;background-color: #F4F4F4;} +#pollingPanel > input:focus{background-color: #fff;outline: none;} +#pollingPanel > a{position: absolute;right: 10px;top:0px;} + +/* 弹框 */ +.popupAll{width: 100%;height: 100%;position: fixed;z-index: 99998;background-color: rgba(5,16,26,0.6);left: 0;top:0;} +.task-popup{ width: 30%;background: #fff; border:1px solid #e8e8e8; border-radius:10px;} +.task-popup-text-center{ text-align: center; color: #333;} +.task-popup-title{ border-bottom: 1px solid #eee; padding:0px 15px;text-align: center;box-sizing: border-box;line-height: 70px;height: 70px; border-radius: 10px 10px 0px 0px;font-size: 16px;font-weight: bold; } +.task-popup-content{ padding:15px;} +.task-popup-submit{ margin:0px auto 15px; width: 160px;} +.task-popup-sure{ margin:0px auto 15px; width: 54px;} +.task-popup-right-sure{margin:0px auto 15px;text-align: center} +.task-popup-OK{ margin:15px auto; text-align: center} +.task-popup-bggrey{ background:#fff; color:#333;} +#closeIcon{position: absolute;color:#fefefe} +/* 模板弹框 20170407byLB */ +#task_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);} +.task_popup_top{background:#ccc;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;} +.task_popup_top h3{ font-size:14px; color:#333; line-height:40px; padding-left:10px; } +a.task_icons_close{width:20px; height:20px;display:block;background: url(../images/popup/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;} +a:hover.task_icons_close{background: url(../images/popup/sy_icons_close.png) -40px 0px no-repeat;} +.task_popup_con{ padding:20px;} +/* 模板弹框 20161013byLB */ +#muban_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);} +.muban_popup_top{background:#3b94d6;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;} +.muban_popup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px; } +a.muban_icons_close{width:20px; height:20px;display:block;background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;} +a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;} +#muban_popup_box input,#muban_pwopup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;} +#muban_popup_box label.pop_box_label{width: 100px; text-align: right; display: inline-block;} +input.radio-width90{ width: 90px; } +#muban_popup_box label.pop_box_label_l {width: 100px; text-align: left; display: inline-block;} + + +/*提示条*/ +.alert{ padding:10px;border: 1px solid transparent; text-align: center;} +.alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;} +.alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;} +.task-close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;} +.taskclose:hover{opacity: 0.5;} +.alert-red{background-color: #f2dede;border-color: #eed3d7; color: #d14f4d; text-align: left!important;} + +/*搜索的下拉列表*/ +.search_down_list a{display: block;height: 28px;line-height: 28px;padding: 0px 5px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} +.search_down_list a:hover{background: #fafafa;} + +/*白色色块--类似个人主页-学习-里面的tab*/ +.white-panel{border-radius: 2px;width: 100%;margin: 0px auto;box-sizing: border-box;padding-left: 25px;} +.white-panel li{width: 118px;height: 48px;line-height: 48px;text-align: center;color: #05101A;float: left;cursor: pointer;border:1px solid #fff;} +.white-panel li a{display: block;width: 100%;} +.white-panel li.active{border-radius: 24px;border:1px solid #4CACFF;color:#4CACFF; } +.white-panel li.active a{color:#4CACFF; } + + +/* 个人主页翻页 */ +.pages_user_show a:hover,.pages_user_show li.active a{ background-color:#4CACFF; color:#fff;border: 1px solid #4CACFF;} +.pages_user_show a{border-radius: 2px; display: inline-block;border:1px solid #d1d1d1;background-color:#fff; color:#888; float:left;text-align:center; padding:2px 10px; line-height:1.9; margin: 0 5px;} +.pages_user_show li{float: left; list-style-type: none;} +.pages_user_show ul li{list-style-type: none !important;} +.pages_user_show ul li a{color:#888} +.page_GO{text-align:center;width: 80px;border-radius: 2px;margin-left: 5px;height: 33px;padding: 0px 5px;box-sizing: border-box;float: left;border:1px solid #d1d1d1;} +/* 小翻页 */ +.pages_little_show a:hover,.pages_little_show li.active a{ background-color:#4CACFF;; color:#fff!important;border:1px solid #4CACFF} +.pages_little_show a{ display: inline-block;border:1px solid #d1d1d1; color:#888!important; float:left;text-align:center; padding:3px 3px; line-height:1.9; margin: 0 2px; font-size: 12px;} +.pages_little_show li{float: left;} + +/*左右排版结构:参考个人主页的经验值和金币等页面*/ +.leftPanel{width: 22%;float: left;} +.leftPanel li.nav{padding:10px 0px;box-sizing: border-box;} +.leftPanel li.nav a{padding-left: 40px;display: block;width: 100%;box-sizing: border-box;border-left: 2px solid #fff;height: 24px;line-height: 24px;} +.leftPanel li.nav.active a{border-left: 2px solid #4CACFF;} +.rightPanel{width:78%;float: right;} + +/*个人主页,认证的圆圈*/ +.ringauto{width: 20px;height: 20px;line-height: 20px;text-align: center;border-radius: 50%;background-color: #F4FAFF;margin-right:5px;} + +/*-------------------个人主页:右侧提示区域--------------------------*/ +.-task-sidebar{position:fixed;width:40px;height:180px;right:0;bottom:30px;z-index: 10;} +.-task-sidebar div{height: 40px;line-height: 40px;box-sizing: border-box;width:40px;background:#4CACFF;color:#fff;font-size:20px;text-align:center;margin-bottom:5px;border-radius: 4px;} +.-task-sidebar div i{ color:#fff;} +.-task-sidebar div i:hover{color: #fff!important;} +.gotop{background-color: rgba(208,207,207,0.5)!important;padding: 0px!important;} +.-task-desc{background:#494949;width:90px;line-height: 36px;text-align: center; + position: absolute;color: #fff;font-size: 13px;z-index: 999999;opacity: 0;} +.-task-desc div{position: absolute;top:10px;right: -7px;height: 13px;} +.-task-desc div img{float: left} + + +/***** loading ******/ +/*****载入中******/ +#ajax-indicator { + position: absolute; /* fixed not supported by IE*/ + background-color:#eee; + border: 1px solid #bbb; + top:35%; + left:40%; + width:20%; + /*height:5%;*/ + font-weight:bold; + text-align:center; + padding:0.6em; + z-index:100000; + opacity: 0.5; +} + +html>body #ajax-indicator { position: fixed; } + +#ajax-indicator span{ + color:#fff; + color: #333333; + background-position: 0% 40%; + background-repeat: no-repeat; + background-image: url(/images/loading.gif); + padding-left: 26px; + vertical-align: bottom; + z-index:100000; +} +/*最新、最热*/ +.bestChoose.active{color: #4CACFF;} + + +/*实训路径选择实训*/ +.edu-filter-cir-grey{color: #666!important;width: auto;padding:0px 15px; font-size:14px !important; text-align: center;background: #f3f3f3;border-radius: 10px;display: block; height:25px; line-height:25px;} +.edu-filter-cir-grey:hover{background: #4cacff; color: #ffffff!important;} +.edu-filter-cir-grey.active{background: #4cacff; color: #ffffff!important; font-size: 14px !important;} + + +.with10{ width: 10%;box-sizing: border-box}.with12{ width: 12%;box-sizing: border-box}.with13{ width: 13%;box-sizing: border-box}.with14{ width: 14%;box-sizing: border-box}.with15{ width: 15%;box-sizing: border-box} +.with20{ width: 20%;box-sizing: border-box}.with22{ width: 22%;box-sizing: border-box}.with23{ width: 23%;box-sizing: border-box}.with25{ width: 25%;box-sizing: border-box} +.with30{ width: 30%;box-sizing: border-box}.with35{ width: 35%;box-sizing: border-box} +.with40{ width: 40%;box-sizing: border-box}.with45{ width: 45%;box-sizing: border-box}.with49{ width: 49%;box-sizing: border-box} +.with50{ width: 50%;box-sizing: border-box}.with55{ width: 55%;box-sizing: border-box} +.with52{ width: 52%;box-sizing: border-box}.with48{ width: 48%;box-sizing: border-box} +.with60{ width: 60%;box-sizing: border-box}.with65{ width: 65%;box-sizing: border-box} +.with70{ width: 70%;box-sizing: border-box}.with73{ width: 73%;box-sizing: border-box}.with75{ width: 75%;box-sizing: border-box}.with77{ width: 77%;box-sizing: border-box}.with78{ width: 78%;box-sizing: border-box} +.with80{ width: 80%;box-sizing: border-box}.with85{ width: 85%;box-sizing: border-box} +.with87{ width: 87%;box-sizing: border-box}.with90{ width: 90%;box-sizing: border-box}.with95{ width: 95%;box-sizing: border-box} +.with100{ width: 100%;} + +.transform-90{ + transform:rotate(-90deg); + -ms-transform:rotate(-90deg); /* IE 9 */ + -moz-transform:rotate(-90deg); /* Firefox */ + -webkit-transform:rotate(-90deg); /* Safari 和 Chrome */ + -o-transform:rotate(-90deg); +} + +.newplayVedio{ + font-size: 86px !important; +} +.icon-qizhi{ + font-size:30px !important; +} +.icon-31{ + font-size: 68px !important; +} + +/*置顶*/ +.btn-cir {display: inline-block;padding: 0px 5px;border-radius: 25px;line-height: 20px;font-size: 12px;} +.btn-cir-red{background:red;color: #fff; font-weight: normal;cursor: default} +.btn-cir-red:hover{background:red;color: #fff!important;} +.btn-cir-grey{background: #e1e1e1;color: #8c8c8c;font-weight: normal;border: 1px solid #e1e1e1} + +/*动态标签*/ +.edu-filter-btn{cursor: default;display: inline-block; padding:0px 9px; color:#666; background:#fff; text-align: center; border-radius:10px; font-size:12px; height:18px; line-height:18px;} +.edu-filter-btn-blue{border:1px solid #3498db; color:#3498db;} +.edu-filter-btn-orange{border:1px solid #ff6800; color:#ff6800!important;}/*提交中、评阅中*/ +.edu-filter-btn-red{border:1px solid #DD1717; color:#DD1717;}/*已截止、未开启补交*/ +.edu-filter-btn-green{border:1px solid #29BD8B; color:#29BD8B!important;}/*申诉中、已开启补交*/ +.edu-filter-btn-appeal{border:1px solid #FF4343; color:#FF4343!important;}/*申诉中*/ +.edu-filter-btn-yellow{border:1px solid #ef9324; color:#ef9324;} +.edu-filter-btn-danger{background:#d72e36; color:#fff;} +.edu-filter-btn-late{border:1px solid #3fbcff; color: #3fbcff;} +.edu-filter-btn-no-late{border:1px solid #747A7F;color: #747A7F;}/*未发布*/ +.edu-filter-btn-end{border: 1px solid #999999;color: #999999;}/*已结束*/ +/*动态按钮*/ +.edu-activity-orange{background-color:#FF6800;color:#fff!important;cursor: pointer;border: 1px solid #ff6800;}/*修改作品、补交作品、立即补交、补交附件*/ +.edu-activity-blue{background-color:#4CACFF;color:#fff!important;cursor: pointer;border: 1px solid #4CACFF;}/*开始实战、开始答题、继续答题、继续实战、提交作品*/ +.edu-activity-grey{background-color:#747A7F;color:#fff!important;cursor: pointer;border: 1px solid #747A7F;}/*匿评作品*/ +.edu-activity-green{background-color:#29BD8B;color:#fff!important;cursor: pointer;border: 1px solid #29BD8B;}/*查看作品、查看实战、查看答题*/ +.edu-activity-light-grey{background-color:#cbcbcb;color:#fff!important;cursor: pointer;border: 1px solid #cbcbcb;}/*取消关联*/ +/*课堂设置页面*/ +.course-ul-nav{width: 100%;border-bottom: 1px solid #EBEBEB;} +.course-ul-nav a{display: inline-block;padding: 20px;font-size: 18px;text-align: center;width: 94px;position: relative} +.course-ul-nav a.active,.course-ul-nav a:hover{color: #4CACFF;} +.course-ul-nav a.active:after{content: '';width: 94px;left: 20px;bottom: 0px;height: 2px;background-color: #4CACFF;position: absolute} + +/*-----下拉框--------*/ +.down-select{display:none;position: absolute;z-index: 10;left: 0px;width: 100%;overflow-y: auto;background: #fff;max-height: 200px;border:1px solid #eee;} +.down-select p{height: 35px;line-height: 35px;padding-left: 5px;cursor: pointer} +.down-select p:hover{background: #f3f4f6} + + + +.paddingLeft28{padding-left:28px;} + +.ant-modal-header{ + border-radius: 10px; +} + +.color656565{ + color:#656565; +} + +.colorC8161D{ + color:#C8161D; +} + +.bor-reds{ + border:1px solid #FF0000!important; + border-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +.editormd-dialog-footer{ + padding: 0px; +} +.educontentysl{width: 1250px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/ From 8782c4b15d9f1e207fa864ddf77755e127c429e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 25 Jun 2019 11:33:35 +0800 Subject: [PATCH 158/964] =?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 --- .../courses/coursesPublic/Associationmodel.js | 83 ++++++++++++------- .../react/src/modules/courses/css/Courses.css | 4 +- .../tasks/GraduationTasksSubmitedit.js | 20 ++--- .../tasks/GraduationTasksSubmitnew.js | 15 ++-- .../graduation/tasks/GraduationTasksnew.js | 8 +- .../tasks/GraduationTaskssettinglist.js | 21 ++--- 6 files changed, 85 insertions(+), 66 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/Associationmodel.js b/public/react/src/modules/courses/coursesPublic/Associationmodel.js index 1f10caa5f..9af795931 100644 --- a/public/react/src/modules/courses/coursesPublic/Associationmodel.js +++ b/public/react/src/modules/courses/coursesPublic/Associationmodel.js @@ -22,6 +22,7 @@ class Associationmodel extends Component{ projects:undefined, projectvalue:undefined, projectvaluetype:false, + searchtypes:false } } @@ -38,10 +39,10 @@ class Associationmodel extends Component{ search: search } }).then((result)=>{ - console.log(result) if(result.status===200){ this.setState({ - projects:result.data.projects + projects:result.data.projects, + searchtypes:search===undefined&&result.data.projects.length==0?true:false }) } @@ -58,13 +59,11 @@ class Associationmodel extends Component{ goback=()=>{ - this.props.funlist() - this.props.Cancel() - console.log(this.props) this.setState({ Modalstype:false, - }) + this.props.funlist() + this.props.Cancel() } @@ -80,13 +79,13 @@ class Associationmodel extends Component{ if(result.status===200){ if(result.data.status===0){ - this.setState({ - Modalstype:true, - Modalstopval:result.data.message, - ModalSave:this.goback, - loadtype:true - }) - this.props.funlist() + // this.setState({ + // Modalstype:true, + // Modalstopval:result.data.message, + // ModalSave:this.goback, + // loadtype:true + // }) + this.goback } } @@ -96,7 +95,9 @@ class Associationmodel extends Component{ }) } Saves=()=>{ - let {projectvalue}=this.state; + let {projectvalue,searchtypes}=this.state + if(searchtypes===false){ + if(projectvalue===undefined||projectvalue===""){ this.setState({ projectvaluetype:true, @@ -114,30 +115,26 @@ class Associationmodel extends Component{ project_id: projectvalue } }).then((result)=>{ - if(result.status===200){ - if(result.data.is_relate===false){ - this.setSaves() - }else{ - this.setState({ Modalstype:true, Modalstopval:"该项目已被"+result.data.relate_user+"关联", ModalSave:this.ModalSave, loadtype:true }) - } - } - }).catch((error)=>{ console.log(error) }) - } + }else{ + this.goback() + } + + } onChange = (e) => { @@ -190,7 +187,7 @@ class Associationmodel extends Component{ destroyOnClose={true} >
    -

    + {this.state.searchtypes===false?

    -

    - -
    +

    :""} + + {this.state.searchtypes===false?
    {projects&&projects.map((item,key)=>{ return(
    -
    {item.project_name}
    +
    {item.project_name}
    ) })}
    -
    +
    : + +
    + +
    + 你当前尚未管理任何项目,请先 创建项目 再关联 +
    +
    } {projectvaluetype===true?请先选择项目:""} -
    + diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index a5c42cd69..eca0c53d5 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -1314,8 +1314,8 @@ a.white-btn.use_scope-btn:hover{ .Association{ width: 100%; - height: 400px; - padding: 20px; + height: 240px; + margin-top: 14px; overflow: auto; } diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index a36917df2..a4202b6da 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -80,7 +80,8 @@ class GraduationTasksSubmitedit extends Component{ let workId=this.props.match.params.work_Id; let {workslist}=this.state let task_id=workslist&&workslist.task_id; - window.location.href="/courses/"+coursesId+"/graduation_tasks/"+task_id+"/"+workId+"/works/edit"; + // window.location.href="/courses/"+coursesId+"/graduation_tasks/"+task_id+"/"+workId+"/works/edit"; + window.location.href="/courses/"+coursesId+"/graduation_tasks/"+workId+"/appraise"; } handleSubmit=(e) => { @@ -248,7 +249,7 @@ class GraduationTasksSubmitedit extends Component{ onAttachmentRemove = (file) => { let {attachments,fileList}=this.state; - const url = `/attachments/${file.uid===undefined?file.id:file.uid}.json` + const url = `/attachments/${file}.json` axios.delete(url, { }) .then((response) => { @@ -592,7 +593,9 @@ class GraduationTasksSubmitedit extends Component{ {workslist&&workslist.task_type===1?"": -
    +
    @@ -653,9 +657,7 @@ class GraduationTasksSubmitedit extends Component{ }) } disabled={item.commit_status===true?true:false} className="fl "> - -
    {item.user_name}
    -
    +
    {item.user_name}
    {item.group_name}
    {item.student_id}
    {item.commit_status===false?已提交 :""}
    @@ -680,12 +682,10 @@ class GraduationTasksSubmitedit extends Component{ height: '30px', display:item.user_name===undefined?"none":"" }}> - -
    {item.user_name}
    -
    +
    {item.user_name}
    {item.group_name}
    {item.student_id}
    - {key>0?
    this.delecttask_status(item.user_id)}>
    :""} + {key>0?
    this.delecttask_status(item.user_id)}>
    :""}
    ) })} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index b68458e3f..52ac6ae61 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -550,7 +550,9 @@ render(){ {workslist&&workslist.task_type===1?"": -
    +
    {memberslist===undefined?"":memberslist.members.length===0? @@ -626,9 +629,7 @@ render(){ }) } disabled={item.commit_status===true?true:false} className="fl "> - -
    {item.user_name}
    -
    +
    {item.user_name}
    {item.group_name}
    {item.student_id}
    {item.commit_status===true?已提交 :""}
    @@ -657,12 +658,10 @@ render(){ height: '30px', display:item.user_name===undefined?"none":"" }}> - -
    {item.user_name}
    -
    +
    {item.user_name}
    {item.group_name}
    {item.student_id}
    - {key>0?
    this.delecttask_status(item.user_id)}>
    :""} + {key>0?
    this.delecttask_status(item.user_id)}>
    :""}
    ) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js index ccbaa8646..fec4248df 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js @@ -309,12 +309,10 @@ class GraduationTasksnew extends Component { (选择确认后,无法修改)
    - + {getFieldDecorator('name', { - rules: [{required: true, message: "不能为空"}], - })()} + rules: [{ required: true, message: "请输入标题" }], + })()}
    diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 0d932cc40..5bf89a3ce 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -560,6 +560,7 @@ class GraduationTaskssettinglist extends Component{ AssociationItems=()=>{ + this.setState({ visibles:true }) @@ -1264,8 +1265,6 @@ class GraduationTaskssettinglist extends Component{ } } - - console.log(columns) return( @@ -1346,13 +1345,15 @@ class GraduationTaskssettinglist extends Component{ />:""} {/*关联项目*/} - {visibles===true?this.Cancel()} taskid={taskslistdata&&taskslistdata.task_id} - funlist={this.searchValue()} - />:""} + funlist={()=>this.searchValue()} + /> + :""} {taskslistdata&&taskslistdata? // 教师列表 @@ -1572,13 +1573,13 @@ class GraduationTaskssettinglist extends Component{ {taskslistdata&&taskslistdata.uncommit_count} 未交 - + {taskslistdata&&taskslistdata.left_time.status===null?"": {taskslistdata&&taskslistdata.left_time.status} : {taskslistdata&&taskslistdata.left_time.time} - + }
    :""} @@ -1833,13 +1834,13 @@ class GraduationTaskssettinglist extends Component{ {taskslistdata&&taskslistdata.uncommit_count} 未交 - + {taskslistdata&&taskslistdata.left_time.status===null?"": {taskslistdata&&taskslistdata.left_time.status} : {taskslistdata&&taskslistdata.left_time.time} - + }
    :""} From 7645300243db26eb3e5653e0a4e20beb9aed40fc Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 25 Jun 2019 14:06:13 +0800 Subject: [PATCH 159/964] =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/context/TPIContextProvider.js | 9 +++++++-- .../src/modules/page/main/CodeEvaluateView.js | 16 ++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index 60d63a1bd..da8ddc724 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -462,7 +462,7 @@ pop_box_new(htmlvalue, 480, 182); // myshixun_manager power is_teacher resData.power = 0 resData.myshixun_manager = false - resData.is_teacher = false + // resData.is_teacher = false if (resData.user.identity === EDU_ADMIN) { resData.power = 1 @@ -514,6 +514,10 @@ pop_box_new(htmlvalue, 480, 182); currentGamePassed: false, // 切换game时重置passed字段 }) + var data = {"st":0,"discusses_count":12,"game_count":6,"record_onsume_time":5.303,"prev_game":"q67plhfjaogy","next_game":"lfrwm2ohiate","praise_count":0,"user_praise":false,"time_limit":180,"tomcat_url":"http://47.98.226.234","is_teacher":true,"myshixun_manager":false,"game":{"id":1964918,"myshixun_id":510423,"user_id":73892,"created_at":"2019-06-24T11:22:58.000+08:00","updated_at":"2019-06-25T11:15:48.000+08:00","status":0,"final_score":0,"challenge_id":573,"open_time":"2019-06-24T11:22:58.000+08:00","identifier":"yrsxolqk6zcp","answer_open":0,"end_time":null,"retry_status":0,"resubmit_identifier":null,"test_sets_view":false,"picture_path":null,"accuracy":null,"modify_time":null,"star":0,"cost_time":3966,"evaluate_count":1,"answer_deduction":0},"challenge":{"id":573,"shixun_id":186,"subject":"应用模型做预测","position":4,"task_pass":"####本关任务\r\n本关卡学习如何应用机器学习模型来做预测。\r\n\r\n####相关知识\r\n在前一关卡中,我们一起探讨了机器学习的一般原理,并建立了一个非常简单的电影评分模型Model 0:\r\n\r\n评分 = **大众对电影的平均评分** + **用户个人的给分偏好** + **电影的评分偏好**\r\n\r\n针对这个模型,我们设计了一个非常朴素的预测模型Baseline,直接从数据集中统计得到上述三个参数的值。\r\n\r\n在本关卡中,我们将应用这个模型对用户和电影的评分做出预测。\r\n\r\n####编程要求\r\n回顾Model 0的预测评分公式:\r\n```latex\r\nf(u,m)=g+\\alpha(u)+\\beta(m)\r\n```\r\n\r\n我们的Baseline模型得到了$$g$$、$$\\alpha$$和$$\\beta$$三种参数,下面我们实现predict函数,来对测试数据集中未知的用户电影评分进行预测,需要填充的代码块如下:\r\n```python\r\n# -*- coding:utf-8 -*-\r\n\r\ndef predict(g, alpha, beta, test_data):\r\n\t\"\"\"预测用户对电影的评分\r\n\t参数:\r\n\t\tg - 浮点数,模型参数平均电影评分\r\n\t\talpha - 浮点数组,用户评分偏差参数数组\r\n\t\tbeta - 浮点数组,电影评分偏差参数数组\r\n\t\ttest_data - Pandas的DataFrame对象,有两列'user','movie',是测试数据集\r\n\t返回值:\r\n\t\tret - 浮点数数组,预测的评分数组,举例ret[10],表示第10组用户和电影对的评分值\r\n\t\"\"\"\t\r\n\tret = []\r\n\tN = len(alpha)\r\n\tM = len(beta)\r\n\t\r\n\t# 请在此添加实现代码\r\n\t#********** Begin *********#\r\n\t\r\n\t#********** End *********#\r\n\t\r\n\treturn ret\r\n```\r\n\r\n####本关任务\r\n本关卡的测试数据来自内置测试文件,平台将比对您所编写函数的预测评分与正确评分,只有所有数据全部计算正确才能进入下一关。","score":500,"path":"src/step4/doprediction.py","st":0,"web_route":null,"modify_time":null},"shixun":{"id":186,"name":"理解机器学习基本概念:从电影评分预测讲起","user_id":24758,"gpid":3676,"visits":622,"created_at":"2017-08-25T18:07:41.000+08:00","updated_at":"2019-06-02T11:05:20.000+08:00","status":2,"language":"MachineLearning","authentication":false,"identifier":"58DRWG63","trainee":3,"major_id":635,"webssh":0,"homepage_show":false,"hidden":false,"fork_from":null,"can_copy":true,"modify_time":"2017-09-29T21:42:16.000+08:00","reset_time":"2017-09-29T21:42:16.000+08:00","publish_time":"2017-09-29T10:58:13.000+08:00","closer_id":null,"end_time":null,"git_url":"educoder/58drwg63","vnc":false,"myshixuns_count":318,"challenges_count":6,"use_scope":0,"mirror_script_id":0,"image_text":null,"code_hidden":false,"task_pass":false,"exec_time":180,"test_set_permission":true,"sigle_training":false,"hide_code":false,"multi_webssh":false,"excute_time":null,"repo_name":"educoder/58drwg63","averge_star":4.9,"opening_time":null,"users_count":10,"forbid_copy":false,"pod_life":0},"myshixun":{"id":510423,"shixun_id":186,"is_public":true,"user_id":73892,"gpid":null,"created_at":"2019-06-24T11:22:55.000+08:00","updated_at":"2019-06-24T13:56:40.000+08:00","status":0,"identifier":"7pkwxim9eh","commit_id":"ff7c6652fdfdf62eaa1316d39400ebdbd6cb81fb","modify_time":"2017-09-29T21:42:16.000+08:00","reset_time":"2017-09-29T21:42:16.000+08:00","system_tip":false,"git_url":null,"onclick_time":"2019-06-24T11:22:55.000+08:00","repo_name":"p35840769/7pkwxim9eh20190624112255"},"user":{"user_id":73892,"login":"p35840769","name":"韩半安","grade":6895,"image_url":"avatars/User/b","school":"国防科技大学","identity":6},"tpm_modified":false,"tpm_cases_modified":false,"mirror_name":["MachineLearning"],"has_answer":true,"test_sets":[{"is_public":true,"result":false,"input":"771 253 360 99 8 759 976 387 873 829 437 53 854 148 447 179 246 810 158 653 583 929 691 892 263 230 637 221 7 652 127 965 767","output":"3.577 -0.329 2.648 4.727 4.351 2.616 3.496 3.059 3.470 3.166 3.064 2.716 3.712 4.003 3.064 3.462 4.004 2.067 3.860 0.121 3.807 3.735 4.230 3.137 4.431 2.468 4.018 5.218 4.351 4.121 4.050 4.587 3.777","actual_output":"Traceback (most recent call last):\r\n File \"src/step4/main.py\", line 3, in \u003cmodule\u003e\r\n from doprediction import predict\r\nImportError: cannot import name 'predict'\r\n","compile_success":1},{"is_public":false,"result":false,"compile_success":1}],"allowed_unlock":true,"last_compile_output":"共有2组测试集,其中有2组测试结果不匹配。详情如下:","test_sets_count":2,"sets_error_count":2} + this._handleResponseData(data) + return + axios.get(url, { // https://stackoverflow.com/questions/48861290/the-value-of-the-access-control-allow-origin-header-in-the-response-must-not-b // withCredentials: true, @@ -835,7 +839,8 @@ pop_box_new(htmlvalue, 480, 182); {this.state.gDialogContentText} - + {/* mb20 加了有样式问题 */} + { this.isSingleButton ?
    {`已经过职业认证的教师可以免金币查看隐藏测试集。`}
    {`解锁本关所有测试集需要扣除${challenge.score*5}金币,确定要解锁吗?`}
    +
    this.goToCertification()} style={{color: '#4CACFF', cursor: 'pointer', 'text-decoration': 'underline' + , 'margin-top': '12px'}}>立即认证
    : `解锁本关所有测试集需要扣除${challenge.score*5}金币,确定要解锁吗?` const moreButtonsRender = () => { - return (power === 0 && user.is_teacher) ? ( - - ) : '' + return '' + // ${this.props.classes.button} + // return (power === 0 && user.is_teacher) ? ( + // + // ) : '' } testSetsComponentArray.push(
    From 24fe9413f8d963f19f6365394d83b7afc4c32431 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 25 Jun 2019 14:11:02 +0800 Subject: [PATCH 160/964] test --- public/react/src/context/TPIContextProvider.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index da8ddc724..6db04f1b8 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -513,10 +513,11 @@ pop_box_new(htmlvalue, 480, 182); loading: true, currentGamePassed: false, // 切换game时重置passed字段 }) - - var data = {"st":0,"discusses_count":12,"game_count":6,"record_onsume_time":5.303,"prev_game":"q67plhfjaogy","next_game":"lfrwm2ohiate","praise_count":0,"user_praise":false,"time_limit":180,"tomcat_url":"http://47.98.226.234","is_teacher":true,"myshixun_manager":false,"game":{"id":1964918,"myshixun_id":510423,"user_id":73892,"created_at":"2019-06-24T11:22:58.000+08:00","updated_at":"2019-06-25T11:15:48.000+08:00","status":0,"final_score":0,"challenge_id":573,"open_time":"2019-06-24T11:22:58.000+08:00","identifier":"yrsxolqk6zcp","answer_open":0,"end_time":null,"retry_status":0,"resubmit_identifier":null,"test_sets_view":false,"picture_path":null,"accuracy":null,"modify_time":null,"star":0,"cost_time":3966,"evaluate_count":1,"answer_deduction":0},"challenge":{"id":573,"shixun_id":186,"subject":"应用模型做预测","position":4,"task_pass":"####本关任务\r\n本关卡学习如何应用机器学习模型来做预测。\r\n\r\n####相关知识\r\n在前一关卡中,我们一起探讨了机器学习的一般原理,并建立了一个非常简单的电影评分模型Model 0:\r\n\r\n评分 = **大众对电影的平均评分** + **用户个人的给分偏好** + **电影的评分偏好**\r\n\r\n针对这个模型,我们设计了一个非常朴素的预测模型Baseline,直接从数据集中统计得到上述三个参数的值。\r\n\r\n在本关卡中,我们将应用这个模型对用户和电影的评分做出预测。\r\n\r\n####编程要求\r\n回顾Model 0的预测评分公式:\r\n```latex\r\nf(u,m)=g+\\alpha(u)+\\beta(m)\r\n```\r\n\r\n我们的Baseline模型得到了$$g$$、$$\\alpha$$和$$\\beta$$三种参数,下面我们实现predict函数,来对测试数据集中未知的用户电影评分进行预测,需要填充的代码块如下:\r\n```python\r\n# -*- coding:utf-8 -*-\r\n\r\ndef predict(g, alpha, beta, test_data):\r\n\t\"\"\"预测用户对电影的评分\r\n\t参数:\r\n\t\tg - 浮点数,模型参数平均电影评分\r\n\t\talpha - 浮点数组,用户评分偏差参数数组\r\n\t\tbeta - 浮点数组,电影评分偏差参数数组\r\n\t\ttest_data - Pandas的DataFrame对象,有两列'user','movie',是测试数据集\r\n\t返回值:\r\n\t\tret - 浮点数数组,预测的评分数组,举例ret[10],表示第10组用户和电影对的评分值\r\n\t\"\"\"\t\r\n\tret = []\r\n\tN = len(alpha)\r\n\tM = len(beta)\r\n\t\r\n\t# 请在此添加实现代码\r\n\t#********** Begin *********#\r\n\t\r\n\t#********** End *********#\r\n\t\r\n\treturn ret\r\n```\r\n\r\n####本关任务\r\n本关卡的测试数据来自内置测试文件,平台将比对您所编写函数的预测评分与正确评分,只有所有数据全部计算正确才能进入下一关。","score":500,"path":"src/step4/doprediction.py","st":0,"web_route":null,"modify_time":null},"shixun":{"id":186,"name":"理解机器学习基本概念:从电影评分预测讲起","user_id":24758,"gpid":3676,"visits":622,"created_at":"2017-08-25T18:07:41.000+08:00","updated_at":"2019-06-02T11:05:20.000+08:00","status":2,"language":"MachineLearning","authentication":false,"identifier":"58DRWG63","trainee":3,"major_id":635,"webssh":0,"homepage_show":false,"hidden":false,"fork_from":null,"can_copy":true,"modify_time":"2017-09-29T21:42:16.000+08:00","reset_time":"2017-09-29T21:42:16.000+08:00","publish_time":"2017-09-29T10:58:13.000+08:00","closer_id":null,"end_time":null,"git_url":"educoder/58drwg63","vnc":false,"myshixuns_count":318,"challenges_count":6,"use_scope":0,"mirror_script_id":0,"image_text":null,"code_hidden":false,"task_pass":false,"exec_time":180,"test_set_permission":true,"sigle_training":false,"hide_code":false,"multi_webssh":false,"excute_time":null,"repo_name":"educoder/58drwg63","averge_star":4.9,"opening_time":null,"users_count":10,"forbid_copy":false,"pod_life":0},"myshixun":{"id":510423,"shixun_id":186,"is_public":true,"user_id":73892,"gpid":null,"created_at":"2019-06-24T11:22:55.000+08:00","updated_at":"2019-06-24T13:56:40.000+08:00","status":0,"identifier":"7pkwxim9eh","commit_id":"ff7c6652fdfdf62eaa1316d39400ebdbd6cb81fb","modify_time":"2017-09-29T21:42:16.000+08:00","reset_time":"2017-09-29T21:42:16.000+08:00","system_tip":false,"git_url":null,"onclick_time":"2019-06-24T11:22:55.000+08:00","repo_name":"p35840769/7pkwxim9eh20190624112255"},"user":{"user_id":73892,"login":"p35840769","name":"韩半安","grade":6895,"image_url":"avatars/User/b","school":"国防科技大学","identity":6},"tpm_modified":false,"tpm_cases_modified":false,"mirror_name":["MachineLearning"],"has_answer":true,"test_sets":[{"is_public":true,"result":false,"input":"771 253 360 99 8 759 976 387 873 829 437 53 854 148 447 179 246 810 158 653 583 929 691 892 263 230 637 221 7 652 127 965 767","output":"3.577 -0.329 2.648 4.727 4.351 2.616 3.496 3.059 3.470 3.166 3.064 2.716 3.712 4.003 3.064 3.462 4.004 2.067 3.860 0.121 3.807 3.735 4.230 3.137 4.431 2.468 4.018 5.218 4.351 4.121 4.050 4.587 3.777","actual_output":"Traceback (most recent call last):\r\n File \"src/step4/main.py\", line 3, in \u003cmodule\u003e\r\n from doprediction import predict\r\nImportError: cannot import name 'predict'\r\n","compile_success":1},{"is_public":false,"result":false,"compile_success":1}],"allowed_unlock":true,"last_compile_output":"共有2组测试集,其中有2组测试结果不匹配。详情如下:","test_sets_count":2,"sets_error_count":2} - this._handleResponseData(data) - return + + // test + // var data = {"st":0,"discusses_count":12,"game_count":6,"record_onsume_time":5.303,"prev_game":"q67plhfjaogy","next_game":"lfrwm2ohiate","praise_count":0,"user_praise":false,"time_limit":180,"tomcat_url":"http://47.98.226.234","is_teacher":true,"myshixun_manager":false,"game":{"id":1964918,"myshixun_id":510423,"user_id":73892,"created_at":"2019-06-24T11:22:58.000+08:00","updated_at":"2019-06-25T11:15:48.000+08:00","status":0,"final_score":0,"challenge_id":573,"open_time":"2019-06-24T11:22:58.000+08:00","identifier":"yrsxolqk6zcp","answer_open":0,"end_time":null,"retry_status":0,"resubmit_identifier":null,"test_sets_view":false,"picture_path":null,"accuracy":null,"modify_time":null,"star":0,"cost_time":3966,"evaluate_count":1,"answer_deduction":0},"challenge":{"id":573,"shixun_id":186,"subject":"应用模型做预测","position":4,"task_pass":"####本关任务\r\n本关卡学习如何应用机器学习模型来做预测。\r\n\r\n####相关知识\r\n在前一关卡中,我们一起探讨了机器学习的一般原理,并建立了一个非常简单的电影评分模型Model 0:\r\n\r\n评分 = **大众对电影的平均评分** + **用户个人的给分偏好** + **电影的评分偏好**\r\n\r\n针对这个模型,我们设计了一个非常朴素的预测模型Baseline,直接从数据集中统计得到上述三个参数的值。\r\n\r\n在本关卡中,我们将应用这个模型对用户和电影的评分做出预测。\r\n\r\n####编程要求\r\n回顾Model 0的预测评分公式:\r\n```latex\r\nf(u,m)=g+\\alpha(u)+\\beta(m)\r\n```\r\n\r\n我们的Baseline模型得到了$$g$$、$$\\alpha$$和$$\\beta$$三种参数,下面我们实现predict函数,来对测试数据集中未知的用户电影评分进行预测,需要填充的代码块如下:\r\n```python\r\n# -*- coding:utf-8 -*-\r\n\r\ndef predict(g, alpha, beta, test_data):\r\n\t\"\"\"预测用户对电影的评分\r\n\t参数:\r\n\t\tg - 浮点数,模型参数平均电影评分\r\n\t\talpha - 浮点数组,用户评分偏差参数数组\r\n\t\tbeta - 浮点数组,电影评分偏差参数数组\r\n\t\ttest_data - Pandas的DataFrame对象,有两列'user','movie',是测试数据集\r\n\t返回值:\r\n\t\tret - 浮点数数组,预测的评分数组,举例ret[10],表示第10组用户和电影对的评分值\r\n\t\"\"\"\t\r\n\tret = []\r\n\tN = len(alpha)\r\n\tM = len(beta)\r\n\t\r\n\t# 请在此添加实现代码\r\n\t#********** Begin *********#\r\n\t\r\n\t#********** End *********#\r\n\t\r\n\treturn ret\r\n```\r\n\r\n####本关任务\r\n本关卡的测试数据来自内置测试文件,平台将比对您所编写函数的预测评分与正确评分,只有所有数据全部计算正确才能进入下一关。","score":500,"path":"src/step4/doprediction.py","st":0,"web_route":null,"modify_time":null},"shixun":{"id":186,"name":"理解机器学习基本概念:从电影评分预测讲起","user_id":24758,"gpid":3676,"visits":622,"created_at":"2017-08-25T18:07:41.000+08:00","updated_at":"2019-06-02T11:05:20.000+08:00","status":2,"language":"MachineLearning","authentication":false,"identifier":"58DRWG63","trainee":3,"major_id":635,"webssh":0,"homepage_show":false,"hidden":false,"fork_from":null,"can_copy":true,"modify_time":"2017-09-29T21:42:16.000+08:00","reset_time":"2017-09-29T21:42:16.000+08:00","publish_time":"2017-09-29T10:58:13.000+08:00","closer_id":null,"end_time":null,"git_url":"educoder/58drwg63","vnc":false,"myshixuns_count":318,"challenges_count":6,"use_scope":0,"mirror_script_id":0,"image_text":null,"code_hidden":false,"task_pass":false,"exec_time":180,"test_set_permission":true,"sigle_training":false,"hide_code":false,"multi_webssh":false,"excute_time":null,"repo_name":"educoder/58drwg63","averge_star":4.9,"opening_time":null,"users_count":10,"forbid_copy":false,"pod_life":0},"myshixun":{"id":510423,"shixun_id":186,"is_public":true,"user_id":73892,"gpid":null,"created_at":"2019-06-24T11:22:55.000+08:00","updated_at":"2019-06-24T13:56:40.000+08:00","status":0,"identifier":"7pkwxim9eh","commit_id":"ff7c6652fdfdf62eaa1316d39400ebdbd6cb81fb","modify_time":"2017-09-29T21:42:16.000+08:00","reset_time":"2017-09-29T21:42:16.000+08:00","system_tip":false,"git_url":null,"onclick_time":"2019-06-24T11:22:55.000+08:00","repo_name":"p35840769/7pkwxim9eh20190624112255"},"user":{"user_id":73892,"login":"p35840769","name":"韩半安","grade":6895,"image_url":"avatars/User/b","school":"国防科技大学","identity":6},"tpm_modified":false,"tpm_cases_modified":false,"mirror_name":["MachineLearning"],"has_answer":true,"test_sets":[{"is_public":true,"result":false,"input":"771 253 360 99 8 759 976 387 873 829 437 53 854 148 447 179 246 810 158 653 583 929 691 892 263 230 637 221 7 652 127 965 767","output":"3.577 -0.329 2.648 4.727 4.351 2.616 3.496 3.059 3.470 3.166 3.064 2.716 3.712 4.003 3.064 3.462 4.004 2.067 3.860 0.121 3.807 3.735 4.230 3.137 4.431 2.468 4.018 5.218 4.351 4.121 4.050 4.587 3.777","actual_output":"Traceback (most recent call last):\r\n File \"src/step4/main.py\", line 3, in \u003cmodule\u003e\r\n from doprediction import predict\r\nImportError: cannot import name 'predict'\r\n","compile_success":1},{"is_public":false,"result":false,"compile_success":1}],"allowed_unlock":true,"last_compile_output":"共有2组测试集,其中有2组测试结果不匹配。详情如下:","test_sets_count":2,"sets_error_count":2} + // this._handleResponseData(data) + // return axios.get(url, { // https://stackoverflow.com/questions/48861290/the-value-of-the-access-control-allow-origin-header-in-the-response-must-not-b From c584a3385b491eedf17b88e3228341bc208fb79f 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, 25 Jun 2019 14:13:30 +0800 Subject: [PATCH 161/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/Listofworks.js | 10 +++++----- .../shixunHomework/TraineetraininginformationModal.js | 8 ++++---- .../courses/shixunHomework/Trainingjobsetting.js | 10 ++++++---- public/react/src/modules/login/Trialapplication.js | 2 +- public/react/src/modules/tpm/NewHeader.js | 2 +- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 2a636aa70..2200c8e77 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -91,7 +91,7 @@ class Listofworks extends Component { unlimited: 0, unlimitedtwo: 1, code_review: false, - boolgalist:false, + boolgalist:true, columns: [ { title: '序号', @@ -556,7 +556,7 @@ class Listofworks extends Component { align: 'center', width:'96px', render: (text, record) => ( - record.submitstate === "未提交" ? "--" : + record.submitstate === "未提交" ? --: this.Viewstudenttraininginformations(record)}>调分 @@ -779,7 +779,7 @@ class Listofworks extends Component { // console.log(JSON.stringify(result)) let datalist = []; var game_list = result.data.game_list - var boolgalist=false; + var boolgalist=true; for (var i = 0; i < game_list.length; i++) { datalist.push({ @@ -790,8 +790,8 @@ class Listofworks extends Component { complete_status: game_list[i].complete_status, }) - if(game_list[i].complete_status === 1){ - boolgalist=true; + if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){ + boolgalist=false; } } diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index 89cc35470..8c7ad059e 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -210,12 +210,12 @@ class TraineetraininginformationModal extends Component { src={this.props.viewtrainingdata === undefined ? "" : "https://www.educoder.net/images/" + `${this.props.viewtrainingdata.image_url}`} width="70"/>
    -
    +
  • {this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.username} 通关:{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.complete_count}/{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.challenges_count}
  • 完成效率:{this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.efficiency}
  • 通关时间: {this.props.viewtrainingdata === undefined ? "":moment(this.props.viewtrainingdata.passed_time).format('YYYY-MM-DD HH:mm')==="Invalid date"?"--":moment(this.props.viewtrainingdata.passed_time).format('YYYY-MM-DD HH:mm')}
  • -
    +
  • 课堂最高完成效率: {this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.max_efficiency}
  • 总耗时: {this.props.viewtrainingdata === undefined ? "" :this.props.viewtrainingdata.total_spend_time}
  • @@ -223,7 +223,7 @@ class TraineetraininginformationModal extends Component {
    { this.props.game_list === undefined?"" : this.props.game_list.length<4? -
    +
    {getFieldDecorator('description', { rules: [{ diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js index fec4248df..be85e5087 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js @@ -294,7 +294,7 @@ class GraduationTasksnew extends Component { } {/*内容*/} -
    +
    {getFieldDecorator('tasktype', { @@ -309,12 +309,14 @@ class GraduationTasksnew extends Component { (选择确认后,无法修改) - + {getFieldDecorator('name', { - rules: [{ required: true, message: "请输入标题" }], - })()} + rules: [{required: true, message: "不能为空"}], + })()} - +
    From d6496418b2994cefc0e75bae63aa26bfdb5f7ef5 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 25 Jun 2019 14:19:05 +0800 Subject: [PATCH 163/964] radius --- public/react/src/modules/page/main/CodeEvaluateView.js | 5 ++++- public/react/src/modules/page/tpiPage.css | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/page/main/CodeEvaluateView.js b/public/react/src/modules/page/main/CodeEvaluateView.js index 8466b63c7..8f28a8c63 100644 --- a/public/react/src/modules/page/main/CodeEvaluateView.js +++ b/public/react/src/modules/page/main/CodeEvaluateView.js @@ -195,7 +195,10 @@ class CodeEvaluateView extends Component {
    this.goToCertification()} style={{color: '#4CACFF', cursor: 'pointer', 'text-decoration': 'underline' , 'margin-top': '12px'}}>立即认证
    : - `解锁本关所有测试集需要扣除${challenge.score*5}金币,确定要解锁吗?` + +
    {`解锁本关所有测试集需要扣除${challenge.score*5}金币`}
    +
    {`确定要解锁吗?`}
    +
    const moreButtonsRender = () => { return '' diff --git a/public/react/src/modules/page/tpiPage.css b/public/react/src/modules/page/tpiPage.css index 34274907e..4fc4e3062 100644 --- a/public/react/src/modules/page/tpiPage.css +++ b/public/react/src/modules/page/tpiPage.css @@ -229,6 +229,9 @@ body>div[role=dialog]>div { /* padding-bottom: 10px; */ } /* tpi 窗口宽度*/ +#tpi-dialog>div[role=document] { + border-radius: 10px; +} body>div[role=dialog] div[role=document] { min-width: 400px; } From 3ddcabf116fe0c96c202209997cf406094f77b73 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 25 Jun 2019 14:59:07 +0800 Subject: [PATCH 164/964] 24px --- public/react/src/modules/comment/Comment.css | 1 + 1 file changed, 1 insertion(+) diff --git a/public/react/src/modules/comment/Comment.css b/public/react/src/modules/comment/Comment.css index f7b52366d..2f85846b6 100644 --- a/public/react/src/modules/comment/Comment.css +++ b/public/react/src/modules/comment/Comment.css @@ -106,6 +106,7 @@ position: absolute; top: -30px; left: -30px; + left: -24px; z-index: 999; } From 66ea00a7def21d437ae62ea85259d5881e46574e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 25 Jun 2019 15:02:45 +0800 Subject: [PATCH 165/964] test --- public/react/src/context/TPIContextProvider.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index 6db04f1b8..0b764202f 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -516,6 +516,9 @@ pop_box_new(htmlvalue, 480, 182); // test // var data = {"st":0,"discusses_count":12,"game_count":6,"record_onsume_time":5.303,"prev_game":"q67plhfjaogy","next_game":"lfrwm2ohiate","praise_count":0,"user_praise":false,"time_limit":180,"tomcat_url":"http://47.98.226.234","is_teacher":true,"myshixun_manager":false,"game":{"id":1964918,"myshixun_id":510423,"user_id":73892,"created_at":"2019-06-24T11:22:58.000+08:00","updated_at":"2019-06-25T11:15:48.000+08:00","status":0,"final_score":0,"challenge_id":573,"open_time":"2019-06-24T11:22:58.000+08:00","identifier":"yrsxolqk6zcp","answer_open":0,"end_time":null,"retry_status":0,"resubmit_identifier":null,"test_sets_view":false,"picture_path":null,"accuracy":null,"modify_time":null,"star":0,"cost_time":3966,"evaluate_count":1,"answer_deduction":0},"challenge":{"id":573,"shixun_id":186,"subject":"应用模型做预测","position":4,"task_pass":"####本关任务\r\n本关卡学习如何应用机器学习模型来做预测。\r\n\r\n####相关知识\r\n在前一关卡中,我们一起探讨了机器学习的一般原理,并建立了一个非常简单的电影评分模型Model 0:\r\n\r\n评分 = **大众对电影的平均评分** + **用户个人的给分偏好** + **电影的评分偏好**\r\n\r\n针对这个模型,我们设计了一个非常朴素的预测模型Baseline,直接从数据集中统计得到上述三个参数的值。\r\n\r\n在本关卡中,我们将应用这个模型对用户和电影的评分做出预测。\r\n\r\n####编程要求\r\n回顾Model 0的预测评分公式:\r\n```latex\r\nf(u,m)=g+\\alpha(u)+\\beta(m)\r\n```\r\n\r\n我们的Baseline模型得到了$$g$$、$$\\alpha$$和$$\\beta$$三种参数,下面我们实现predict函数,来对测试数据集中未知的用户电影评分进行预测,需要填充的代码块如下:\r\n```python\r\n# -*- coding:utf-8 -*-\r\n\r\ndef predict(g, alpha, beta, test_data):\r\n\t\"\"\"预测用户对电影的评分\r\n\t参数:\r\n\t\tg - 浮点数,模型参数平均电影评分\r\n\t\talpha - 浮点数组,用户评分偏差参数数组\r\n\t\tbeta - 浮点数组,电影评分偏差参数数组\r\n\t\ttest_data - Pandas的DataFrame对象,有两列'user','movie',是测试数据集\r\n\t返回值:\r\n\t\tret - 浮点数数组,预测的评分数组,举例ret[10],表示第10组用户和电影对的评分值\r\n\t\"\"\"\t\r\n\tret = []\r\n\tN = len(alpha)\r\n\tM = len(beta)\r\n\t\r\n\t# 请在此添加实现代码\r\n\t#********** Begin *********#\r\n\t\r\n\t#********** End *********#\r\n\t\r\n\treturn ret\r\n```\r\n\r\n####本关任务\r\n本关卡的测试数据来自内置测试文件,平台将比对您所编写函数的预测评分与正确评分,只有所有数据全部计算正确才能进入下一关。","score":500,"path":"src/step4/doprediction.py","st":0,"web_route":null,"modify_time":null},"shixun":{"id":186,"name":"理解机器学习基本概念:从电影评分预测讲起","user_id":24758,"gpid":3676,"visits":622,"created_at":"2017-08-25T18:07:41.000+08:00","updated_at":"2019-06-02T11:05:20.000+08:00","status":2,"language":"MachineLearning","authentication":false,"identifier":"58DRWG63","trainee":3,"major_id":635,"webssh":0,"homepage_show":false,"hidden":false,"fork_from":null,"can_copy":true,"modify_time":"2017-09-29T21:42:16.000+08:00","reset_time":"2017-09-29T21:42:16.000+08:00","publish_time":"2017-09-29T10:58:13.000+08:00","closer_id":null,"end_time":null,"git_url":"educoder/58drwg63","vnc":false,"myshixuns_count":318,"challenges_count":6,"use_scope":0,"mirror_script_id":0,"image_text":null,"code_hidden":false,"task_pass":false,"exec_time":180,"test_set_permission":true,"sigle_training":false,"hide_code":false,"multi_webssh":false,"excute_time":null,"repo_name":"educoder/58drwg63","averge_star":4.9,"opening_time":null,"users_count":10,"forbid_copy":false,"pod_life":0},"myshixun":{"id":510423,"shixun_id":186,"is_public":true,"user_id":73892,"gpid":null,"created_at":"2019-06-24T11:22:55.000+08:00","updated_at":"2019-06-24T13:56:40.000+08:00","status":0,"identifier":"7pkwxim9eh","commit_id":"ff7c6652fdfdf62eaa1316d39400ebdbd6cb81fb","modify_time":"2017-09-29T21:42:16.000+08:00","reset_time":"2017-09-29T21:42:16.000+08:00","system_tip":false,"git_url":null,"onclick_time":"2019-06-24T11:22:55.000+08:00","repo_name":"p35840769/7pkwxim9eh20190624112255"},"user":{"user_id":73892,"login":"p35840769","name":"韩半安","grade":6895,"image_url":"avatars/User/b","school":"国防科技大学","identity":6},"tpm_modified":false,"tpm_cases_modified":false,"mirror_name":["MachineLearning"],"has_answer":true,"test_sets":[{"is_public":true,"result":false,"input":"771 253 360 99 8 759 976 387 873 829 437 53 854 148 447 179 246 810 158 653 583 929 691 892 263 230 637 221 7 652 127 965 767","output":"3.577 -0.329 2.648 4.727 4.351 2.616 3.496 3.059 3.470 3.166 3.064 2.716 3.712 4.003 3.064 3.462 4.004 2.067 3.860 0.121 3.807 3.735 4.230 3.137 4.431 2.468 4.018 5.218 4.351 4.121 4.050 4.587 3.777","actual_output":"Traceback (most recent call last):\r\n File \"src/step4/main.py\", line 3, in \u003cmodule\u003e\r\n from doprediction import predict\r\nImportError: cannot import name 'predict'\r\n","compile_success":1},{"is_public":false,"result":false,"compile_success":1}],"allowed_unlock":true,"last_compile_output":"共有2组测试集,其中有2组测试结果不匹配。详情如下:","test_sets_count":2,"sets_error_count":2} + // data.shixun.vnc = true + // data.vnc_url= "http://47.96.157.89:54144/vnc_lite.html?password=headless" + // this._handleResponseData(data) // return From 321e902baf12ed84acd2f0a23951cea5297f64a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 25 Jun 2019 16:22:36 +0800 Subject: [PATCH 166/964] =?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 --- .../courses/coursesPublic/SelectSetting.js | 2 +- .../tasks/GraduationTasksSubmitedit.js | 4 +- .../tasks/GraduationTasksSubmitnew.js | 40 ++++++- .../tasks/GraduationTasksappraise.js | 2 +- .../tasks/GraduationTaskssetting.js | 113 ++++++++---------- .../react/src/modules/forums/RightSection.css | 2 +- 6 files changed, 90 insertions(+), 73 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/SelectSetting.js b/public/react/src/modules/courses/coursesPublic/SelectSetting.js index 0bb06fccb..2b4b935ba 100644 --- a/public/react/src/modules/courses/coursesPublic/SelectSetting.js +++ b/public/react/src/modules/courses/coursesPublic/SelectSetting.js @@ -613,7 +613,7 @@ class Selectsetting extends Component{ {item.name} - {item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"":this.props.bytesToSize(item.response.filesize)} + {item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"123":this.props.bytesToSize(item.response.filesize)} - {item.response===undefined?"":isNaN(this.props.bytesToSize(item.response.filesize))?"":this.props.bytesToSize(item.response.filesize)} + {item.response===undefined?"":bytesToSize(item.size)} { - const url = `/attachments/${file.response ? file.response.id : file.uid}.json` + const url = `/attachments/${file}.json` axios.delete(url, { }) .then((response) => { @@ -446,7 +446,7 @@ render(){ multiple: true, // https://github.com/ant-design/ant-design/issues/15505 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 - // showUploadList: false, + showUploadList: false, action: `${getUrl()}/api/attachments.json`, onChange: this.handleChange, onRemove: this.onAttachmentRemove, @@ -545,7 +545,39 @@ render(){ (单个文件150M以内) -
    + + {this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{ + return( +

    + + + + + {item.name} + + + {item.response===undefined?"":bytesToSize(item.size)} + + +

    + ) + })} + +
    diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index f7f843feb..28955e268 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -258,7 +258,7 @@ class GraduationTasksappraise extends Component{
    -
    +
    {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.map((item,key)=>{ return( diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index 24da98576..b4aec1355 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -317,73 +317,59 @@ class GraduationTaskssettingapp extends Component{ } funcrosscomment=(e)=>{ - let {latetime,end_time}=this.state; + + let {latetime,end_time,allowlate}=this.state; let newtime; - if(latetime!=null&&end_time!=null){ - if(e.target.checked===true){ - if(moment(latetime)>moment(end_time)){ - newtime=moment(latetime)+604800000; - newtime=new Date(newtime) - }else if(moment(latetime) Date: Tue, 25 Jun 2019 16:32:36 +0800 Subject: [PATCH 167/964] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/boards/AddDirModal.js | 78 +++++++++++++++++++ .../src/modules/courses/boards/BoardsNew.js | 45 ++++++++--- .../modules/courses/members/teacherList.js | 8 +- 3 files changed, 119 insertions(+), 12 deletions(-) create mode 100644 public/react/src/modules/courses/boards/AddDirModal.js diff --git a/public/react/src/modules/courses/boards/AddDirModal.js b/public/react/src/modules/courses/boards/AddDirModal.js new file mode 100644 index 000000000..89ff6dfeb --- /dev/null +++ b/public/react/src/modules/courses/boards/AddDirModal.js @@ -0,0 +1,78 @@ +import React,{ Component } from "react"; +import {Tooltip, Modal, Input } from 'antd' +import moment from 'moment' +import { getUrl, WordsBtn } from 'educoder' +import axios from 'axios' +class AddDirModal extends Component{ + constructor(props){ + super(props); + this.state = { + + } + } + onInput = (e) => { + this.setState({ + inputValue: e.target.value + }) + } + open = () => { + this.setState({ visible: true, inputValue: '' }) + } + onSave = () => { + let coursesId = this.props.match.params.coursesId; + const url = `/courses/${coursesId}/boards.json` + let { inputValue } = this.state; + + axios.post(url,{ + name: inputValue + }).then((response)=>{ + if (response.data.status == 0) { + this.onCancel() + this.props.showNotification('添加成功') + this.props.addSuccess && this.props.addSuccess() + } + }).catch((error)=>{ + console.log(error) + }) + } + onCancel = () => { + this.setState({ visible: false, inputValue: '' }) + } + render(){ + let { inputValue, visible } = this.state; + const { title } = this.props; + return( + +
    +
    {this.props.label}:
    + +
    + + {/* {this.state.NavmodalValuetype===true? + {this.state.NavmodalValues} + :""} */} + + {/* this.state.NavmodalValuetype===true?"clearfix mt20 edu-txt-center": */} +
    + 取消 + 确定 +
    +
    + ) + } +} +export default AddDirModal; \ No newline at end of file diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index cf530aba5..97d9436a6 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -3,13 +3,13 @@ import React,{ Component } from "react"; import { Form, Input, InputNumber, Switch, Radio, Slider, Button, Upload, Icon, Rate, Checkbox, message, - Row, Col, Select, Modal + Row, Col, Select, Modal, Divider } from 'antd'; import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; import axios from 'axios' import './board.css' import "../common/formCommon.css" - +import AddDirModal from './AddDirModal' import { RouteHOC } from './common.js' import CBreadcrumb from '../common/CBreadcrumb' import {getUploadActionUrl, bytesToSize, uploadNameSizeSeperator, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll} from 'educoder'; @@ -29,14 +29,14 @@ class BoardsNew extends Component{ boards: [] } } - componentDidMount = () => { - - const topicId = this.props.match.params.topicId - + addSuccess = () => { + this.fetchBoards() + } + fetchBoards = () => { + const isEdit = this.isEdit const boardId = this.props.match.params.boardId - const boardsUrl = `/courses/board_list.json?board_id=${boardId}` - const isEdit = !!topicId + const boardsUrl = `/courses/board_list.json?board_id=${boardId}` axios.get(boardsUrl, { }) .then((response) => { if (response.data.status == 0) { @@ -57,8 +57,17 @@ class BoardsNew extends Component{ .catch(function (error) { console.log(error); }); - + } + componentDidMount = () => { + + const topicId = this.props.match.params.topicId + const isEdit = !!topicId this.isEdit = isEdit + + const boardId = this.props.match.params.boardId + + this.fetchBoards() + if (isEdit) { const url = `/messages/${topicId}.json` axios.get(url, { @@ -260,6 +269,12 @@ class BoardsNew extends Component{ return(
    + {/* bor-bottom-greyE */}
    -
    +
    From 71bb54550709a0b059af193dd4ea24b6c6436703 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Tue, 25 Jun 2019 17:11:33 +0800 Subject: [PATCH 170/964] =?UTF-8?q?=E6=96=B0=E8=AF=BE=E5=A0=82=E6=8C=87?= =?UTF-8?q?=E5=BC=95=E7=AC=AC=E4=B8=80=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/images/course/guide/1-1.png | Bin 0 -> 10691 bytes public/images/course/guide/1-2.png | Bin 0 -> 14301 bytes public/images/course/guide/1-3.png | Bin 0 -> 9862 bytes public/images/course/guide/1-4.png | Bin 0 -> 24857 bytes public/images/course/guide/1-5.png | Bin 0 -> 2660 bytes public/images/course/guide/1-6.png | Bin 0 -> 2689 bytes public/images/course/guide/1-7.png | Bin 0 -> 1267 bytes .../courses/coursesDetail/CoursesBanner.js | 10 ++-- .../courses/coursesDetail/CoursesGuide.js | 44 ++++++++++++++++++ .../react/src/modules/courses/css/Courses.css | 20 ++++++++ .../graduation/tasks/GraduateTaskItem.js | 6 +-- .../modules/tpm/challengesnew/TPMMDEditor.js | 1 + 12 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 public/images/course/guide/1-1.png create mode 100644 public/images/course/guide/1-2.png create mode 100644 public/images/course/guide/1-3.png create mode 100644 public/images/course/guide/1-4.png create mode 100644 public/images/course/guide/1-5.png create mode 100644 public/images/course/guide/1-6.png create mode 100644 public/images/course/guide/1-7.png create mode 100644 public/react/src/modules/courses/coursesDetail/CoursesGuide.js diff --git a/public/images/course/guide/1-1.png b/public/images/course/guide/1-1.png new file mode 100644 index 0000000000000000000000000000000000000000..c59467c5d5daa4c8a69bbe0d6bc97a5c37cee942 GIT binary patch literal 10691 zcmV;!DLmGRP)gNtzuED zb*Z(j^r^VD3L-8@tO~M}B_LbOW&$Lf`^@srdFMSd=bR63`#jfj{z$&>oH;Y^yz~3L z%gmhf1;CD$mX?w2?d_KbK`;&g{#0CCe4{AR*w}b606fHsKU7>?eCgind-d}L!bd9r ztPR6(L4JPzz1_Qae~)55z%OAKc4=yAx*Gtd005rfONhM&;osRH?goIfii?YXk35mY zsI9H-)W3iK=K?bfZ^eE{$ud3kxK6crWKeo+;&w_kfTkW~X=7zRNQgwBvm zoZPf&Q(2!reKyY+Jb6fdL8sdT2>ufw><;3VAP*oEAMkz?&FT8Y_W&RiUQB!xpT!5O zy>wY);)(j`N#AE(wUki@mH3&qD*J+EiRiRj_}O*8tUJ^q>5Alct`E|vxD?ZcE>Gn# z@iEhz)TI%MRqRqJ%Ev2DkWp5XWvm=!Tsln~Y19cF3qCHES!WfxL=`#`x-xw+ir3gg zY*2mjdc$S_m>=#8ZoGc;+?9B>xw-ksf`Wp^m6AL+ZMvEG1squ zbVXxh<75C35!g?ImX?;Ix_0gQaS#LzqMDfpUGp>q;aLio+H1rt4;>H}8Tfr#JKp|~ z3(`Um3u##m)VR1#22_^O*Ni1kv!*f2l0l1mQe?N{xD-ctY5c6ud#m)wA2Se1W;l!2 zKwUdLZ!X=9jg!7PD@Tz)u6n59vb=3B0`5WCFnp$Z{lgO*8XArXf?$zI_k+g9#+?AL zPg`4CQCV48^UR@FH$nhKk#})5M3iii3AIDQ4LY7)FuRz9KqG{-LP8>!bL~ybC5lQw1DjM?*h&WHY4sYMc=^;1oM^Z?^MTm*ZS(n9w zq$(`F)Fos@xm_|*2jj~}tbRLmvq!T}|6~#*Vb0QrmV*=9JGR7{T2V+GbJgn~P9e;Y zt1_An$H2P;q@8xwOnXi(Co%PO(av6Yjf6;(I*AwltpvIE)Oe=Z3PXJDm81yx8A*{~OMUj&)h;&>9)p2|X>4qKNrq%G z4>ROSqNyaGg~=hV>U$JyolXJ|USt1dGL7fN>{-S|Gb_=|B3stc%(a}y3i~`S^%lG- zIUFwU-~o{rKn#%1oPry&lzzKN#Eqqt-*M6qgY_>Lua^s1Xjf9mPY5HWbmTBshS6Gq zkb;_{1dAoA^BPC0d{-d^L6UXlVHjFvEuR!E&CPfQ-MTMN7osvJfh9wm9D4{5#E&bI zqtzn$6Fnf8gIX32)GVaWKp4KDNXf7#W04f$W)b^gqs&f7JWD@AeUaVBPbh%7V&a$%Iab{D{D)2TS|vPrkZ0gwa;W|&M- zLISFOa~Z@*E*!Y@;Px3ry9w$0d=;gX#?` z>Gv;O4!%5Uh7#IpoP=f`!xGzC;c_Ta6mEg(ckWrzd@hm$y`rd#5yrWTnzA8-NAM1W z>w*j9K1=B{cbrHmNbp^D8UP|6j)wsz>N`QMm=R1Hqm0+BgyWG2gn>jRV*okOurbW>lESkzAhPQeZ^pV)nFt9i{kyC+ z*DobK@vg3Dz!5egVXzjiLYO(|@-XsxG!){a!y9)f!L&j^AwO!OIQ6PM0@Z~T`shVe zQza5u*NGm4u3Q_PVY}#o90JgGT?=61mOS#Tk2RCSLB>HPz(z^!2yL9t)ns9Y4=5-@ z!gXqtsmFKOf>@+L7qxkR`C|+OGcm6q?&SpF9?o~2_c7_a)mhRTw~nhf{MzD(gD_L< zJF|?HY*u%M4!8w4T2aFOFf(8t#z+f;3wgMs7bhe5bg4M6yC|zmAdE|oG2^dK_!h_v z9!UJ|;t&TN?maW%qRVo62Eyn#Hk58N&--brB@bVjJcKNmraq_R@fzlIicVtU6CGqB zZjMe(6}MRHtN{t*Uxyi}3FE@6Yi+}TN4F=prK2I`gG_h*l527hDVP&_Z-Jg$B|5-F z9#b8*DgM)~_M{#&aGobd<#qHD89|!MVDhAyKQbVjCo@49R=LVKy#cZE+=J5cM$fqj zk7a$~LDIMq2SbAw3L&qPL}QHxjd=1T@iE#-&>bO+EFE8mLBhy}7~suU2Q!W3($`e= zqz(#J1hf8+tM{e@`d-T^u`TvkHTPmDhh>$By!1M?wisHOodk{fE6 zQz4mumP`=FSUFa!um1=N1iW|Un0g-61YeM3S~P8<^;khA?I!suJ5fA31Xh@S#?P%MjN*C~BoY(E-svhQb z(+M+RvT7RpMU9*|hZRaew3J5Q`hycAtVgn_P^Q@Kg5eQ0q+GEsckh|&cUe)22@}RR z28cH6wQgx7px1rm@p)<8C!=R3MC>Ia=%pR;ijN1e(3o`)Wxe)at*)xe0gc< zwU3ZDimjeUQK2sSpVBCoKNJ9*?<=GsVGrA%ZLX>N!31%Ej89iQxG)l?nVf^bb{V!8@ zIt-wd(-`ZeCABPggcbhCf9Js^F!IOe!Mgcx!MX<*%7TIv1>Fl_;KXsTZvGNz+uR84 z&23Qs$|@Kz^*HD;w4Wjjvl^cf)TAwuYRbblCe$#`$Q3#LA3 zZ8EKzC0{-X?>zJu*#71^n~VU^^XLO$#3f&rWfn|*Knm0I=yDiw$%It2w>5nRuif~V zEZ610ePQI)C&AETN1FR~G=B!mp8YG-)-13M4ggfmy3ASsCx2f9wKXr=dZ8s_4miy+ z0F;b45C&f}9y*nDbGEs&z6Dm!egW#=USnT(?Mk*}VMLK*8HJD48P{$j?n%>Y=E##1wsb))TPgHuJ_*CD)=FZy)~t!W;0Xi)MMR zn+x8sm+oZ*7rd!(jU zyVZhTU0~$TE`;s1YhcZ0aic$SEygK3QEQdvdW8aP8@ZAdDpT7(u2LE-qTi4+64;s?E)ibOoG)< z{SCIf@PRzvzNHlgTzi5f_u@&vuCnfK>d z|7vGz>x_h1q<}a7)(3%J!yDs-`BVaW@To_cx(^zEGz=PjIPf-GKW&DUk1As{ZpOLL zxwxzLWNW3DI{ofx(0f2XNuYa&PdD{Z!YrKo2WVKgSzg0-l)QrAQD5wia$NB+O_Ywx zjD6}G^7hxy7O($~A7h`oF7bNo4qtx93L;_r>oENDp@5k?VXWs)!Vs!vPm$h35C%O;V#C@KkGkn} zIDY!qWzm|^Q*FPHHp-(CSCm3#TWvznd{2EI z`!pd8UCW}Kq!U)wc>^WA!88ImA&fj3UxyKdp~7?e&?#pJwc>-Ii9!`c@Kn&dGgQvG z92Q?KT&X$^IPVwR-+$KX!jKzJf^G-&wg}Vtpq?;t#)YtA?hCNx_rlY8 z4ju;RwkxKJ5b846y1EV?8g~O(h>X{hN|+F!VrmqA)f}Ti%|aavx3&tB>JUsTz;2W# z#}LA(Zwtbl13Ow;;hrH=%qxJq92kXUk}x$YR8;2`!57Z`BfNIgZ~Xd^S2R9MG^4;# zGGYJ>o;pE>VZy7#2*a>9_G#^bCf-H573CsktmT;NKV~8UPqNfQB>fxH)?vyoiSFY0 zN@CZEr?JY}gc<(xN&0FCB8Oz%f^{Y0)hWQ^vQ}vo$A`!Pd zj7YxCp{8@KkPHb!n+*b}s<|xkFk`OIBy+!$4}%HcyBK;8><2O@xlrX&;*dmsL*+1v zFfYn;C;a##IBfhel3@2&RU3~a3mQD>4~Cq2ah6Q$j=Fz}$yr{Xco*1&Aopw7S=YUj zZgd%fMgimCT3L@yzSlpxD3-sZp`z)-jnKAy z8yxbZGok0O0ao$4SKgEPi6BhF@(n6i(MRbS6_PNEuN2`MhK6aaMc0uq{EiK^AH%CZ zdjd8*|92-ag?I2B0@UI#9)=aHnynK0xQDR|j=TL_7<%joc@pd7WD(aWVNfnCFY=ui z?wAKFA9;gGfgr_%TU>Upr9}j|Q`Rx|>2J#auTNCp)e(U{x~@Hp6()(Ybgx|Oc3mBD z%X({2^`=MVN&iZ}Bn*qm5<@Q*d`g~?9mm))5?5jvwqouA=r*uSOCQQGOdMh@MjSh~ zG(h=RDq-VGOQCGcp|E+O2+v+8Rv2LTEDGoVhTNn=sI+70R5e3aa^es;blR!%v+ywD zkR;S35riq|TnO!LVwNmAy6xW!gcodCzZE{7A%0pX`yr=%FICgP;^?t|Z<&ybLxAn! zQ@?BH3fhuqX~7Ui4ohV8vJwW%(Y6F3{&LG)FOgkx3G)AL@}0JaiGkR0r}i>7VMLC? zLM|G2L+BxtsGpLQwC74QX{e@et={;EJnLVF>36YW0A1j+`lYv~7&6iX3Mc_|bR+FyHzR#{$zZK8hk7{;sIwEzZu!#|18y}UQ%cPWIW z*F3D-q8193#&!XFHu_PoBW9gmyCGT|p`p*p=fos~t>3|?jWScnHOE{7t^W{H(l#Qh z=IEqf(dr^^D^<0{UrSHYvegAoE=8c z1OP}FY?Gyi05khtq-$iCsKvr$2|I1=J;S|W_EcYrd2rz zV>c>i$tLQMEGdU!)8ZnBn)2fRNCMbIwh2S!8h6KeFy>VR946 z%sooU$bm3q+IZM!U(dqj_GVZ)djZtHt#Z)#!Kbl#33uXCy-9hP1j1aX5MrKdq2*cr z;(f6Joh@L3h5!X+YFbv#GClh~lwUp;%0?dw+ul>16<$Dih&6Y=1pA+V6b$_8m!Q3E zCv1M>Lo1gMWg~ElSsIn3yFw`Ju((!O(j69Gq4SRbz~m%X+$(buK?LEoTGnjVQ4L?q z4WQ|Rjd1XFr|cPF;`osD*n|-)_F~ql*s|m{VU!oCm|6uVeNQb?)>LW_LnD9?plZ(L z*$Cr+np3X+#V~boSqN+*7>l40*2X@gL$I^%jO{S+Fd}|B>G1_qnx!AiGm{*~ z^Io#P!owgjJR?g*GeroQeDR^)^e8>dy-1i^mRJkWE5L4h{UbQ^n`glGWvgMw)&?j) zxe`8@^&Hf{h~6WJCFMw<^^dA;H>xYqEXV=pkA}X-9ia%L*K*{n*Ci8RF(Hh|P0Efw z*gH1D8}>M;A9S?tfZA_8?jJ*JpT^u$KlU!|!IO@Gvwo`95?;RN30QKgn%?d*VBcsq z>XrvU0uy6xZLlh)scC9On5oeEk9sW+_FJ#ROgvE~{bQ=_SXGbV;0um{mGc%`d(Zlv zG7Qdp@H<+r$6?8>YPDZ_J|xU7VwNoOd=r0n0}L8{gqn&TEPi8{9GO52F!mXpIfB^hVa=TyEY58f zM1OkG_L4<+NHDE<=`Cpcv;}(fFN2X^t&(An1oUXJRYkRD5k^ek-Xq$wksvL)@i1Z? z=F_PA`bCIUb0)(GB+O_rt!#UKB*3ag%V6!BA3$3}GxR7ggNjqeLQ!eYh-f+tSDsIW z$g38;2MrsyL19r>C?7slmKTQ%;jUM?m;${6(fGh2yEN)oSEO!*kvYqy_u2JQ{QIIX zEBc~NAx@rbgrOaD5|BSt$*JsTZ9!>Q7t>fgKyZ5!+5dWP^0;t*in^!&Rp z8FI@Mm7jw`l|aRY55_N_dnlszm`jhCa0CP zT)ez625&#PK$9ijfAxq6k6!S*Dqk{k01TNn0rv52w%pbXE9blb^>5Klwd^-_T!e9C z7{t2Rm=Q_8&SCu1%6%@-$Z*9~gh{@K%tVm{(hi@ka*U-nJPHFYKTd`{jjQUQdEHhc zw@CQgoAqW#0O&SwKWj`Hmi+_j7p#Dis-bY`w9}*)TJ^}wl1R$q5UVegKYobZKq*GL z*U>{&(l5fV&1wy$^vntwlF3O201!Kz#qMTKgz_uLL4H?J4?ySM#j>8&PyQ7)&Rb#= z%BYSR4tYM5USrs#^Z2@jx-1AGj+M_X(KBE+M1^+{GiBm%O$vzf zJuCY|-^!sN_l|km5efdV3y*^y{nS){TT=^cdT%wX{PiMY#iKq|Os|SfNVR_2;;A2% zqW{w;TP0>RXkuQ7(J@O%M;~H~(Vuy`~XO4>bbJcA>TO#c5H2gb@#qzO;J|->|7`w)K``flMo`e`uMg#DY0qf zM&CAT9x+BMVq4PKV*y?za3m#-v=4RoxN}xb>vFMog!xdIfM#7!Sj1A#TGOd;KM*E5{2dWR>*oA*=^JFD>gP7p>cD zA`9@huGmP#k-m)?qBj7!{OtmDW)0MI(aXpu`?@@_~~+rARxT zW@6c^i<}QudD^s=1ISp&CLR5@>Zb37!yJ~pVkrg}`V-(O1oZ_o^t_Q#>&F?zq_t@! zFM9PKWh3>XE@ViiR{B|~=)}zZbVx=$DAlL@?D;)(i!>blv{~P^EcdwH4C6>BWic^- zq55m=+}( z*WLC{J63;^MwqhmnYLZZ<9t)M_=d^IoMyzZpa+xII8s7eY;b_wI5kBSBoc1R#&c@B z5ngx0(huDv3*)j+ye3ztxkA|Fmf1BxEvLT6H5jg8i#fEIS!aaT6% zw?<@Q^~w8ab!(9)P zmIctmc$0oX7*%hi1&7VnNK&i}L%nn(t+RIOvKIBtasVt$5@me)w&9>^q23_2(Lmx3 z$?nUcGN4ZjoMiK@TD%IfS35G1$3nJ4)+|YGhA!GcDvlM7djb)YJQuyqyBCqyjb1|h zryAlWo07>jG6-At0!B&#&py7`tS%8F2f~O{B~&4b{%?as2^eaDWOrp*rF`3Jr~l$a zY?mZ9X29rjS&>AXbhLdhe&TL46V!N0BK7NILy}b{twmlj3nD3aaxw3|?r}wUEI^WF z000SoNklQzh2z{9CSWn6oo9;5=AZrAO=G$*zDv4KUrX|a>4T(HrV?oRNdg7$bKIW=SO#p4#5|Q5nMNSF5R(xhBW)ff z5|1o6=6u(46p?C^8o3;+vHV>0MZEx37)+T7T1J7ljCbWQ2u=?~fNy|oz{7rBOw7t* zoJ!pogIE1=!g0mA#)WQQ;$AY1B<4DqprAj`;WC_r&Bkdn$i#k`omv29>)d&;Z)!bB(LT`T zGB_E4Z>mEh>@wc2Hk0ahy%ty1kxH1`bq>R=4{t7;^ChKZ1s3!*YJDB1Epn7Nj0&#? zJy4DmcVQeoAoqT;>3<4v6SZh}$lVqh)A+VLTf0&dIpI$0j6zk&MO)srsuon`ipn>oB+VJ}0V~46+%2j|1ci=BhMX$}FoH zd9f%Yu$zz8Ya)f4M4#kUzBMr#&iVW!PGq<}bs+OE(VyLhgnAc&Sg{Jo4^j|MW%S{( z2R;LYzpZ4+LdKt&98*j+6L)c@`7ne$WF7N3(eF7$Qbl_ql7LP-mm_(cjO1GJ)lWkL z%#G;=&KUaQosdQN3pnC^AcRqN3m0UHi;HFHANTq?M{E|;;1-DYi|@-!sX1D831rS< z#@X7LqZ$#wr52x8o#eR9%wmEe$Js)h@9<8y#G6>Rl zEB~mcCX7}pwOQt~^#e#Y6rNG5s0zzQ$q7iMco;%Ipo z%Ue+Im79HV5eM@uDGgbhQjAx6vDU1t8A$DG$%1eUN36Wd7}y?4c}dl@(si`Q&f`mn ze*79qZ8^FX<4U}RVv|}4+L$kjGWR+PNU~U!>l$^#Xf2!`ZVx=n4@x2r6RoM}wHLzy z;<`!0vF2!8Vv_YZ#MK$w9m#IXJ{nq?jw=qJOet1N-z960%^a$G?HVEz;aeE?0?1T^ zgF|aaYmj|X$9Of?AU|)B(jlC00iU*{Ry)(!(OxRJqvN#wird=fS<~AXPNFr-z$mBR=!)lZ`=JN6u z?6qebi#7V##|)7IH9)aP9_ahUxN#(ek#G^;>9n**&*FI)zP-Ppq2byf2>KKi72Og9 zLF;$+J-aav@`~v5A@sSD7}lsqb+)TQ0ksmYLjeqr5R6(^Xu;#ELt^L<$|^umkHEF` z6&1GjU~8{ozaLAHPfa#pu3sre%ND9J@EQSmDCR5Y=#ebSm5A1eJZc~#3|&tAETm~tdl^}^et(|nj4m(k+Z{Aj zZ+onmN+4#*#LsXY5r$!9j~+eVyrJl8&*bHWXPU~bSdcEIXz-G!@+cr(-M2Rw>iew- zmfVHr8p(#BBhvFn0MOMcT}BF3Q5mvQ>5VSRn)0#@0&q`ML!7TEVHrOYPNM(QB#N;k zqTlBMdiuR$7LokcuVa#d*MSj0(gKjEGq(jIS1Z)mr1!)wLA8!i1&J=CzR3^y8VkUt z2_-p5n2?tTyYus)H9!BEo7c~sxPANfBl7d}|0^#q@A;sipw>^#@VN6I_zj*?MthxnxMk<+INIc4cP(DaCgW2_KuDlfBEs;mG$-YBMJ%% zUJt{tQ(j))QL?+}Wx_CA*U{1OrJg-|iWg(;J@#tg-&zCB&CSDi@810f@f%+NaDQ=e z@#T^*b#--JyLIdKY!C#UmoHy_;;2!hcH#NHef#GA11SI2YTn!VFNy{*zXyO<8X6i- zE-x={HPJ|IZEdFm4?M6(QBjfnoro|D#e_gp5Cqoi(mOgjN=iyfqphuN|FW{OO&Z^)2SHG^b?ep}1`Zt9h6#YvAZ*#PrEg(jq4?4BefAO} p(!gGW@P#)B14~Lu1n!;3{{lk#X3i{L8Z-a^002ovPDHLkV1gy*G|>P6 literal 0 HcmV?d00001 diff --git a/public/images/course/guide/1-2.png b/public/images/course/guide/1-2.png new file mode 100644 index 0000000000000000000000000000000000000000..1a4f26f3802df4069f22258d2bd3bfe04e3478db GIT binary patch literal 14301 zcmYMbbx<2^*gYJyxDFtkl^kPMGCaVidzd52rk8f6?Y2|+>2Y$ zARq5L@BF@hc6QFp?zQ*MC3~N9Hda$znGlZ_4*&oV{`VfF4FI53J)iUAU_T!Zwsg4w z0A|2{AUR!M@X<2XywkE4)2UEY;m?$fH)wH`xa9aOzbWQOfL{Q;xa4yiBun33=8Ka1 zGzq@PQ4huRnX|yfEFO2MgVc@rU)Nl(@GYT&Y^BEi;3sg~y!JUT|5L`(NM@|JeHPo7 z44FmafMW!5wE+RaL!?&T3Osp0 zkKhk39b}|W*IO@EBJl+-!e9*|j7^89FNu!ixy)ec|K{g@!}wF7Lqqv0x% z^lW}4un>V%WjGkW2?9w59^8!t#v+jE^@tTtR(Mn8;K=Gpz`6Xpx{eL+&FjwVDd3oE0$ z1+b&O;Y$1g6|osSbmO&P(MH_R5g!vGz8&n-2i+LE(cW#-fjpuRNJ%2Td1KVxO zCglP>%1c@jVe7^=GKRp-prao{HW0{ur9YpX9SPzunv9|2$c}*C7~lDtN84g}`%TRO zQQ*_pqKT1_U7E;w!X@w9JtoCJi^QAxd3WUxc`?6TAaE%3NXG=KvENL3cD$(|;Bh}H zqWp($$*yGVHV7hJ+i=zW{H_vXt_Ma?UM%3ITLc1W-hjwW>YkKI33Fk}y&w&U1X|wu zKeWi$!5)spf}pUVAP`{K*cMR*mxMQXk0UZ`?gkz&r$K+r)vZuFW@op*5XcZA&W8Z> zYmrYVxQ96z;xDJtpBE60(BG_U#FsLxl>^^L0>2?>w@5i&wjnuUG;5Nd9T@yNqC&O;q2*Q`mA{J%Vw9?=cRMdHu*Mo04&Ye`pL1 z`P=fk_nm-DO~aLp2{c7R<*-K}`Qt_Xbb!tuKyD52&U7mZPMWRQC*)(xRgqb_cB{JAwQ69$KL zj^KZ?M`jLIMBydQimgaeY7F1W7Rc*=dnjV2Ib*s8XZg|^Qo8=lu!?_1(@96vReAAd;>8}20(5GZ(c@*(-0tIS79+gfcLNWAFox|c- z8{;!`d~yz^4zC}Lp+_2b^Y`hGpYsmXqE@N%8nM7ZK&}|`S+taoH^ro9gmi0{HbIAG zn|D5OF}$I98BExK0GZI#p!MaqG`;@Sg`p3%N&?A+H+Vt0GJ(`5d0g=v0_OEed>LyG zCo9GmtsbfU8c8?^tD|@Yf?@81;hiBKG=6-Q5iDQpMJCG?AGvVbJ^+p zzX;@9Zu69Pq~7X{jb9CN!o{jQ;o&t*s9saZ_$uitWMob8%Y@;$ldz{zLgXvLD<8Iv z)K4G$d(ZbzPPrqL?l&XfgQ^(;E5i+l;2*0PvpsP^;q@c;U!Ds@jkxHtuEKDtA}YxV zCiS}^`pQP=E+2lMo_gw#Q%m=nCNwd(Q1b-N*9Uo(QbJapT=9_^b>SNV8^ z8=ou2mR%cqRZ~(7-f%*Q~X&tfkseH z&Lv~gBwqowGL?VAXAO_i-dq#un-jNs>&?END_1bgU>GcTt*?>K<(`Z!#DZaEY zv$I=aa)e1;{$u-hKK!pk%M%i+IIDwQ*6~#J#P_y7i7T_y9F`aw|B%vq#!K4O(a<;|2&Zfzj47Oeucu@Y&e5auJ!CaJ znICnq6Fm02G6AqA>KRVO>z<3JT{}c3WU>BBBan~Ews>^B%r82)$0sr7X}N>$1f_WK z8{E{%7b54=PRUVG}DHsFy#1mf+6%Zn;J_E!9xrvldl$HrOxEB z;>n#U|1nRR6|gqd@`U@^{&BU+1j;1imGaUc*v?9zmFA|-cJ(;q@1tlCvOqzAEaLp~ zfu^Fd>LBP$JteN=d6~ZZ7RxkMt-}#>^*4D%Izg1FAD(zf(E@>Mwk|M=hEq1uGsO~M z%!uc>Oj1n8pqeM%dh~^|@<^Z%%c;R z0{SCkyVKBBp2WRsfJHEonI4)tvUT&=_;^1agA;y1C`Ev=ItxHWicyho2#Q?Rp)L zc)pj9(y?o$#~vJiM|1MIMkTAie2%TbpapV=D%+#ol|G$hJeUW%^oX7sQ7RfOizwS9 zJOr96Y?d#3V6?61YHD`iIJE$DLx_PyPubolF|rxPs$1dGj}D;ED%UhUzPrEwp@W}V z3>`(aoC2{kvF>SmJ|cf~G^WWl{WdhQLMeM{K>WvSuLz^gNy)201U4LHn{0PUEBvg& z4{XWfQ15&)Yg&BEnSXXUHd@ZcU|Z2GD&uXAP^tpuBK9we3~!`cMz%J2U>7=Ug%t=1 z&p8{8jx7ZdM)@LJF;avbcm7q%gLvj|KhPzPF3VfW3~4k+Wl<1uVy8p z_Wigz%=f<*25NrljQ=S*h3xO^x+aI$`s$zVQ(nB^MAMIpZnj9MjTB6q^k_t2*4*R= zVOcf9|2Eks;e3wvirMfA63Tz!*+ee+P#Y{5##&zGcJq*wFd3F%pI~xOF>716hG@vJ zC)5K>h@WJ{8VeGU+da0lIzHEW-rdMn)lJ2t##ectBpf<7d(_`5SZdu1Ov*e%NFh7! z0A4QOdn6&Cr;CgpbGZ&rW5wgCw#_@7&0i*-16goZ{J8pZZ5D;Hz6gMDkZ=v_&#Y8z zudvWHe$p%Y7g|Q#rGdLv0#d9=gV&-saJW2K#3x^zq6;C=#BCE-6fSW};9nwSsBMHW=6NA&e7D5U)dOMr!kZNt zR?6}q?ZW%mDS)Jrp0(+1Vc1K+?hC8Y5cv|KBgIFqv`rlX_}t{~E<7;c`*)Amefv-Q zss})VJfU(k=J$h)bF>C&A-BWkZ&?kaSM=s(XpLv=xskh{*K>A|_`VOr;cJ*SiBu0~ zVL4-EgwXD=#DtP}m&(w!JhqQNLy5u+%tI-dKU&p4AoaExlTFx9Kk{ zsnmeWPpalB(0O3kk$xi5sY)#wMtI-xdv%LSq!7}NTI9nN9xl0$4wP0Ey<AaB^nd0v!{M7K4i8^`d;?baupOZL;@C>>j!j%Dmp&L zQ2cF)XbKb)_0RI+q$8>~V5K}E|Q>GyT{&;#59VHiIfVOc=`V0VOMAOw%C zq_|ga;{TQ3KD3b_WSs0bzp;dx;k>DZ2De}$|QkX-Wb0JR4Bl8)fz^Gre!X+(s;<5%;{TG)+7j=2k zs3Iy+Oie2;QfS-F+$suVKPO1I!ld9X6wq+eb1sk1C_cn&i17uDC62S&Fv9Upd{f{@ ze#{PtD#>zq6mAQn9dp1+3Xy7c`u~m&xomZOBh((VM-MYBB2qoGj6gM$u z=DxZA9>WE5esHLzK5;$Whj(!@68l`gE5{Lk3S5uL&q#XsVVAGrtR%q4x186S6m8{I z8=O`_mov5=&%^tXV7^qkJrLx&bW%U^s`OBz3%!5G{;^r%7sbc+z_|!Ho`_hP8oNNj zF5FE^Bj&Y%KDps?MsW;Fa~%&mF&V0OrOk_s)!V#A@*3PW^_>28R7H{^T9Xvk2<9Vz z+wqTY;_x=Q2mMuAY7tVx5$mH3MDabPZ^95+e1P;9(`%0$;S+W=DmKH5(E`zf5z5n# zXyP|*vpnwye8#CrDJ%o`MOU~hTgxM;M)6MCKuVYTYf-e+#Qjro`}sVU`%9`q#@>o~ zN5IeP6WgWhWPmXr08i%f67UdpScKvK_fi@uKhU_tcwmXxLkp=>&i|aH?HXp+>3~Tt z_j9>=dlsfccg4y3Z788tai3uXcP*r4A$(7c&&1ZEvW}a{;2#(=HKP@oLW@UO(4XF` zqBM6SvWhv>Z&*F^IfM90?q+>GM^QX*3WZj>)y355`+F=_!kq0 z$`Mt6iyCnGnJbP7PShIdG(6GSJ%gOG`dpS2Vl{QfyHLD$5>okZFl%?duw?vu-s08N zbN*a@_>-hJ!_bd{k9xb;um7f1I^7?0@+2qJO3@bzPil~}dc%xWR#j)|h4Ytd)E~M& zTcBMZUD^k`A||!;IIQQ?t+y<3P}CN$X!*fdmT0~6*St`!V}ynGU*f!9MDd54vnWwr zf)Tp|a&+lhm;G_b*IPs7qFPzGc~ZC(k2-b0r2nq>6P}YO&f&|6M5`OS3g-3IZIgDb z)0Y%H%s**YH!DCjH~l#Mc}X~NYe;{UMp#c*W(7TK5K z@|dquNb;&;Vo=r`OmFt#?l>!atXwGR=x8z3$9vclvk+zuG^s$>?b%Gy9%5^*5@03B2e-Vu_zFvqK_% z>`e;`L9{UYT;c5LIipXgz!xQV-zuSgH9Nt-O++peSIz7j_>;e2Y*@)pX^5uLUyEb7 z{uLqfb=xUQ14$ypUhB?C_vSlG*}jwWs;$mGqM<9`Df3E{x8AE8g2Hse?RM9dn7?CP zC61R*4-Xsl9*?(HZujo8`JKFc`z3?Oy{PKIPU#Xi1`Y-tUhdj(gwB_Q)`SaQFQhAL zk!a*3A?f3TU9+aT4Ej|p*W=!hf3{-O>fdi!RFWQ`XlvnH%GP`%MA}_C z57YMu!fLytPJ430=IfF}-5-@g(IANYs~;M6+s@;y(p^u1=`X5i&scCaio*;bg`!&` z6Il8v_jg)Hk%fTJVDPF&+A6Q2M zN{AQB4#>j?--E}P(alvRAW?o@RS`zxZvN7M(WMz-OBsfsU{F!(xNRHjPx-k+%6Vvz)462!Vor};gKZw8p$ z@1TQ&GM|fVA-kWM$e`eNnP)_AW19ZoCf`615H~P@IlS&oY4giIIJydErodaGZD)@A zQ8oDw`iVib%PYO?QoSs1#p-!bVkJCi=hLKGVh3q?epT--WFg3{ya3F$$lP(uBTVdq z*r}RZyRY}}ZEQ%U;4c^vT;-d+xtfW4Bi0P?z}E@KSzpc+bm=U)`d6{Sc zdf?8(K;8Uh2C@;4r&?mC_^(DNI;tMiKeD)jM1!%&EQu;O1(&}y)pj%iGPG-V*o~l3 zdIk%S9cabqHuIUQ28}BKFK*`U<3j8sW@QRG08`h<14xyjO)pR&8EgzeCy-Oi6E+B? z?ks1tT^Ty}7!R_&jx!U*24A4i%shAWtr)by*GlG$$W5Q(lQ(OZRdi)UkLPtWeu*AC z{saTAT-y7bo6za__hnqN*RQh6>HFZHFY7_^c~5IX0mxTr^ttz%yk+t?F6 zM;zLOCu}FL3c*n^kH!-zT(eMlF4B3-OB3Qr@10rd>gCPok0#Y-St^Zg1BZuc48h5H##F?;d;7_)W) zo6y+#;|ZhEu}mpjpTtcQrDV@CGy;Cf-x}qm4B$293&z|%T*er(8MU%HI71U^Wnrr- z+nD!F4z&v>T#85dY~h8~)6u$S7Y5}v3lVknzc~Z|={}hIJEz2~g?0!!6Fn)5{u;j>Uw^Cf)_H#O1dFVRQNkEaCE6UA%%; z5b<550Stfz56*TKfAR!|3CRz-8VNs`a{r^_JhU;N zl#$2N>)W7zy$>s}VyLjad2X~nfV!+3cZ8a9Vueef%7TQSUg&}*DHFTOpzVE(x5vZC zLdoTzIO+OhL$chn22!_^5oL8T zi0?&-8wHaSS@3fW zG*qr=JBr8Xf;RW2n`fa?9RdEMPJPgh>Jvg>CXc#UPG{ebDy>raZI`&{{ABWX_|>p~ z82f za)n^R^jJD2X7%Klv5Ii!}xlNX!+ zy^QqJ5IRxP{Cmv!LP6=jd@35LqZTZ%^>ZoIZ@9F+*CB4(JrPbhZc~cwo}8RlDBQs; z=sn2MSS;gqgjB1a?;ia9sbt2~F>LN_Vi|FgeqoC8r~3xZs$O_5mqsfdENO-E>&UJ=}4qxGmmqR$vJZnrLOi#>APisr5yF9JP+7+ESc_46{0yuNT5F{`A-~V( zHW$eClCU>*?o-UzTY3fc;f(}$&ivZTW~?hIJa54cC=JotN=l4jUsQq=>KW||Dfiu^ zD~GIltq2KdO>7#?bhJ+ffJ>N~kS=f5yvj!he#)ei{{Gx)gZYNd)f4j>^Ne{zWvaBs zkN&?nOc=6RXX+fu{N2?*B!w!Awki#uAApx5NKmh~KkHYv|x6)!SMLM%D3RbzlNxP466Wr9SSr^tG6$1ez$F`?G3qmYL<@u_nPzWhLh&Q?X$UzTW$^Tw+Jy zwfT<&YV2)HGsbK&VC{zS+!_;f9iv6|D6f#@;=w*3AI;jg_(KL(`SmtGX7U4_ec4o_ z{{%bQh;K~w`fEv4Nu=42t6^cM@-NJ#_HaPQRD0ddH#%b^BE*1LQ|@)9iem6uu6Qsw|@@!By$($?%O|?igi%EHotR zt4MA3U-d0J$jIPrTP~N98t4&K&hSXslhOY!O~+w1_!r;y%`b#o+F$)3j=*mxsDqa^ z?OZP7zpJBi;r7dz>o}a*H6LSxZ+g6%8vi3OeS1r%fm@>YVWNz`1#{e?p4+R()wj8M z#{z;pS@Ch)YJB;Y+-R2MRe4%qHV`9nD?D<>-2$F+u0*Q!(`AgNG6$LzZg5h8*HpC< z^4}&>W$TwXUsp{%5q9dvGrztOobf9qG@ZF#YEjkTtN67DATs4omEeUQ2GenQcFXw- zLH8`2n2b{zK>~NQ%neWIyS89HI!9R4G*vvo4l45`k^L~p0z{7?YGoBR5BiDvy?Yb0BzZj6M8K2p+v=D0+P@Lzd9!^03)8Yr;gdhyR;Y!_M}ysxw1Qx z5CfURC}Q^cqXT&~+0?Mh1mOy4@~D{n^BkX$XT>wDQf=W60&g_C^9RVxo}t=iz7Z}s z_l9!wH8wcq$0EdB?LvJ)cPFCzC$kkduVH3Y3(+$p5&wOIN1&r(UuC;G1y|gCZIk>H zeO$$uM+d|!@2TslCnDJKZusvkq!Uu;m6iZ1-WV@Xdhz_XbDF5uW94g8FcjWOSG>rsE2{2(y-*1 z3$S%PFJG!CrriF0tmP<507NFqfgQvzvB?qN2&IObj5RZBUouULOy4*IGp0;aFt2H{ z_(`EbrDUB43C7U4>(LL5yRDZp{0+pE6T@mYaudaU$u_6=3Rn%knXsYd~i%Eo5U2Mu{6`tG_n%B30m0q>EspAJLc#o zZ~yaXch&r$J1X8Ae5i|;*V2d^H=WsdO~DJ>b^X<*38L2~uR81*`SFTY^}0vW&%E>f zWS1}Sr>}pQx*kK>x7K#c>}PRiNbOoPK&^F`=J$c7GaohP` zho%V61*wYYI#kkhRt{12j<-b1o^dNkfA#`Ueg7XXz&Ywi*EzpFV8n&1)!^?gFGl?? zac6wvCVMCjGuLUiQI;pIK80VMh4QOL!1p1zfr@oWy$?j*P5;|}v-W&WmQ!m$l@D$T z$x1N`Gj;#%XC{4)X)w00a=wF^sRl6X{BGFku)^S?tX0za-Vo&y6O+lD98Sw_@qu|A zSJnutw|P-=C5)rz9GIBpS{2vpLPg2}t@A>ITI%{mi{wy7yMa!)*Gebtz8@Rh+`+qy zWGPQ;x?@Zp-X-bb{~a&pKhjHo|DX58!77l~3pUb>R1gGabz+~5=~4E4hdYC~s(&|* zysDTzo-*teJSuykKer$%42RDOU7Dqmps7J?I`7=eTGY4=hnIa0+A1cZ@K){eB=6R) zM%PDgP)GHA(Ps?y95cDi$QR(92~ioJ)srg`W2bUM?qbCw$qv7}+9iSHP@VC^Up4d{W=M>RW$tia4H7v>V_QJ~(LkIK^D}r^42Htz zw#!>IwmSQY(TR`xb6pW6TV+w%Eu=U~?@Q%`T{Vg2scx_Xox?kWQ+LLH{8cDOgB4Tl zY%S7bttH4N|Mbu&VUaSRq1QzLjuK(&&GB3wOWn5V#Gyl^Kg|KTo-_3#L|(P#l{e4&m949to_$J{mY&saqBY05vmE6F3HC{=R^&uq zJx$qCOMZp{Q-p0_fGvk~mQA2D3KkwX+m#v-;mJoPt zd|~Y;X)^8B~ts+rh9Q z>4~qa)TD4uHj1%&;UW25t5$vHv3a*5Oj0dDK{H*g+mASJkizjX_5?>~#Xt@VC0-tt z-3JWDZv{;dsu@e9d6bWRHc`QT73*mEZ(E5 zE&WQIg!6CZ_W}Ud=^V=Xu>g->rx!7PK!xl0yL%JD@tCt`N@wEQZE{>h#Xk+AbD7Mf zEk7AmQmqjen#@5}#GMIovDrm>b$vJ)&=wxQ*CeOxdWpd1jrX>xv>WW3TP-ufAIhLI z`$XiM9Ft#4T|(Ms*AzJ-M(C16gj`U2SSjl4E;%{#T>MQb+Z7mKe+VOw&bwgYbbB3|qw)g7jRD73cEMa(pWt&yXJ zr3J_Bwy*_-wO;vJk#YMJyf7-xFoQe+l{Ylb74O)4D{(Q=4!I_4@(+SkrL(7NTD)oM zM}YD2nhJV{*$>S0aghs#wYh_zKBB%6;)e@(0?iVzEwoY;f{yvX_m4SX-x*nq_Fd}U zmNeYpix<8y-GdjXCKlOKN*Zg!(%3WN#yG z3;jc{o=7RnlqN&G+|;YL_y=pEbauBaW(>E@E@j2`6GVE#4PbW!xbze7^Pz2TaP%M#WTJKd2oaZ#__6J5svK-p+gtv(TOiQ%@u!B z4z%@B6VAN`qSqpZKcH1v^65~fuW^$WC+o2fjb*}(*4QgT2p&n8FT+VKmxvli=;w-| zSfzpY0B~Q-;p`t=&8c^yDG>KBVFe86Rj;Ft4d+G}j6!&PwX(-+$fZKGXcN7xSFf?a zBc58)KzvfROil0bJ3?b%Y!p1GbNZSz~Gk)%4TP zPBO1Xm!nk}d9@qeG5-467^WTuxWfIsFhz%w=#x}$9DtX(mWk)1ud=2M2QOK<&JiSn zN;opqXXo%&YhF!Yn+RQ-p*(tG-;N`<&Ar9q7u)!d5C9)gz6Q%WrG40r3%{8BmZt5u zM_iwX$j+Dqt&Cn2g z$;|+jet*xMY0d9=ZHC;~u_TqD3F*h-x4AtZUK<0f-cDGl*(790zH#N_&JXuiBAdo3 ze|Zil6kK<&FacCBU}&OY++72$I^`kgM4<-%c3xs45;D@q$M`0lg^#?_G}1B| z1r?x0eu7eJM6FEI4;y2t5GTgGAV?+zV%p~~a-r`Ek6*6qR16eeGClxU<=mZ7Ju$MJ zruIQ$G48C{H{|9OIyAze017#}PqbYrpR#Kn9LEROC`id;VDLD9P(k%T4VD4$(1f7P zxhW_tsMOAQQ$t#lQPYjf+sVA1MYXviX)Y-yj)a4$!iLms)>+t>LiEuev;@;Rn@!Kc z2AgsB5PZ?wvf}Qjs7e?2{w*z_^*x3E(Hhn{EILjQB?_h^C8TMcG$ftuq z>zD5eZ&R6$*OrrP76;UvRR)?K0w}yTfV9j#)FTPRRd$Oo zkB_TVq}xnl(hef7z0cn`X33%^IG>q);ixD@Y z*nHOwKD?dQnA!)C8$k;7mU*h4MvAnB+);n2{*p|M0T~H6vO*g=p}KLjM*>3t-wcEg1Q z@AT#`Ih`5Ev+p?te4AyS7W9j@fs~8c_LlC9R2twgfDP+Oo$C$8zNeI&Nq7i(ZC{K0 zR>pY4%|r<_^T#8`IB#-D|Fvk?oG;0RIIGuitoj$6B{`Z!PvA%Ok6O``lU*K;v#~Mr z=*8_phb;YxO!?m`@1wfUaPVHDeQ?di z1e=N8elTJUlr7(w*z>H7>Kk+Mo9-;o3PvEYB$8r0gjClK3$_aLFnEN^eaNk~9!IZ2&|YIHeO}^u zD&75ZV2z7suv#q!aO{79q+p-xBE7LloJiYZ+Zptk9XVPS<2S;@_VKZ<9;y&6ifIipQ4*$ z9a@FhNd)SozR;ebwLN2zBc$J7E6}->`0A5vzUBO)dn;$$M2DNf_th>h?L5jrp{k~g zGS9rh-m$-GqLy;@Kj=pVv9)+{(7{W=ZIS9dd#55B=_?z~lbs14{eZAXU#ZMG^n^x4 zUcF?XgT@!(h`HBrzL5;S&d>AXCE--;DOI{2T!xQrv*>$hboK6zf1We*z;vdfF}rm? zgN5hiO>`Hp02=O9X=Ird9}xdD`4F+hj~Z|5(Mn`oaXBJyIAK=u;kAc%FG3s`D#r@5} zkpAl0CRoOJLX0^kSfIqLqreF_736mILJqWE%cgAf)t@NW4N=&XZzJW2&8Hq9KhjPw z$gZnW$6-3*gc*WMoB7B)7$Ty+L;#jLEh4(yGmlyyzeqSQ!-N^|NB>*$#oum110Odl zPS&VJ*6M$6p|=Xac<=v@GQO^GCD#r7D#K`fzlD|CNi1{jdQdG9=_faK0!=<=<6kt= z=!<4co!0HR>_Oj{0f$S8=P1`*sL2TkGgxqZ*7U#v3!djJc}rpX<=F%b-DZ(p?Ya*Z z3nA^Z-_bT68`uxt2Mn{`@1A|R`jzwh*o$t>OZ6lk{${^o?AKavll(ea^*ZxGlhdSa zk5*Eaz2B^*xtaMGSY414(hvSk>GVB=JP2j071{d4B+B=~8O69!Ub8ER!VGnS;4T38 zzJA#hdxv;|baEySs&{T+Vj9=Dj94~Ec?zy!F2Vav3TyQ;yh&#(M4wK}V*v0C;$mKE zJvL`QYxenhMpk0D$cZ*83#tm1sdFTuuUn!LJU(Hq zmmuxO*Q);ftoQMqtUhb0#bMvh&u=ulh(|OLUw~x1cIwY<=*RMR9D4DRy|gQ*FPI6y z^=uPdV`cMkY~M-gCV9CqzPo()OtIE#krx|V8pz%0al{K^J_zdrQ$pEF$K%Mb7{tnW1r)Y zA~ZUwO&@lr;>+a;wBhG&agHj)ht+ishiyJeP~wGPF_G(k+%+6#zyzmCq{yZq6`Ho2Rm05ipP{gJRqzcR!nt4r^&4Xz zZ^;U)MIZAjaY+o3aT~CPHR;4`+ybida8~HT$gWfq$0#MowO#58O?Z@A)yYxa$Rjla z9kAe>=Jh5N222Fqp$z~9`|es z=!6)i6E$<_RaQA!f}4u1GFMqT9UZu9HVnqeKt0?dAJ!l0NBwX6n`YsnXl*O(tc;SN z`ysj(`uG90?xycCyaAh;Yf&}aFtfqjxS0z{q|8EiDoIS;#6<=-Dc`nf4^e)nYPD7P zfUrduR=yKf!Jt3el+$N;V5eiwzujgk^Q-p<@nhs(Mz(c$Bm;EoMhzQ3c+)t(+H2_s- zO%k**#vd6>LkXM|jA1Ietz<8kRuw$eej4$p;^pu%*?Ta&mYR~A z@`}IA&7e3x&f|{i-%_-2*ieQJZje+{5G?#Lf0i2!}GS87cIO&hI0$M_DVZ! z>zj?;`?^1!76gAojFj$}aX!AI^k4X?Ag8mXl~YG%lu(15d-N^6){FI{p-HU)ffw1e zK^(Xgdo&xYuwzog9JlM%|+~5(TZ{x5LSH^YW?>)*S9~W>Z1>M zmGiMaY?f|#J|^&kdPd`OEi8F^c|LiH6_A4-V*fg0>by_Fe@rXd( zwJVcJUS*=-tA+AT_3r;%c1|RBEu|C);;$MPr~;m?6Gd$ZY5BZS%3lqJa_Z3M&1aiB zCLfwj3g0#7r@s4GkCzeRZ$JA}0=6UBk~ zY_2^w8~=}W%&7RH0jldxT;G)v>taZ3`Ap34sqkf3jSWg36N`4;L1HQ>-P4~m0@#3k zgKM)?r}_l&|1@J?Mf}7o2a?mZD&gRe>`<-TA z(&F)qjW5g`1~h+TPhxF(BVcpo`W{t4S`$5}!Q8arrIFl#A#CPx{TP~>kNvjWma1Gx zz+PQ&E=OoJ2$QGtSd-urHc+5R{ciEJ5Kn{WF)d@~d-3P#tAfahLQJV@alAIyo4Tiw zZZmD^9PNK@^Pe}N1+nIqyjwm8%K={IX{b@Vv8_X0e})u%d6m-<7Q#zACjN`YMXI2j zV?*$R%QqrTT3-6#RTRGAmx)#)p{ltY95B!0ki4`A;t8rzTQD_Wuq6|O_kJ^zg!J{D z>%SKaqt8<}MT3$wkC0NO5%pRTrNS8iY6=?HrjT{-J;~1KJMTASWdPRDho;Mv&&R^V zn0v79^BoLAHa>XsI_`X5A~nnizuvz|ax1Qn?@I|9{Av-Mc+F?Cd*LG3?SsvS-hx;C z3s#re7*w+n$GiUH!{>9439p2=rtG&JqQbbVsVfII${@JhrWHQi`O?FK%kKoAa8Cld z4k-?SF@T>I4*iqItBeJ?37Yo}3!^?lP&S63ZSR_kf%oLJ0xpTf8

    jk*NPHEta;ceoFwUIy6 zGc0T)Uhs6YCTy!I2>Q~1KTTJ6Qxex3I~$VTlCx%_0rUR3{kcP+&h9jMc5SzdZJ7=(IidE6A(iF5XP{%sHNpQ1XbQr;r` F{{t9)MIQhF literal 0 HcmV?d00001 diff --git a/public/images/course/guide/1-3.png b/public/images/course/guide/1-3.png new file mode 100644 index 0000000000000000000000000000000000000000..f54250747b8f64d48098424f4a0a14e3d896310b GIT binary patch literal 9862 zcmZ8{2{@GR*Z(tPY$-yN?2L%9v{**gkQsYXmTW0W)G#CaGU^*jSsu$&#!^`-*~!jS zq@k!$mPq=VAz2&3SpU!P`@g^Udavubn3?Cf@B5r{f9`WW=bYz`osIdPT?cmo0I&y( zF+BqSurBEH01p@R_aE)|?*Kpsz?vF6gu2gU^VOBw*Kf`ZRors86p|-I!#@9bPWc}R z`-&Sf1=IeI-`Zg5PRf$)Nnctk6~3jLD4qUg#Be&pdpr9i{*WMktL*&6(w4uE{JL2m zS&}1f^-KNSrd<45<_`2Mh|g)y%}I`l^_b+}Hsbk*eZ}))Tn`k^H3&if_ ziJcWnspcUT1A1WxcWIwOHLj7{7NDQ^{?dbCJ7DuI42PL}3EmUZ836R-_T!63fg%nk zf7rfR?)f>vu2}>5KYH5|jYdT{w8I(heTrb<;$0*n~O4i9T52|6P7> zJlk$Eh(dXpNhM$?eJUE^=>`gzqKf26x$)b(5_FT8uL+PjDD@YjGV%K0<}&>J2S2(Z4f3w?YA*k^g>HMUf)qa?<@kTznc;POaq?6ppB7+ccPPxxsu_w znfG2%fMFA@MZWY-1+`UXBpZ=;ZR>LY8Job6@hvRdnchVxK=}mts3cIZYY^;;+A+a> zSs7nxpp_#)j@r1UspmDQUg0Xeqp1=c%;6oC1CoJxOF&(bH4#lta9T1^>5to1=lETt z=SaN8;n&_nF}pn_!I-&@)C6zCYW%ewtUTqx;Ili^U?>D-avGIBu{34cR_WnYzq22C zM-a#;E{Y8x8p7`c&ONyQ2a?LJOaH%8Sp%XURWa^{;&0_Ms~%@Y?ATY=OvY>Q`D9Yn z&V$gu3i6(sVc~6&?asr&On3k{b&cEmQXAe5*=xHk3uS;8gO};y1g>+H>r+*@FF3T} z_wMU8-w{-m2lI`Ovf2J13wUY8?5jVxzk;mtdU(eQc6`u&0|7^f=CA;%f!Z`Z|Gn?b zP~65xqIRHnFPoSz4D)y2%|a9RgH5=-asT)3eL#ZWQw;D+)x+7Hf^M1}-T3cNGm9sS zyi&jA&1Q5$@4)V+nzWo%0Ed z_l24qJI8)Ebf)!Tkq0Q*z$>}1-!f}+Gb&zaROO`h&P-Pjoew)L0liA{^WppSqBu>@ zHoViNUfhn2?07Jh!P&f?-;Yvypyy&4H%ksmRY-I?6!z}m=Yn8L^(jHi*0U}${W6mu z^i80X^!TxL$Iec?m6P$s0v)gwUg}1iX18gpVAlm%2c}y49}{H~^Q(X+fU=5|+|Z?oR!AJ4-7UHU zPjwh}j%)rQ{s#x+!TZ}AOUFo4@|lFkqzIGkgBWLFM6-vjHz1|woz_ytEaf{-T)?Ee+$|-*3&)q~nD)dN8@OQ+e6YPR)?}Lq)a))G&ezcER3QIqsN%ATLAB zFx`|U-p9CW){bz6gtXxUP`&m$#+Ts1xWFmiKqlv?mHrT@7tHU*Ki!wWpx6~Y-4VBb zZ%WWEqGS4K?|GPBB7F~Gl3=%d>VLuM!y{sT2wbO*rvUJ`Vm4OI22dcM%f0*f_Z@UB z+8WW$05;s^x5i&BjR8Karw!KUmDC%e){@H)YyjnW^P0~33RKx z)(hcSQ3pLGs(8^Rba2DwGnWM9l6ylDg)4Gm+l&d-`fyWp|bE5F6@w-rF(g z0Fbz^KUj{%YG@Rzc)7N_y@f5%6+swQg+pf#r57LrqkoZeWsQk~T@5{U)7ukg3M!#J zm$~M7L2d2V%?aMZmk(?0?A^T#qc;4@m1ChhIt%ldqOvqBD~_;*JqRI&50Kd7$p@0O zzwCkT=n^VUum+kaQ13wE8dIe(9zZK74-l8yQ$5+87LF&7=i~Cm_$@rrO^9CrrH-e4oV_bt){{7EwP|h!w6!ZGAN|D8((G z>Go)5a()oAaiqiTP1_AA8iVT`;UVJV2LtM_$exSV=yl zXg=pNE0?+Psk4TC8b2Aco%*~mz)ufs+(k*mj(if45bP@b5VXFVZA)i}w;Umk!B#@w zUjy7R%)8FP{qKk5GVhaL9gt+N{!~H6R~6`h4}f%A^AoEp=7~;8G5lV}Y*ZbG!h8W{ zgvN7`+aC%-6r*0Z9k8uIU>njd`m?S7xTz5>N8y1_|Es>D>HT*9jf^f7#UykDTk__uus2MblDMtqyw_#y?dt4&1P7F&Bj zW)cfT_ofAnb^uzkVLpIDYIqJ?E$BLFL>mIuwTVCAp<>i5_=GfqdHJEDEPF>zdP>ED zTYp`_ey%P<=zK36KMuu{c#hEBL~lS(kfMof{^!fub%Q8&zR!ZSqsXP(AQ@QE)TFg(nDd>lsa7 zc8zwqVdD%))Fh|w+wQZH2Vq!S&T=tgB3AcP-tzs=Ct3BKqaHH#7a0w17Ce!2G14aZ zsm>c8)Ds_Dd+V0U#xhyViO%AqjVuD#L-`^sQt|TVt>Lq2NL8380T|*4K+D9Jj6 z7sK1}H-HJCPK>yGR^p$4gIMlEi|(~j#1a6-J^B#xy5$_yJGCFV%Q7yVj*bxQn@ekI zEhg-39kMk74FxvWSNNW1_1Kk~G8>j63?l>}LgGU@!EI#({#Z#WMdYCUqtIZ8)ow*< zd_l8gSg%!8BE|(lG#SH{#J#b^-*4Fi(*s5$fryCu%>1ovQFw{04E3yu8m!za@V7fq zCO6q*^lcv$J;L;^nizr0(r$`9IARRvya}KP*TFl*qCwZ(IXsX&3;Vh8!7*(;_}XY& z%H9J247-^-KojEe9g}2{MNy4KQNecw3hM|yLn+> zpQQ^Yr4d;9*k}2g1ar!!yFEQ%c<~>K67Rm(dOVbeNLwk!fVGs0*C2h+FK@=1_eKa1 z0Su(lQ*Q*CfXkZ8>bOeQD>u@eJCd??9MGm8v^wc%m9nS<1%9W-Y0Gd!<{)y*DTE7j zKR=?|3O0Xe=s7o?C1Ynm*u1x)3p#tW?-T^|vLa6K+c;RMJ^6l-@b`1~o*V9ROf zT=&!ZqfJpdyD4jDZa;q2EAsY`fhVmMSTW`uA0*R5;66)`k=V9hgO0x}Q0iG8$cq{f zpmbyfSeeiSfsx^{QjQqcSHJoU_R?v44~W6A{NS1av4~{cywwtkZ|;uX^`8llGSrDf zl210pK*hgdYXfQ|I%ZJ4&Os1JY#G{*oz>8KdNhCsMI`2Tz*io&SGfKw(@=uV*?Xl5 zqB3Ot#$hx>3`MVdy{KniZrTrQ1@eE}Gu0BQmpDmPRh6;p-WT!rA_pL9(f`zn@=anw z%L{EztdGLO860a)p!Tafr?KRK?q^9g)py(?#Ux|#mj@%#M}Du&{yKGi4kOsL)IH;* zpSCCn48cP8P;>8neXv^!E{Xi~9JnVMkKnd`00F;`J`TPaY|4o`P?g^ zoVoSN?&InE!b-@DRb2(&C?H0THMQz87}+J4`7!scOPC$VA8Lz}Th1rlBu7+cP^p$n zxj4Y7K7DibYRMtwyK0C=^aDD(DEbOhU*=q9<_}~;&P^~{JU(;rHJC8m(>KHKh8t?} zo@>JDR)6WMZjA}7@C941jt##n3KvXS)B@tu7gMxmPdZNddI4_D?`^JIw^j01eUTAY z(Enj>0=#5Y-9fsU<=2!r1O~hbA?+a$m^c5XRp-^%yYqD*>&sa`0Z}!sFy7$rS}{i? zwO0}tbv}6oW0v7(pC3VcJXzFgP?;2iSVe{<`3+B>D5K4vGxbNm~Xw_&8~Hi@~1cpZ&U1e(^2{(TmyIWmr=cO7zmQ4b(0Mz z5E6wrT$RU{Y_xPikwNWnpG^H}Jh{tBu&e%4SF?bS(%>~Radcb;3XTU*Fl<-GRed## z`_vPTTYsC}o6S&Dn$q{HPthzbx*bVBR#DW%gOeC2ia!!mf)RWGr-Q^>p%OE{pG{Q@ zLS!oGK&W_p8oepaAboD>0vJ*Ix#!`k!TJZ1KsjAPZ0)tWO2pa(^JBlJvg4t_$y=X60|AN%cAd4lml`#sHTTD-4$&!9 zXJ{^*VR9W_&Wp`0uoCBh#vaJ4^~GR|GcF4A2e9m)KU}WWVhxn3gRkK8HFBBJ#X$wD zHpeDO7fNF^L@BpvQF?8;#eXsG;%Z~^dn+WQ*UsHTO>zLi9HRt}cremOMI!5#Fet@4 zY5^pNtlLw6j}adD%6{4p!%o3;4A;`5E{J!wLwSPd%()^^>bfy7A2XP{)-i0U%SD;$ zN=qpixE_UET{;I6_&oNXo)-W9{yJow-8Z;?3&F7GfzbVcB4`*#*K}hVwsez;`S$@b zVst;?ZozDM_#<1z97+e#$}}-Wb_5IONq;ukZ1FSpc4xBd%dlnQ3u!35-xx=VLJT;F zNJO?;w^Sl-4vrPO5oKca{*u=dy!9sv1kYi^uRebo5`nkZ^6K=ube|_3vF;x3wwtKZ zuOk-zq|ooUd2^vD%1`%*wT2~V_^XFAK%PiS4f;G$4TV%Oh%99LwZI3`^5u(quUg1> zIrrZ2z3B{Y@^}tx9!bXj9eK=P1smV!Kr|;RT!$I=x4(g}07p3m@ z$1eKGWga_~!B>nxem{3rXI1>q8RW)X^+_lkJhf5V(z~7S7g>1Yp3&g~hId~h@G|qa z?8is|I@ILait}!FdvvQ3dYo2Cl%vS(#-lU2UiJJ$>GYWB+?;Ku4F`(p;tT5p8Q&S9x}VafDD$<1q^RTAT*UlH z&XxWM*t7|A?4q_B*P=C)fooR|+d&-Y2)JpM(r02sTLoO*sWZDlafDq64<`H^_ISAx z(Em87daC`q>?bu_`OKL|J)!pUa8Qbmf+MNG>+aKkY93WDya#z$ePG3sR)}`jgpZm? z$ZelSs0@`S4guHzGxB*)a^r+|TV(`6Dj7=cxG;IB+MKD~dPuj$6D7Byc%VxDa=Omp zZm;e_Lhj>M#fA4u&wTFb3Z~GT-#2&V^7f9{FbOv*kG%!Q}Y`tnI2BxQQ_`Qw?$ z{vVAZ6tIsQuuNNQJ@EsHem`~+;NzI54evtYe(ODmgDYA7J^^2m26K9<`Gpdkf&*yW zjLLk7+`)-{z)M@&zuOZlO&IVuSC(#O2T)b@+PkKh0Kz-1;WQM!(U<%#zT;XN3h~I=M zG*B_J9*sDpDC5fuZ1IkM%7^=p*q=$dU3WK$AblP=$6fBx`BD?7#_b*WKlPYmo^;cd z(t`vsq9%4^M45Zc$^+WPsGptf_JRTXuDocT5c5443wmBO105H?xj%W-e9z!?TD5O! z`v?qDl7H`I$42E=|4k7J3D$IvuIhI2bacgP*U2TE_;D6UrjNk%x`0qC5Oe$r^OXP9 zHhddpNQa!C%kkj-oqBO>|DP#`v}#pi6wIGvbUop6bCCz_DX=m)zL1amC`4T0__M>Ps2I4MF3Th+Cl^ez%X7G=l3viG_7HO4BdFPb}+g6o_=wE-#Tai$?Q`nl@DH!ee0 zKYXQb8n`J*Ig8AGq@ju^MDDHlz;RRq4t8^u3t+jef}UVq4pMx9bLuQlM@81MjgALF zQGs=j-fwv`!5Wj}PDs1xejnoaetPI5C1?b)xpd!Fa~}F!Z7;2|?RVQaZt~AO7ijbG zfhfF64&pl^uZE%A!_E<|kXyVUYJ1#g6kSVKZ)q$I?kEk1qFG-=^g&!UvM6#byfXKA zw6ge^5qe?O1n`3eNPdP29$yb|dtFgwFNjv1(XgO>242BO2@h=c2YZO?rO~Ux`qMsu zQwJ2Qktcq@C{$$Gl%^T2GRcA~Ah^3JDG+oy4iz@d(wr3?E!;mIvt;a1zr_Mpva)jc z%S>C{;gmbH?8pmc>qn(#(i}~htw5b}!qb!(4F3CPm(BE0$fb zlJM1iiHeUZLA9?s4`tEYer~*rRd)6WR&LFAtDJ0izAHI%Jd@_r4|l4(7pX|Bh3RPF zR-R@jmfjbwnErMzdEkeT{~tG?2w3sACtXlbg;UJP+9;k7*|1Lufx%aGpa2mdPi4tD zDWJDzUl+LlI*i?!ZFaW$KdM>uc}9>7A$}V zNMtBtqVp9kXdn1);G+@`1g@FxFofvChHrA zgI~s7p0{Cp8~nG9sh~So)&+_2B9_;cZnC=mxGeR2wxky?D+wSc_4}(~f=d2wjIo!U z%oi#|9ok<`_vpW*=W3!t(tF2)j(M^RWE|EZy~0WnF>`9Id-tn_tnZ;LVBC*H3A}B7 zGM$BnEoTB`%Bx#F|WX6D>zy^)d6kXj+&LcFQ4Wq5V+O}cgEMvqCa-aRL+Ywuhx zmF1H-bSfr@TWeE$RaGVvfst=jxN!^RwOXEy_im{{y8%+0OSRAZG0b%h{Kcc5JRfdC z{#Nu8zH1b!S1a(e)_nEyu%Jm5q*Rd*-}w>c=jGHVv?dBho?AY&t~LY)(&&y8eS}&5 z*w5_hOB~_U!<$5szGB2vRK54IOxVX~fCbaw#jy(9oX9$Kw8lM6oqFek8&`2{dF2AonnjQ4@A~E>4F8`@#uO^_b5O#(bBEFrqBKFZ zWzF(K)C`jrtzXgHmp!d@L3$f7g!ToniYdAM$Qf?WACU+v&{iUTxXn88)sJcmaCYM*{fJrF31;ihQArp=kQ z#{vsclF@t=UHuLde%Z;WPKYDXUIFX3pVYcRA=ND4eB*~%!o zZBzvL@)MfhX98a#V9pYbFG6d0sUr)K0)Z~Hi!ibP#az<$^S`}ry61rv?S%Y3+f~RDCfQXFNs7n{Z zz*@(V6td5v9#CYv{ze^US`4h5I&XOm8y-om3O_`37hEK9nv2`+v(qZ&23}%m9&$8@ z?kcm5ggj`QM}Ksq{ccg3Ub9@fK{Q?j;45zb!adfbGd*p-#n%PiS5`W(nq zo@C@$GAnoOS44Rfm!qX9&jB^LNk$)=$R>E_#Fp+&soqUY1Dc-s#L#9vT)1Dw z?R~}@+vMDLNzUt?CzOHhqmWeM8H!wgq!^_le+J&%eg@Nd`=LZM6~Dscm12Plb!$$F^U8X&W!cUoS>y_6x$*g<-)?#$${Bbb`pSGmE9}e^nj4y+F`S|bV78+;fV&-Kp>yd*vU~-klew-*mO6^p%C4|dHX|nl zVbi9}g^VdO^J9lvcoxYdJE*C)bvZ+BVAC*H?w$|+p z3b`Moa|$XQ|NkQVia!sADLym-=(S$T4b<)cLQO{AUp6_u3{_FB%%PwMwLhDJq58Eu z^P$bac%>W8`eDg8>$AIe#r8oS^VMbL#xcyD;2U1C<{91t>V?5xA>)QQaTFcs*s|L- z-3dm6q)18PSh4eEmua@5g;v8LqL zHBe88_f3q`3-18~={H+W&(VV~lx1sfN#BB&7sYtyIEe-ZIZOK(1lm}}yj^aU)}nq_ z1VX>(2}JtjG?-B$z_hPm`r;UKUD5@rOAZT@WvJS;S|&%DQ`tm)ht4N%{p1?}C9~lqIY5-jOnFxE3)28_v?)(btCJHTj#zLuInD@YwsmTTQmC z`;%%PdQ9>x^70D_YG3-{0jDpQ`L8&KM}fTbFsKgl>{u)}L}i*0MAEqpKK~cv&7EB^ ziIX%j2ii%`cL=1lL-()mDp0ic`EY!Yb&tF2HoN=|b;g<_GK=9lVnktk+x`)2TKkoW zn#$^6+a%B`zEs?hw77Vt<}J2O+8=D%n(>ZQlxyXp_`o7F^7&LDw+xljukn7^zemNF z6HtUXc?%^rBc@*PjP$zRrsGt+ScVGtB{*OR54emzKD$QKH8KLH%&(7)sslZL_N#+2 zrFx2Lr~j$|J`5!cx76Lb18`N@`IM*fVAH;-sQelgg9f=K`Ad?BpkUm-r$~}AUgKR_ z_-x>V)}D86pM}l^UfcyW>bc6z4xiTyWGo?DB?8!5eF}o7OfoCpUIAcU6L-DqlywcL=zC%*i*?DKUl`Z@SpkdJfn$ZS0*S zz^}lH<*FC8XZJBZ&%o^!6y`T+#z3&r>BQMl2C}(nHRTYst4f6<^e}M`Y}kgW+PvQa ze}mrWJ>zvEO||YVgM|maQ9At>u;|vKz_AH{m3x%vVJK_fD(}x z^Rk8dp)Jn!SP10wVrKMzbu32uhQEIiYYr~1Af`TKhlN9}hG){TzJ#}#9}G^ABD1-{ z;iy;FS4h5LQ$ZuPb9YL4Mx8)hX+nXD1^L|OoB@!Oxz3MmWfbm7F?v4zlicc;PAN@x zSbEwV6zzv4=p13H0y$7+t;BcR(Bbgjy9@->yJ8ASV13*l5*D(22FHRJAZy83!8t|X z*>1c9R{C;oe<#bXHMZf^<1JUN(cjazy8XkElIQW8tJWi3zuXVT9H+KA=wuZyzs#=s z`qePniUxnQ?H#gZG%i*g--C_LstX^uge>74J@OPZT_M0m*efuv8pDJ#^{k_!5WUZh;Yr1WMpn)ld5y@ zJ9M!a)K&B(BUXjF0uQ((73e%(Q%xfe68dDN9e-VGw3d4@r~KMtIa9$*eM-uT=3_FU ziM7mV`%@Ye*nbJz((yXa>*;c8l*7bnhGkp9*HI-be|4bbd$WioF_L`PwSuyRPG&L5 zKB{fPHHIa_S_@oz_=gRqJR8JS^-TNM;36F0=VuP3$p>yslprM!d{Mb+z*PkeyoQag z!Dm|Ifq0UdP&-=4-uIVcys&oeTA(vZ|LZMaka&Y`-BMdn%D( zb-_Y6KV518U&{Hx$JkLmEYNJYg?IF8bNIv>Cb|{>{j`F;^;`_@BwkKw^7R&J@djYy z@MB0zW^zoV`N{8?6NWfk#9?fr``nEri@!oQa6>6{hz;@>ik;Ih z{7(ZMn07@+zXg7=z6&`*4%y9-zjF?o(EDWo N*38DV^rYv_{|8Op!IA&~ literal 0 HcmV?d00001 diff --git a/public/images/course/guide/1-4.png b/public/images/course/guide/1-4.png new file mode 100644 index 0000000000000000000000000000000000000000..6ecd3bfb7b3b7619c6137b95d4be236f24dcb742 GIT binary patch literal 24857 zcmce-_dlCo{QsZWo1k`4TCLI=L2J_*ZAG>Arbeumsx3y0wl=LQp{U&=cI**q6d`7e z8bOU(v4t34ulMKkdH)IDU#{D^UE_Jq^*q;g&htDU_Y?i%xi%vm4;=siV0`*SLmvPD z60gcHXsE7^hb&G{002S2Qw?=Pf9tJT%7dVOquZy`zaCR@%hWSQkOXPBRZNor>fx~8 z_#L>~TR*?>o2IOmRDOQkwr^AM?j$4@F@0XFmpvMMdixUgYs-A23`QtV9Gfyiwf*s{ z>95xjO+s82ppLYWDD6622nyxf7PT`!!Gk!ti9~&@!&w)iz9LcBn5g4M+~bcK;QfCV zZrKx;2Tq{fl?R8fvAr0*4J@fQin!>Nm5K0}F^3i5rk%7pO`t2GuE=v$i!2c6QmO4e zI1hF7%wk*h-9Wi!r$>C7(@JpJ38wM9TzE0nW6dmsKN*odYz|uu*=5t}oF9)zoM`m$ zvw}ja4`9%XMBMc1!MuvN(0bd0fq&m(rT1Md+;Beq#JnhC-91k0vW6G-W{nt|AG1J_*2e(zzBT}uC)|()O=nS>Vgbj{j_=! zpwayA!}0UftLN%)txc$-&*xd8uaW1+QN;P8tWOBNX>-z0!G_Rc82J;HXK@}^mk#^9 zLT?EjWsR>MIU!}k+1i(^5hv5=i?JDVw@W?{wn|N}1IT0T)NG>>gdxH)r5??LUb7@+ z(C*$u@NfC!YyeU94H8t0>o&L#ghE@@-L^_dx`b<>?4jd7zs%hvsyss^49PU07ZA5C zT8?c}sD+!&q&ci39vg&_E$^-5c=_}GT5dJb%dfXhcyFI!A*o! z;g0Fg?ss)B_TcoD(#S75x4kjqiec<6?G~mLMbB(TaW!@t7WJ~$<(soC+ zcJH%C0?ni0hZ8oI^IyDdV+g#f>h37DWZ-1O*SYV)RG+(?ZM zAn+JBt(plS_9R4wT7BQ=L0jl;G&(9h)i_I`2alSWlkL{MK?c9O9B2kIHKx9>yU^Nt zuMEdx{G5@Mwk*@DztUSUM##5_Ue^6@+A0U7)s63M>jDPOHshVn;wAeOL-Du3vDT#Ml4=uVb?RDAPp=d^H>0#?`!v*rFbG-6~ITBS) zn6Qgf9WsY?U0lx7$EBtnOHLGR<0vqnygkmKZd(FZor*&gUtavV_)}Mdb3U(G8(F;g zPEV`K3nDyJ`XfuhxMIS?`JI9XvSdl)c!T(_J$E7Naw>cG807hV*Kwt&2A5^`US)77 z<6z!7jptJ}j&`eFLGZqlg`3QTeFXYcj=uT5oHe|GdI!;a z9+nV^VqRyyoWV^`99$kXH#lyHew00FY46*&i=evvcb@4nbho6h2ey}+9q}eY^4RMEXV<3%5hpelZpQ-FAE%_Qktx{5<(zMK|2y;42x@g}`j;I& zubzG(Bbk0VZVsD`B9cPxCFKT_%ka=|E$0c7RV&C#?_X<7()SWk3o@j>88>UIA9{Yv z=7<=M3ECUvJ3r|XUeuOOwpci9^gX;dKmDlPnSm+0Bu4oYP9nj{z3fYc*ID5-f?Ntn znkQ#(+q9KB{;CdQ9=t{d8(oqAZO`~aEERT@kS_!Kp@G9W)MsU1JEefja zd_h~ha4QmRvT_Sq$U1qp9O8#PqH$~&{vB%psv%_zu6^=)QnASTRv@-J+b?Ii zZbRHb`G=hr@C z>vPhYa8vB}6)iYmPqk5c-X4JMKx@0crX-qpAX6&B8(vv*F|Qo8D*q^s%nOZ)>gk6t zfc$waxyi~IjN^L~-53B^KZ{3Z=ayetF0q;&k;>+-A+LrQ5`jS{Rwwmhf>js31l;sv z68(n9@fI#w(XN(Y#%(`#*;Iq8cVqApeRFMR`1NX80;fO_&I=wI&GdsJiJ6*ypsWF?a7=> z6_>YvE8PBGaWPCsy#di{_X_J39B+zO*_CO-9jmtE(s@E)RZ}N;Ux)E_H34B^~xr{xMJSyQS~ zYTZw6wy7XVuuU%N22JIfekeH{v!r#d%Ro6jCkijecL^&(PydMpj>!ZfP~Z_;(0I*otlP!O@_eX4Xf=^62>On?vQx>E^Nx+25RruC z2Qy|hIcJ^QsS?a~rIP{u%4j>airQ6pu$iEWl+c{lHwZNMbiI%qPFMlAzNKb(7{{u#Wpv6U(r(j-+4i`&98Xw2x{A0q)V0!#8Ex0z zUYbEwCRkn^>40{XX5Ya-4XtQzbTVsovQy5^(yqt|q$LLct=r$GP)qE?e+nf3w1n;3 z0#7!h(#Ud7n@+S`{$fZYvyzRgcKVwEB>On>4BSaI9WAEn(JUoY3O*e{ud3&wtL-HE_~Nr7YskpUG8&?}l)qZu zuxD3B?&y%RE}{c`yS3nT9%B({iL2WrYIJp9kRCJNq2H33h1=0D=J8AH=->4)<@=g5 zw33Iq0$iX){W2LjimB_)hswp-=rc-CyQ4#kbKhXpVWo#7=cXkU;@>yrV!h9zmnXuD z*{3Q_KTlK-OD~jGlSXWVLMWGy(y7t&Fq$DO3#jSK$OViRHO~*aCgy$X)Y4rc@jurm zTAQ>sx@~i{(_{G`>DX>t@&a0OajAeg0wyq}Egm5)r7(kOWNLO^l-{y?gju1sl`Z_{ zSV&HjBq+5a3U{T&Qx{TWS~3)Y1_8BEX=>*bXs}akJ}1%mWGHQDql{&hQ8-r! zS)?Of4LMxfNs40G-6ROrbO{@>1;#xl9)u2om+Fs_~wnYe{GT&4;Hv*9<6%go83jq?1Frxf>NJCz>5283V*o$V5B7WRd8i$FgbF+ zFJLEFFW~;$eI{(kMwH+e%K%GCyp#8??#g3RAE+2|S6-;Y8rkxI&OkgsoO@lAkK)OZ zhbGuqjxKV8Qsv??l(oC-oU3V?vRXa`e*8P?&W(jWnZ}v=%qthqKQD2!nxZ%Tl9(Fm z$3$k4)#jXwg#dnQ4@NSuoaDM}Vs<@(g>DBN&r#|o4FUcdUE4qV)Xwj`Lm&6S_D0H9 zGF3O3(zV~a=ZTx4xA6c!N+l)EeNp_1MNrOm+r78#^-^cY(NUSSU@#?Jv@4Ys#qF1e zkOZ~kt*f{w2(S^-uA<5gl0YC<3>&Zpp5I=zVo-T5q5TR-tNm2a4N5nkgT4>TmzNDu zKRo8n<}foxDSv`S``+)@v}0~^z1qV})pSY_>b8rg91Bk*fJ$r?KA{>K5Vb4>u6AS? zR|qqLbK2iniU2@N@sD1;vTfPL((LRDHhJD()D5v$X|Ps{*6C)cFi*K&4msjRm*8m( zdv=k_yxEzekEBdK2XAd+=^1<7S-2GATd@w_aY4VQJO>5j=yHE44>}jH&M69oD1mh( zsTQ&PAZjyygjvTlrzS;+H@9EZm2=x3M-Du)V&h`_Y3BY!uOcQYxvo+b0z-%(l_7E3vH zCIV zt20jypoGj+v@O->;f(UF87L-~(6jyr8J>eD(ay9<)rUq!6};ixKP-x9JvCd=W`g}~4A_x|bU*X1At@+UX?5>j(-F;Xx%1KyRY8?<&AA_B-n?Q7CzRa| zXR*FNL>PDDNA$+)lbr$48ET1E?a9uUF`h<{uGKir{8N-AD+P_)#>|h$FMRl{C4~Bf z>W<%7J&{vQ5h}OXJL#)wxjp9(Br4XgL)wEZs}IB(yvhd;Uq8eBz}UF~R8M&hsWEtb00{M(82+5><` zsEfhl(c(Fh|ONB?uATLu(Btw-d)hP z7N`4+pxjY|^x}qn!iR?;X}Fe&x~PL9q@8@{-bT%Po=)D4`hlcO)ZB_PFbloxu?o>6|1bN<`jc`ut49RV_;%k3y9CHpsN|F0lGUynGaYje=UjKry z)44kY@;?nF(FAwqv!Aa5^jMNFo=x7S85%Ugl}=M-tH_1&407l&xak;GADmeko}Vqj zf>;z9=Fal@vaA4W<{B;3^FcsjlkKh(AQXA$bOEpH;^IiQ5oV7m5L#Ki&<%seG?dD| zkbjy|LKY7*2g z-)iFrVW%T@X;d9szxg{RI)^r;0P@KEr>EKc@IMsD*!-Cvp>L*n-^fjyl7ip%7DYV! z@skJWBM1CfA5uk;&pW%DV2SAMtHynCp7>ipo_JDS80S?Nk{s>ZRirFO$9u~9M9N8=NI};{4yMt4Ro|+z@12@^s$G0LAIiSnLpVKaw$oEnitb0*UmZ@zmsvZ zE#15sr)$oUwPj8C-jx>($RXqR?xqpTomP^0k8u6U40y|dK7J%>Nq+5zH(&?xujQh0 z#nFd_a-hzIxsytGOC#vThUa!uS%!76s z);E>i9&vqLKWWtoL;W)2il8^6Yp`T$BtP;&C)az>5NzsDKgS!qn=IQP|E<9(6_+T` z_TRaV^e1kKIyvrTLgylmC6TE6x=j27PjgZduj@dpS4Yc%J2HkUPzHi68vTqnY&dAz z-&Z)RtnPg(PoO!ccV!0WVB2&|>a7q<7k&G z{I@?HV0p*?%GS+pdbTR6D5w=Htygjsnh0TxfESbf(grzfwpwCot^s~*^V4r!`(i`N zoNc=v6h5;i_x~-47v}8L`i|#a(WaP$ppvmItCV?L2KUEF0vLj0?&>IV+gm90@(#F5 zW#^b)rR2*E?B#h>nuWo$hhkg2FNPl?v+}VheZJhsc4Ju-8l5<1d zYE3grpI-ezS40laQZt!V;_{?eLd~bQ9x{5|Gye1TXO6Sae)}vaO_M_oa9K@V^7kgD z?9b{hv`O&)J`1tw(Rk-#D)gQ2X%|ENSYxZ#@OxbGm;RN$LFJ!sr*qinAFfT;n0{I> zRCxd{=repTud;fV=!rBrsBMfH_$Gbq9-;>wp}L*?ntJcH4PE+r+x{&=@c?5unSqGf z_%O5J_3H?;3)8PL1Z$m~^%a*wD~JJgxo!aA`sPX2>K0T_cgwu3e?Bp)A$GYDOTlq> z&MLgTOtbe-gFF~9MLQ>MZ)ew+iJG)N@r8N@tQ*~V3nZ4j*m{S3PsT}SdFL&2j+(?b z89k4sBNo56TQiq18g9a8Y%}1@>d{fZjs$!C3;d(79tJw^5|e8Zi;qr(G&6Bz8~otb z^(?9WD+hpaCwnRXV<`vyp6pnX&Ju9JUyD!0w*2=XJ>`A&dZ!mxVb*b+PixTf|E)9! ztsM8?SoQH9aoOwt)0kB|E$8ODDMM8 zv8Jp2Cf0Y}{-0ZCe%+~{+d=$%8llB?_vgk3es1Fj!aT>V~F@ih0qVh!G5dXHZWt_cpHxh?c8JC zk(1&LuW?f8hVD>-Uyl+x*PgU8BR`LuQ}N?}5O6L94_&ezQfpZ)kD{?k9^}ciHCMa9 zf5JuZgxv`^nyL{>D7m^vP{|=Ufm2G{a^$MN8+kjBShginN(hpLMIg{zVQ`XYwJ&w?)zD zTDm(Pe62p6p=sGo~Ru`!RJ3dfPvdQnjl+$$w3ZPs+@19$$NZCkL1VS*}f`N3J~ zOLq+7vNC!&Y_|aWiY);ne*a|KjP(QeV?WY^4gR?}79lT-FtB@kFlhFlW}^eM(TAE5 z81D;Yzn^Ag_mlneo%cwT%~c{6b-~qxZcVkRRXwzw+)56?DgBzdsE8tNz6xy)A=sDK zMJ_5*zxkqg-FxchYyZK;-;kC&g&ZR~Fp_x3`TV)>=Oc@wy#~Vda#gAwG|g^YT}+gO z%Bp7OltK;7k-@2VIZNnk<@yQ7_1}-uCX9Hr#)PH*wzT4|*I-P9KWC#~k9VsK4{X}T zxV7Yi_frmcw;w3YH)jRRM=B&D<3m-Aij=^zXT)D~5*D;ikwQ|sK7&%r^Ug@+Kb5*E zi1g~X;1M?!^J>>yE=#W8!hdpOXU$;^DNjRtb)}mOND^RyD>-F9B(o4a9i9cY4%K=5 zsjSkag+3^5-ojO+`mif_OUjc2{Fpp(9)qdu=h1aXQ3pX?=bt?>olaJ~Ar9W6?~wYS z{oRx&@-ab$3lZJB{<&`AL5mCuGbZk&OB8wN#@KXVDN7vonxLN3MEq=s2fH{|f2 zGp!nPDC~2SFxnqWv~^~x@o~v=E={zVUfhJz0a?H_H;6G>54C$ZkhN~eyFF8!0K(6@ zO>CeiwAI{WJkV9at?lxWMqKdxaaliv@!QU`r3~T4&^XQmFT1ui+3$6c{46|Ud~wzU z{_IC>bqP@teUPo3@%9PZr^2_%34UdVJH*)q3;{KpHSl<%`@uid!ERd{;ap_}08ta0 zTU8pME_k(0J+gWftxZEJXi0WN30gO?b2u~9YOtNFxbhRr%W|9;x5AvU)6Rn*RsL$i zFJ~30GXsg|+W0<*{vY0h43)kG>!jSLQ@4yNIg}jdF-?901-~(Tz`0jEC^E0I04$6> z8BZNm9C3oJmiU_m6qobTv(nbU-3)#JN%>bV558mpKz*1sdz^WGqz>9$FbVL4+EIDn2;>ohzbW#DW$hVTnVac9{wqZUai53;Hp?}O`y5(2y@#B6AOfyJ zsS^Yeo!cp;n@#@TWi`QI`f}S#sOgj4lZxNLy6f2aD5P!Y@wSnh(N=nq* zi(PI0O-q98-9~c2!{vumtfNGWj@#zW${LK7 z$cYoz6%mewwLcB$Uz$JD*i`d+ct8!9=VV;!czwNAfbs`I{#gYVYce-7t@cuGKaq>u zK6It&AZy9_C4D}4bTU7T_Os@q0^kyjn=U#!NlMQylzaZb^E}WA!_=>+6?rj9o#*#} zguj0?Wkqe>H`GNxe`Ex|m5p7;uF&nAoyw)(iS0lp%;_>m)Tu-^c6t1fjApi67gL!_ zMR*LGi?LPtrKq`twjF#%>`lVJ$sAh{$e%0aywm=63r2%9vMIm^5~!_m7w4q7hba&2 zH_>jV{bmNBg5Q2P`LV3Lp7M=5Bd*q}rx}y4$zOf{?R z{19^gAcERdrhFocJP5j;@MO|^{3KRKMNP|6>6Z;RGqJIjs2+>$%@77Vd~h z^1+jL&Ok4uTE7!4aCaWXRgU6GL22h6c6>Bbh+gTJTW`zvm{zSOdS`z_=EJiy!9#~G zB*s{tASkOt*j-0ERxJy+#;4QN-M6(m^#)5NYStFHWd*i>%$HsELI?#frpjv$JXSsf z-OuOm-x5@afD@J)^?i4O>C+bCQo5c=z;L+@f~QjCf_mN+K)&QJceI7krzAEv9KQ_?z4>P7sj_O+D z-p}Se6QTWfprNQ`N}=?e~_{CAdf>x94u z%1%L~y>)q|x1JfSs!(S$-WE%W(s7g?_7X5VTzTx|zuij8ii zkWB#=kbv2QgNT^_D=~VThKHFq=8xS#m4BHs`9C2RJqlrccAnem{6su>KhMG~pLq!; zY`1DN0MTb0rC6zqj`kgu!e@s^O790ZMy}Y3zi}w+cG@Ori^D6A%Metd+Yg#TbR%x3 zoa0z*d%7fpJp}T{_kQkhB2P4Ia%9@Y$j(TbojnKjaMlVAVC$7sD64O9?mj8Iv z_m;8*cO&j#*Pfs#8T!@2?hMVy@3{rCzSgS%8-^sp*=x9fjWqa;^keDKMd2AQW?pd$ z%AKRQmi;AA`Tyrflo994d zX)_VbJdlpXYgy}e)ngB5xY2Bp&+aJJehg_u9fhBVH}Rs${~3rZb6V1!qPl|)Bi=sQ z4e-Bwj&^P%@-9rwRdWz`YY0uZ2C}Aj5ho7UEIuRhU<;Ekk@FWyLNpcoP6;GiJ={3~Bp_hLL;khC+C^c7Q&GI!H4 z6rVY0*4m6Iza8B1<;`$7)d8uKDR9*RcdVxOwwN~Pcdlb0kkz2VU-u`SA3#?)=C%7p zcWMJv9ft4^fM;>N{u9Rn|SBcVB`)?d%Hk^7Gf! zU!OeM@(iVx@iOp0^f+*eQ~d}qg(if3zc{!J0!9`NN8~8AK|EJq8`2lA)R+jsEDmSbQ;aa7u5s}n{b8dy5P!l13b`T<1g;65md_ivqorQbBQqQzKMWk>Ho1w-3IzHy~(W z>b}1MtJSKYDYbPe55(_s1T)8roc3_R1;qVJ%_uvr_1MqSwqY$j4auEJo0@QeHA|ep zBbSD_3yV4~&<7M}JbVROkR)`=1F{h^aV;bZx8y_>a40m2h*Fba z2Zeq^K*=fhtScu%XV50A#=#MnzrmSHq)LglgHrPFmZ+9TbJ@A2w z+)J*Nf0Kpq4Ut1Tt<;UMQ!fVDXh{C!yMErXrdq&qxVsZ&%fvfzDn*9ZtuI<1I!FtM z|A+Su`=Ilir%I{WP6P7!JnmxTU47z_7Bh_xy89tRIE5-$%)sSS8kntWzRzL9jHwFV zr&>nsB$7%mU>Bc^SD8_yKFN-u+5YS~>uwla11vs(+YPM%dg$E;5yrJnmHm*m z*m z-sanu!6Ek6kw2xuEJF1v`|~s;YD5lr*X85oum{(zd;Sa>e}X690D@GTuh6{E{EDk# zX~H|3JrqKz(_El5i}7ZmNP4BVBGK`gqq^1()cUt4hbj_6#GoE!Eq@`6c>7eQ2lOjJ2J_SJ9bk5GA8J!o?hA?3nM@pU z9v^Bw0vSrux+FI>Z)0x09g0e1gneBBpWvHV`l*S)a}jud;@L7~H~kfSfD~Ha3Zr8= zh-#pcD4uGP3<@8#mhtwRA1+3mx;%2sz5Ux3YRA7~UWFGU>$!)A1rQ@_;u6<(F+-pgq{%cbTy`>}lJCrwY-J2HvFGH)nu)4{Xp-}BZ@c~2PuvzYmf zX>!^5YQ0PxMez6glfR%ubzEri!i!s{9!GZ};U)?(SPH))bXI=~86*+x1XU9TQNcdyV zL?L5@rebVfi3N=?xOiMcL8^K-nIU0_r;RWZ^(Ua+F@(#g^ahs`d63Nm4%U?;-CY*& zBk7#!NSVTsphTb&^f^l!xl%;uNXK$8q4g(0z5QYC51qwA z7n3B$l}lkOVu$$MXTCC`gyoa_z@RoP!Y;imYT`<0YN0u}k6?38Tplj_6mJw;(Tl38 z=6OTm@6Hid1(*w!DDY8vrD3RXAd`4MiEJXKqWh+eLso|BDc-^@^3gPJIwX8|T08#b z!8v3+*!_l#0*vs7oV>q=PRJ+W}l5!!X*HKo6j zvksa+4Dvmvvao&rF1kN_jnIR=>r0287AtieEP&66&WeEx5JquBG&|clyXN3ZAqrr) zW$^q6?$bSkaQV6ZQ>8jU<=fs1Pn@Z=2(qEc!Q@)i`&7_~ADs?!8QbG(V0 zE)Pv#rdm+>dyzrTb^*vWA=5|RAyUB%M-kxBl~2+p=~S2H->`Is;#5yZoK!N&8lhLi zkWjA?`?-ifP*LS$BQpxFhfi@8ub$=I+hcw5tjRL2dk`|uz~CYcNRnMXCuxb~`t--Xo#84+_cQfDiJ zT7*Mg=n@(1tfk+p%zRHf2SW|Bkzq)zxLOjM39+WO=7L1+99`& z(gnr<<}A%pT-qW_MuIj_(jW~)iHZJ_pmdw6MZV&N2|xnB@34Z|nYolVF0uTpDb<*K$3IWf?ovfW@BU#i zY_8suQ*90(l^)Ic?rCbsuqg_C&ml>JG+~e2{wcR9@Qp zwovy$hcfFujbW2R1@r8KJLZbuvn6kv2m4Al-v5mL-p){Eidrwd9=N!Oxp|9Rmip8|WiWl<>XN3BZ`LmUTN4PKxrRxEMY*Iye{I}RX^f{+7(ub?> zf9oNq856ac9WMTSJABiW)j1iUjlaS9t!6kzMN9Qshp*Ql#3^aWKgknJD(gLN0PGBY zI(vQG_DsVteZdVuqN-?+aT1)0L2MS6o9iF_LDIx3J)?kE!d2D#InHXr4Q zi4_|g`zyGu+35Fy9F2+i7flgEyEkR#jMuZ5d2Nk}^>s^ncw%E@IxQA;l{XDi*Jyqt z;bZzD%VUyL1oz<*&5)sI%r;CsiRJ61Ei*T8voCzf7({;;WbEZdoC`TfCGmS`V!9tG? zcIw^p%nWFk`{J$4>k0%FAv8bOMrdjWXBiRBTYm-l*yV;VD64bhRaH; z95xT-cGw>gjN$W*KHVGc40zJ%+b%qF%rsy$vtJOb4KM$$Z)+s7`IBfWVZvluG}0YR zFum*xnk3s9Tpl~Nlj|F?x1v2bV$q?yvGToRh8F%&R;TNWQuU%P6TlZ5e>K^(Ly(4i6iO5BN~4$Hl^D+U_-)2WG2A z-1U#{Hi;}Wu_?LhahCwZh>-^+(%s%l(c1g6-_2efal!zSda#gKGZ~wkJ^WLs#19zg zcMI(opT{-iq22kHese&qUR9(mkeNT@YS_lACcGSHTn$R4VnV*W z^Vu`Y?B@s=IX-?O>D~oUR&iHZHn76;plOU{Fy3^rd@7wzXtYs#A+TLmUs?Jr))#pXG z5(G}_k`bOXM?4#|*`*E>1f+-1!YSl1sAMz)WvgTb{Bx40=wnNQ4NYdU~7lazO9OgH!vIh{)?%)4|4 z-hckd_58A1PuZwH)P;GD2kqA;o-E}BIhlCUcvC9Gppf&VkGkNk5#KtH&ipYyQ4$t2 zZ7!yQ)p{Kv(~A3g?eRQ$J;vd4Q9MaejLfzh;4%$Bysg@AKlZ1X&Kc-_{cN$IW!}ws z{24DmaHXl=Vh}H>w-JyM!{6y#hLJx(#gF;{5~swz^_GDl$Rtu zz5%Vp35?I8^`*sAP9&&2L7nHz_|vb_fSudpE1Ci z@!Yk$#&``%;g5?{mNc7G63)ed6m(#~u(UeKrZ#fn#}{7=Q1mm{1c234tITa(s+ksx-D>A^LG3c$;IjembIx=Q#wrw-)m5r^5^Wo{G{yQLmpP&DmH^OS zJ#wGP?~suqiguGE;H+H3d6_81`6Mc_Js&VUSN#Dm4}5A5=l;+_wL`ID=PxZO*=yC= zAlRMLF=gIlN(NM)pNTPB61XN&lPXfws!r_zd~T3#dEB0wVe7q6;cwK;(5BiL%UJw5 z{|bmn@UU$ua@P_s4c&^`W({J6;N##pok;*E6dsq8yc|e_Z3WocoPa&G2s)Bo`66#LuW8S?wznJ0WuOb)QM2=|-J-!lj@Rm2 zBRFA~jN+T;EIi|bX!1}{{za#&+H)vt{#eS+YZBUAUJREsWYuxK;_NT5B2^{0oX0fV zz-4Fui{!xp_A`|p$u3iUsipb!L?=~-cwy~bB>=4OQ)Ht66FSAE4l0#?oc9xS?0p$I zQ**W9Gna&scqmV^*K3!=$|s%1ZTm@2weM&P+d-_06j&nF@8`q9G1`>G=`LE`Ez*j?^~ z!oFLnl>H2am7Hk#Z?UeS(OH;)QSj;UXuX-YWFX1-(#Ne~<@3YBb~Y}pjq9qSx(>3x z-RX5F0Ii|FOnYAk&4l#^h5~ntykG2PG7INxa9XYla!tPJ~s5&eQCm zJ`TA{#I)LoDZ0){r=av(PxEUSN$lAN3?0R?tEc%7Gyi11n|n;jTu05W7HAgk4NVBx zvCsDNe0kLSaMKTE_I1Rue@{Fi#@6azeV?74*|XVj_`I=3h_b~_aYNSi>ut-BhO0RQ zI=iPFtgpd0ijh;!&XyN?Qn)|x+CXwNE(3Y$ij`R9oeg^_aTsv-w%_QPg77z)&#g2v zNoj6h&5M(rmU4i&(SQbupmAj4LuJgRE~LZtLB` z|MEru6=qca!-PmOt<4Mnmqhvx9#VY%AI|6b*~Z%ce<7nB^wxj-#p?8y`gyN_rT-_y0>c{r_*)f|7_a3^a;{pekemrf&1_zz{L!T8snu7EiK-*n*R1aGh@jm=t28q=_eGLaitD!=<$NBJ+fw!lAPaGn z6nM6-l=&Tl_!jPCbJz2QbWxYZcaqZkYV}i3X7r+I ztX8g+{xSdP&vZek#}hAByT3e_z(Rr;v`h__loJQGYJnGCf%HbR5wEEj>1z0|fBgRf zuOCq0h56Pal>6d{mz*tvx(5 z-LJ*&+5o84Vw3Q2>|i_~A_$JVk(t299>d6E_?q8=HJof8bF;XE+-g zexQ{zOkjV$i1?+<)S_1RFT)=A&@K?tDyliiJ4OUvusAXkxB!{mGyKP67{KFW=x(47 zVP~~r%@QFplMu}czeR;C z^2n~RP`-4Y^c}Cevh=!1PUpNgu+i!A*kI8*unc78R)D`!lPw)kBjSTk%&i*Lz_J40 zFOLWvKhGLnOD_R^>0Zjr*uX~@zNPW0w+8UN@3j|?Owa;qd#SS*2^S-@G4ukaE$OIa zkOG08{^|z+pP70E17Y*mkxTFEtBfzKu1#I@0uH(&0a6-?KE8%c=(if&4x~h_QUUzE z)&RaUyJM!svBQ&&L~G{K?~8~Lpsw=0XWx^Vv~?0aTGRSoFe0YD^}Q!O0mU%ySC0to za1TaiGUMt*cN0Tp$PI!CtB9csTaC|Qj?YZM zQ(X#m^xL(n?HAJecfF^(tIhf|g92mUNI;+o`frvKf(mtR+u9n0v?8(08c@pP9P0ad{jY_CxVhR>!se-ER~TEF0r~uqOe0(bj$i_TxZv z-7XE*#yPLxj+wfm&7KV`XqEP(p6zOdAP}d87~jq(nVF=zH}57n5}!dc z`0)PU@84S|GSl+wy~)td?*0x>vICZbz%~P-6EdWoN zyHbnJ*+jl4B3^#W4+$R+g;iPooe|=h&p#T zoB(-x&*(QEga^O#VbUJ|sQ0s`>02u%Z<-O|l0Wie`?E0O7cNk#N%e1MmYxq9E4L6c zx;<1v>9OzOX4=#C2Z8WhI*ixP0sfTGfN_xixkHYf{l_2Mm1ZV^w_F?cf_uj^=WpI! zEtcyVa|J3juVxDqhu<4+=j<>ppLcL^T23a|Lmmx~B- zN#pq-O!6fgtUH7SdwCpa#bRcN*V${i8WEp1pHJ@vkN?{LT$1mfnbpsI3E-U-`$WrB z=M{acjqNz!a=-f9+eHMICV<122`~5r<;yob*)T6wzT#t}2G4~{XqgYnT!FWHDGDb? zL>%nz;mm0dd!J(u$xJaYWm(<~@SO&u#e{{J+hB7{(G1`T$o{#?_|e-0cpLa-T5FFO z4`2@<`qeI}5&}p&r^f4+Nj5Wq2kGiM;|C&Q&%c$KtOd-7q-Z8AAjB7J&|2!h{XZ*& zV6Afjo^(xk**a*4b!hJ>z-K1Q3Q3>DZ*Z;fDeZwsx75(sthK>f@rr9c*UWrC*YdW~ zpsxEzmXi5R{V)J_nh$drK}~QL!BQ{^fXA@>|EsYubl$}(<0Zcr5y0?PM`k()&igoCco2Tq1dye9iDB3aWXnue5W<%M zB)>o`$vGdj0%{L$tqJ-vUck8=0N&mK#6Ck%r5BuJbZCjg!WYtMqR@H`e|K6T?zvpR)|9X97LIR=2rkK^Qv4|z9{qhd zxXdBtBd|F9GW^>JVBy}PKZpijTGe~?jpE;YF87ZJ2f!v^7UY`(^bQzJf>ys}2;!kh zEdjhu?74p%5%1T{lBF>&1=*E_;*^Pg)Zl+ABFuTy7y`#!f5!m6o9rGjXiwIVX@1c! z-UC0F#7N-=X;pNm4L9GsZ!;XyJ+t)+QJ6+)006!$3A;-(lXS~;2ZWfbnVf+=Vai%N z6hP8pz%*;P2J;hHZ?FcvUqsN*?K7GZp$21rFM%wXNpq)>8i3L>?dNfLF5owqP+h}c zzn6tEfN>q*dqu>w-!k*w0@=DXgvDX}UKTHI5RuD!K|?cumyKX}e=!1Di}Qp50an3x zB|xBE-Sc=6vD20ZfOme@VnkM!uRWx-R@%}Yz-Q(=_RI%@41r?4zi96jYzT}dm&Wanz|4r|Tz z10#Z|Y;klglQvquq&ouenaRR{Dc9k(KKD75@{yS~7;}DsJoDj$Bcg)2rti$m5#Y-g zer%UvO72+$cz)lxbPOz*0gKi^Y{{o(jmvay&7VFZ0H1jZ_;U{d4N%*U7-gAh37rqa zoFk$lklnX6$gY5uc^VyFg^ydhVP?K$x1N~FUR3kIr2aZ0%6wh4-D&&9>}QOCP(pa{ z-F&ONb2GDytpU8a7wd5>KyX}3mOAHLK&r6=_?~hHe9B$J+On5s*IN6wL3sDhrBqB= zEa$rDuE^E)Z|hOnwTJDUE1B>!v(}|vFakV9=EeIDOvYs?n}psT;5Y@hE&x0s;Vp+* z6V7%ij{WaU$mm+y>SQg=OtiNrrJTOl_~n_&V#n89hr#&Iqy_t+40p0a+0Qs?8%aS$XmA8lN2z<$^i-oH@XEIiem~d^DC4d*0C9-tOz)-=bGRQXzdRShhRq-0QUB+_b|at()twuUOY!h`ad5L zlly4^asfk=>9z;(R6yy+ur!SyG-@a-08dE4$T0>M7EEXwnTg4lsrzwfF%E=ZYwG)H z_7!t+YFoL^{wJ^)XgpQH@1=5v0u|^j$6MHFK znMvsocVLg#7y+K3T*?JuXtZd!9zUC+wnu>Pu2AbcTD=GggfvzF&!QFD59Y9!CYPDk zoat8$5P`O}PnezU!EwGf1@M!_pwErqL71#sBtVUYi4sWDf1TPd#{j<5VJ%JX)c&3S z{;%^|4=ekEKnv$a1)4A>5OK0Z9~%n*Prxc3M)#?{4GOp zA6LK=7)W^Sp&!vuG~ zB~$m7kG;w@-Eu%0WDdGYkrmnmCO~^Xh^Ws@dt$CdY?-RucUs=T=ySG44gukdruYw; zN#Foldm6~XBb)(w?R&wH{kb$5+KNMif!nhfF4Mikih0-%f(w863II>Qm1b7KQ;#E; zJTnPMQ*hD%*36=1j(*~K;LgkhSs=`;SwTwN73NKV!z`uH72vW~R37pkz|Z#Z7*u&` z-KLxG@Tg(WU;}`*+5Ik9xT5H@@0Np5S z2L3Uv+YI2x)Yf`70nd7u-~Ct=eF;~Jhg@f8svqvzz5U2?pt>w7Z{) zi1~(ce`)Zi=(Y6w62K$in3h7|sI(XwVQE>O2M9>L*8zCK1LnYoJ4Tt-e1W?nI80NM zU-(XqZb=Xm^r{)WL2cnoX#r7Hy~(6kQdRX*p}BH|z=a;9m2o}jqQ zBqZ77Yr#W%?>~|cZ~ywV z=mwgEjGhh)%n0qyn4sSuyPE+#09VzN_D%p4V@CP#{}h3jiHLbEn7u97Qxr?6g8_tb zcnB+4Ft{HDIo7%ml$~us!W2ckgh2GR0G=uMAWHIzn_gmn`7n1H$nY%M73mB(TObnJ zJ9oyg_R4Qv%Kz?FgGfo9XR`xclG-UVnfEBI`i(Q@2y82;?$qZ4cFgQL0KfDOG{fwe z?wQB{+FCB{sX1Qz_Z}hdIW|pMS5yofbF2N%w^jZhrn5zV)tRY?OY`4jHZJIgo;Cvr zFj&lqrXpB~Fi`+}lpYaLn$f{^naRCWZX^uz3Ce^$)4*6Pfaf^?FM9tG130rJ{HGoR zP=Ll)PK)wQ#uR8XpXf$_cjoN#@_kovnlU&2v6lq2H3Ie`M$GiWUl}97<7-uG zVib6|1nhS%swoa&2Jq%ZXtO7sUtkzLpZVcf2nYOoq zRS8D-jfg3Op{K8*6#?GamH|L$U94o+>lc*P4SXxki+k%VzdC@92yrEgqZc%@Ru#K7 zRhi37SX05g+$Jx2EN&z-r509d`MZ~p+lxqX$I#;Ow(`NV&~f#>D+^I($`JccQZa8c z$c_X-BNxqxD9pBe&<-;~GmDCJ2GX>8i!g=u_r)4Z)z-)E2;1|j`QFQnOt27$uw|&m zwwF&ii<&?6jGF*>hm+LKN?mr1_njX8!Wbv@y#?b8K#;c+6~!iNHL8M$KcoKQl3+rAkhs%|+L4D*d~ZR#Ouk zw3g|WgqbQ{(HWk-#|lFuwx7%Tv{ z3t5rgekmU^VBE|5?iWe@y5m81nMuH}_?SI2_PDWUe)@x|f_)EjU!rkYF-Cyje1;c- z?6{U#Nb9*<0A6fFWr3i#{kazm+$~ptrUZ|h26!5}_<*Viw-=x`RIOyPmO+E3Y$;VM z$lLcBl&DR-fd(ECRj*|Y+zA|nqY6HBp2U^>O;0&ym8i^xFNg>!e{0Vgi~g_xIH#5v&iK`RONsUHbT* z{yPFZJ|oSP%L6dcHd&GUzh{)I3$L0q|CQWtX~pLNJWCOa!}AHwN(C zhYc6TcpJQ3nc68`uxrW$LWQ@u9JZFK1?o#_cBl5^(R%NFPGfwPKkcjz{r553$M-l3 zdp!Y$J;NGWJq4@>tLa|4?5PP?aQYns_^!DF2|-0AoFI>A4Nn(s#;tU4aVnL zv^u^bj0({(b%ZSK#&e}6NY`^HT`#~$fQIz1al?)#dQqdmeJ>9_Gb_>_z{{!D&_o{m zGj3@%vlL`^Y@ue%;rSz?B<8)_GLuQG%y1ebY?Vw;?vu<^U8?fg4=S?t&C9}4Rkw7U zTVe=I{3UU&y_bJ?^mPNQgJ%hN94#>2TuKm}2gwlRaqW?rz_#Lr zC?bG+QMs52PK#%wuiXg5lo5M@KyQzEhrm~H87!Tev`ocfGE*?@Wa(O|J8?F^SF@SS zq~y>XxyJTlByJJlnVo5*u!)Aw1>wJ0a9C>&D#D!s@LY*y**dikSd}aAmBp?~T_4=n z2CszRYsUz1B=7t{C20d!V znD~wO?RyHP^(kN2L8rVPkmtRalC@f_c-9MC>{((KzMToHs<$l#RMjn?G**V{CT}Kk z!6*)df75gnF1ixHcTIw8q8J;-f;rHh>?r^!XL!%#yd{c0GYKL~sZGwyPe;U_i90jL zMkcSi6lgdH_`#`~-0MT(ir7Flev)N}puu{uAiw3%!0tV8{N+HB>)*E9q#3j94eX3w3Q=#}h# z)*c&Eb=N<>`*D3Ap#_lqNJQ+-;Tixx`lIJ1ktuHg4-X;Kc&F^8dbg^Q2NChJy!_Q} zawmy3T#%XeO}VxXQkwgDBh-okGpE`QEN*H{9HbWaxG_Pc74HM&VIV8X?!5KRgp>-F zLiG2ZIaZ4$D7O}+W8NtbFaDR?2KX@&SoAf?j9;{hLjWQ{AfzMO5dpy8EObd~h{2aR zX>uJqC~Q>V$R%)}kQ?7cLmX!KrU)_-HtKy&A_I05j417I!{0nG>~%9r|^Mesdk z&R=a8o0)>ss@oG2pN%muj^X*h-SbOx{Mm@8<{f+A*XiMV%;l^~c}Ii`(xSCu`l~&{ znn9}dtr(gB9&5yZTiyOt0bHyz-%~$U1KIiku{MB@R(Z^-^LN93piL3vM3Ii#zx_r6 zFMyX3Fz*~E7-nJ~3;xS7&B&g7@rd~Gp-un+L>vbV2>_R+L2--9-8Ij>mb0^Rw}jMP zH^UE&q46mH?}D4uLjqq}D}1-y=D+J^V*$g2 zUEo9rqu??Gq@d$}@H3={2DRC@@RW^!X+#7{eu)0K)jU^pZKKkd(Z~A>k*P7VZSVla`tJ z0m!7ebw96-XJa^g^&RRcS0Kk6j0KJn1jZr}rvyv$)dq6R!{6OAOQ}#D?;xe{)C*=C z7bpq{8EHxjk&g7Uy@cypB;d{wItsAj2<+`b+O4^ zu>kN=QZP^Rd*>>B*#TO>jdGB`GAmy@pW;-;ct&3)$m(R}zbg`U3)$w^Ol2$w<}qsB z1>W|5oq-Cn8!ZC!XL9i@rL2v6PAo+2Vc%D&VuW2lx=H)LLLT`VjTU|TnMrsuzg3}o zE73F4`R8UTA(8;eWK1Z1~`m;y>9es7kOz74mm2$;k$gZ>Z4zRM55M)^x?Be=$fy^l2?2zm4a|W6F6Ehp+C^(`l5)aHlPQKnwf+g z0*%dWBOYr_dva6s4anW0pan*au5UKbbSY}xb(sEZ&)cFNdtqjd9kg~hMZ%4Uc`Du- zVuA%+nyP!6cyLq4Vo|T0giWPuIbAf3D>bbBm&Kp0YT^_g~wrKEu zjZ4UyKlkM$f`T-z7rqDwD0Hh;E;Dm%pff(=pt|D;{!_ej?J{$CP(&&)P$KYNT&qozXgYS2?t&$Z3U*FNyQm(u{5GRksW9eSuZxnii`QMB2q(?ePA= z%%#AiB%+!$Q_fzE>Yk>-Gzxq~aR1y=VApK(kVqAskmE`E#2nY6?##kqdUm9rwHUQUn#2!AghCOU27q1D7<&$^pf7`&Q5MAbenRI|D}SjK zuLc+qak4LS&jYVOPK(9H(4y}x1#M1Nwc134eo<%U)BjaEVb?Uu2me{aS>)y_ zEybK^qTjj2jNPAE=0UGRqwk1_v)WqrItw?UWc305RJ*%>vGlQtZw-ePb0;6Z}f~Bcq0bjI%RhM<^KZ`d%v>euLcGH0000Hi literal 0 HcmV?d00001 diff --git a/public/images/course/guide/1-5.png b/public/images/course/guide/1-5.png new file mode 100644 index 0000000000000000000000000000000000000000..c4205496df9adf5890d32a28ce270e1064b16039 GIT binary patch literal 2660 zcmV-q3Y+zbP)2(NXLu)rsgRYE(3Jf?ygYc9ewFF(ZvXnvr0&CD9RU zjcAm_kTFA?F|AR8psgZ~zpJq-j)BsulSWITW0;8h79<16?VRiEcHLbQ*ebq#oc9m# z-o1D4`P}=yd+xdCJp_CX!!QPJ*s$SBPEJlMT`~+~9)LohVuiY{zsT2_56=(F-5-qr zzNoLS9~m7TeaBZHg!_b)GTh~IZ36Hso6Yu&-EJ>qL0~~(L9m=4&~5#lU-(kW^A3k& zgs)i8-%2oQYHEJqa5%~Vi~&Fjld0?a2Z1W^IVQjatV^J_wpJ5D=uuHoUy+qkN?{nr z!kU_zg1ET2CM6h#VHA*OA*HM#??ThGD(fO)%a{NYXe$Ay)A^M;mF zHGpqzHrpt>-Ts-B@+Sb+0!RX2Z)@XRjtMY00}~fD^8~~PYAJCN}2BodU^#v zKLL;u?5A)&Ccp$NL!ej)k?M3hpAtflm+{X)f?)vAEMqbo!UUK=umoHb0Hr`^czC!W zrECZ!7&6$_xgHZ>0@flRgispca=8-eC&e(7KXC#n1Ce+uwYnX7}*FW&@lv9Fgk`ae+m<@1Od*&u*5L35loTubsl^$0VeRU379euW6qp8*s)`Wvh~W9D@p*yjvb3TckW>J z?Ahx4`t|EEYSbu{l$3x3X21Y?3Lo&U8w{-7pA@5}<|`~&l&Pw}y5u#C8#@NirMCZp z-MIJ!mc<3@}hKVJPkW5x{ilgFE1-khXf;I-W+7*)IhWo02VGZTCF?#1B2 zgO#Arl7u{rg9i@=MT5KvI^ND(@2O8BlJfium^Njy$LsKI{M6}BF@NC_R8`P>hW>YW zdl=MCWbarU{c90MCyWZJe_Y9&1a95Bg|lbRV#0(8N+7OXyM|-Oj=|w@AUQeNoShD` zSEdw<^73-*+_@7iEiH(Sjz)HNHtcr0@+vM~yr@j2B}zs{20dnr+}vDTzkVHEx^%&; zS+g*C^5k~o$lJ69`wy0*_~Vb1ci??gR#xF> zlsbRu(k0xuaYG44e0)5*b?ery$wo_y4R61T!v{+7DPw^d1%w{PFBKvU3j)22;G zOiWbUsi~={>O3t^h7TXEf}V>OE%F3Cz3YD8NYRa+zx93O{c-IBJqzD9Xlb$Tt&OOw zt5drtFJ#=?O>rN;cy=l-R#u}RKTpLqXqUvd43*`e=l6|HXkB-UguB-i@QjO#3oRqs z&|6aqMn~_GJZQJWmtSm5U%$X6l?miwcnbz?$#M*%4YScAMcg|k6!au7!%BxK^Drh& znuKM`mZ@OT@#DwQvu96?963_uUQo^jc^c$(Y~H+CEk9_jIBwiHG&MD0-MV!+bm&mf zV?;}o+fFCm_}y>sYr`Gq@ZAaV6%4m9oIhTs0;TR<5f+S~ha@B`l4#Jb9_^gCbA&?D z5T8z)G7p2crS|RHr(zP6!I_eh0-Mc-lP6EAmjp{8S^vJ{dPmzDj06Q6z>=mKL-D*_?wE2uwYo>c4@l}wAH$M_ii;$t+X^TC2OTY2sC;B(q-SZvf?)+22yDaY z)2E?nn#YqM5BbcQGb(Y*!ZD0{ujn&_V03iQlb#=;oC!+fc0WVn&4E0RXJ@8i>8r2Y zm(ES~ic9w4=?RI@b8x3N5GVM7@cnz z*kUFS8U%P-H8jSFd&vY$L4XCr6vM!sU;?2*fb%dyW1P5`Ou!TbI1j@V!@!+j0--@5 zkYIcZAY9WlO$bphr8EF&p1ekz13Dg5P0N`~Y#OJ<;P7;P1QYm^l)`l2l;cD026q;1Zrz*wXm?T!9s{x0A3M7tkE=Wm7ic#RaJ%c z?b~-VfR_Q-+y(C5y&D-B8L9rKy@MvPv&0fXssZH8z)4p6&+cy z+~X1z=N2{ICLY#G@p{R(Xd`OoAiBrZR>2pw2K3Ms4_GkX>MtSA!`?R7#&;SSfEW{BCkV{OM4~LPvf3^VkOzOX@ZAxHm23)8URcx0!`( zeCf_buTOf#(VHGEeIi!dgGP~dH#K;8s8YS44T&NW7$WS7MJ~dW#2_(zpR))Bia_)$ z2s{VSp;_~AK66FNae8@ev)SqF2(_ZduSZ3mMf*Mm6~sbK!$E=kg!7P;BNF}s5&%+Q zCmq^yir{@{jtNnWrFgnXydE_l8xI%jB@*}v=KMXGgdO=cOMa3%YrpqH;phdBA>PO5 zoY3lM@d}$w^gk*Nf{`1elw)#< zHtH7w1k^|$7VWU})K9?_{VB{^T>qk#l#MuQB((e=g0 zAKzAoF*a%D5rz4N5y$RKUnZl2%Tx=D%18SYLbF#Yc)Fuq#!yzk$ov^>ipFz|QdRED zZ$letL$(*T>boLu3Og3CMEJ7q&-@rYDA-lIp$C;kASw_d*1Q*m1$iNOJpP1?*yDwz zFQb)OnwfPtIP&FnVRuZ^dkohJP4b6r27eIw_1_WH1H`(pX9#>-LTHz@8){jaN*1k>Er>W>H5ua~}C@?e%R8NbW4 z*M6tmBPcxnj@C7JafplpFO(HgFt#s0pzI6{q$onDt} z1D*oYoip#`YFfrAct7u;skU25GmHmlwwzJK!@0>*;VTvbZx)00tfe~*4`U8sj$MCb zSZILfDL+?O^YG)lGP{T!PB3=@FSsjH7bl-F)`T0*&{6#uI$O8iJVbM>^?RTOp_){Qj{ki&Y(ZP})dM;S!fNgagmpqeBH`bb(gFV2&ihp)*wawTpnXYi2T=f54xk3E6R>6JWxvCmoM;X(z* z&B?`-jv6(D|7xNCf8~G6u`Qj2wyaKrtcP+d$JQhgPrjh5(4%#=j9)ib+p{rvfJ zVo8JAWNrKCfizJ zg5a)YZ{JAbScSdl0W9=bC38H>Wk7oxZWu>v79KQe=H&6xn`^I8C7RX>oajB8weDk# zvkYrR#j@md6f)wkx$_NG7!$^FeV}ux-U=Qf*ks??7$cf+Tkz8>ub3FQF9=n%H75Pu z?k%uCsAB8&5RH`IWFT2}LhjLSeCB1jWA`8R24{4eK^zf|IfC$$-m&SD2>fc0aGPlRKg0q`?8XNQ}N`X~XDP<5c3(z0D z4eLHX3i}le|HjMz0lqWD`8h~S)SqjQr=+XTcqFnTPe%)@Gr4{jpnZ@>daZ-55Q^22 zkGVqr`9!Jb8p|N}oqIRhr9dwui(G4IsT>+cXigHw zJBx7RS%Fj3I4uFwN5Bk(JBVNb+yZCUs{4}EbT37%mLy*0IdZ85C8xG literal 0 HcmV?d00001 diff --git a/public/images/course/guide/1-7.png b/public/images/course/guide/1-7.png new file mode 100644 index 0000000000000000000000000000000000000000..65cadf0c7605d424f366860f3338cabd11aca483 GIT binary patch literal 1267 zcmVZhxkf@?F>6Zo!Ew=6Li5q#asor%)(dplY?+ zPNme=VzIbqe0=h?u*c(mthrsVCVX!LOEC4zNIAh4kiXrpWkhJ~C zrT}pW{|X#3jXMW4aG!X>`Y}kOJ_~?006T`9j5rRjACk5o*`vTYz)QfJ5rDn}4o4U~ z0sPsIY25lO06GhJyvM-BbH2`e_koVtA1U&^yY0lCdz5}PfO_>M-u~Z`9z>L1762V- zPS*i9o65U^Q9Ei^14y1_dN#j zQ`*~HUNz`7Ks4$DKpeMezD0EnfngSbXx6@A2nVIfD?oDi9%m-;GawGbZz7WtW8wTk zCmLyY0C>ZEdw575LiRTBc?|l#q_CxEV%}p6ah%U znKg!lTmb|`*(y^lM*~12fU;THat}(n+zVW6?p^N!FB^Fq zRlWth2c)6JN1UGpX!%?dM`^UQjWHl`f}a4L0K!oh3lLlc+;7eu@vTYlj2I+hEc`KQ zK%)KS37{-xAqIiCZAQ9%4KiU1&>&LEu#E*ML*Wn7wFPJpDP`DZ1)xyiqBtQlu~;&c zLteZ7SKy-fr#6m_jm^5QYeRo?09iEjw-Y?Cl-g4+mu>KT4gm5zZ?o2VIe6ZtpX30M z&=6X!*3{C{k_6YR>!hDZU9DEzrIfl|o|;Rgl1<>s2s7XJr<%>?gTOxtTrw7$0+|sa z%iXS|Kn6ju2^iB_@2gg;SFfZ%hCs4O#F=76?{ window.location.href = "/courses/" + this.props.match.params.coursesId + "/settings"; } - render() { - let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon} = this.state; + let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,is_guide} = this.state; return (

    - + { + is_guide && + } + { coursedata === undefined || coursedata.status===401?
    :
    diff --git a/public/react/src/modules/courses/coursesDetail/CoursesGuide.js b/public/react/src/modules/courses/coursesDetail/CoursesGuide.js new file mode 100644 index 000000000..b47998d9d --- /dev/null +++ b/public/react/src/modules/courses/coursesDetail/CoursesGuide.js @@ -0,0 +1,44 @@ +import React, {Component} from 'react'; +import '../css/Courses.css'; +import {setImagesUrl} from 'educoder'; + + +class CoursesGuide extends Component { + constructor(props) { + super(props) + this.state={ + step:1 + } + } + render(){ + let {step} = this.state; + return( + + ) + } +} +export default CoursesGuide; \ No newline at end of file diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index a5c42cd69..8a84fc402 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -1520,3 +1520,23 @@ input.ant-input-number-input:focus { border-bottom: 1px solid transparent !important; } + +/* 指引 */ +.guidePanel{ + position: fixed; + top:0px; + left: 0px; + width: 100%; + height: 100%; + background: rgba(0,0,0,0.7); + z-index: 10000; +} +.guideFirstRight{ + position: absolute; + right: -90px; +} +.guideFirstLeft{ + position: absolute; + left: -95px; + top:120px; +} \ No newline at end of file diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 4d6c6777b..06523bb38 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -224,11 +224,11 @@ class GraduateTaskItem extends Component{ {/* {discussMessage.author.name} */} - {discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交} - {discussMessage.uncommit_count===undefined?"":{discussMessage.uncommit_count} 未交} + {discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交} + {discussMessage.uncommit_count===undefined?"":{discussMessage.uncommit_count} 未交} {/*{discussMessage.replies_count} 3 未评*/} - {discussMessage.status_time} + {discussMessage.status_time} {/* { discussMessage.replies_count != 0 && {discussMessage.replies_count} 回复 } diff --git a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js index 4af26d698..e86923cbc 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js +++ b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js @@ -7,6 +7,7 @@ import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; // import "antd/dist/antd.css"; import { getImageUrl, toPath, getUrl } from 'educoder'; +import '../../courses/css/Courses.css' import axios from 'axios'; From 5684b99c8a043e81841cbbe7e2e4c03e8901b86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 25 Jun 2019 17:21:38 +0800 Subject: [PATCH 171/964] =?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 --- .../courses/coursesPublic/Associationmodel.js | 16 +++++++--------- .../courses/graduation/tasks/GraduateTaskItem.js | 12 ++++++------ .../graduation/tasks/GraduationTasksappraise.js | 8 ++++---- .../tasks/GraduationTaskssettinglist.js | 12 ++++++------ 4 files changed, 23 insertions(+), 25 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/Associationmodel.js b/public/react/src/modules/courses/coursesPublic/Associationmodel.js index 9af795931..d263a933b 100644 --- a/public/react/src/modules/courses/coursesPublic/Associationmodel.js +++ b/public/react/src/modules/courses/coursesPublic/Associationmodel.js @@ -59,15 +59,18 @@ class Associationmodel extends Component{ goback=()=>{ + debugger this.setState({ Modalstype:false, }) - this.props.funlist() this.props.Cancel() + this.props.funlist() + } setSaves=()=>{ + debugger let {projectvalue}=this.state; let taskid=this.props.taskid; let url="/graduation_tasks/"+taskid+"/graduation_works/relate_project.json"; @@ -76,19 +79,14 @@ class Associationmodel extends Component{ project_id: projectvalue }).then((result)=>{ - if(result.status===200){ - if(result.data.status===0){ - + this.goback() // this.setState({ // Modalstype:true, // Modalstopval:result.data.message, // ModalSave:this.goback, // loadtype:true // }) - this.goback - } - } }).catch((error)=>{ console.log(error) @@ -115,7 +113,7 @@ class Associationmodel extends Component{ project_id: projectvalue } }).then((result)=>{ - if(result.status===200){ + if(result.data.is_relate===false){ this.setSaves() }else{ @@ -126,7 +124,7 @@ class Associationmodel extends Component{ loadtype:true }) } - } + }).catch((error)=>{ console.log(error) }) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 4d6c6777b..b2a28110d 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -59,12 +59,12 @@ class GraduateTaskItem extends Component{ axios.get(url).then((result)=>{ if(result.data.status===0){ - this.setState({ - Modalstype:true, - Modalstopval:result.data.message, - cardsModalsavetype:this.cannerassocition, - loadtype:true - }) + // this.setState({ + // Modalstype:true, + // Modalstopval:result.data.message, + // cardsModalsavetype:this.cannerassocition, + // loadtype:true + // }) this.props.funlist() } diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index 28955e268..98983ba9b 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -249,8 +249,8 @@ class GraduationTasksappraise extends Component{
    {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.length===0?"": -
    -
    +
    +
    补交附件
    @@ -291,7 +291,7 @@ class GraduationTasksappraise extends Component{
    } {datalist&&datalist.project_info===undefined?"": -
    +
    关联项目
    @@ -301,7 +301,7 @@ class GraduationTasksappraise extends Component{
    } {/*{*/} { datalist === undefined?"": datalist && datalist.task_type===undefined ?"" : datalist.task_type===1? "": datalist && datalist.work_members && datalist.work_members.length == 0 ?"": -
    +
    其他组员
    diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index ebb221902..229a8399a 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -544,12 +544,12 @@ class GraduationTaskssettinglist extends Component{ if(result.data.status===0){ this.searchValue() - this.setState({ - Modalstype:true, - Modalstopval:result.data.message, - ModalSave:this.cannerassocition, - loadtype:true - }) + // this.setState({ + // Modalstype:true, + // Modalstopval:result.data.message, + // ModalSave:this.cannerassocition, + // loadtype:true + // }) } }).catch((error)=>{ From b9f6336e9a29016f524d71076e12e92c7f42220c Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 25 Jun 2019 17:22:40 +0800 Subject: [PATCH 172/964] spin --- public/react/src/modules/courses/members/studentsList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index cd97c6cfa..d997592ef 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -550,7 +550,7 @@ class studentsList extends Component{ { - total_count > 0 ? + total_count > 0 || this.state.isSpin == true ?
    {isAdmin && 已选 {checkBoxValues.length} 个} From 026dc5e4d5c804d1248614141676494f07e7772d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 25 Jun 2019 17:35:37 +0800 Subject: [PATCH 173/964] =?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 --- .../courses/coursesPublic/CoursesListType.js | 179 +++++++++--------- .../tasks/GraduationTasksappraise.js | 6 +- public/stylesheets/educoder/edu-main.css | 2 +- 3 files changed, 94 insertions(+), 93 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/CoursesListType.js b/public/react/src/modules/courses/coursesPublic/CoursesListType.js index c8f38fca5..67d39a649 100644 --- a/public/react/src/modules/courses/coursesPublic/CoursesListType.js +++ b/public/react/src/modules/courses/coursesPublic/CoursesListType.js @@ -1,90 +1,91 @@ -import React, { Component } from 'react'; -import {Tooltip} from 'antd'; -class CoursesListType extends Component { - constructor(props) { - super(props); - this.state={ - // typelist:[], - // typesylename:"", - // tipval:"" - } - - } - - componentDidMount() { - // let{typelist,typesylename,tipval}=this.props; - // - // this.setState({ - // typelist:typelist, - // typesylename:typesylename, - // tipval:tipval - // }) - // console.log("CoursesListType") - // console.log(typelist) - } - - render() { - let {typelist,typesylename,tipval}=this.props; - - return( - - { - typelist===undefined?"":typelist.map((item,key)=>{ - return( - document.querySelector('.TabsWarp')}> - - {item==="公开"?公开:""} - {item==="已开启补交"?已开启补交:""} - {item==="未开启补交"?未开启补交:""} - {item==="匿名作品"?匿名作品:""} - {item==="已选择"?已选择:""} - {item==="已结束"?已结束:""} - {item==="提交中"?提交中:""} - {item==="匿评中"?匿评中:""} - {item==="申诉中"?申诉中:""} - {item==="补交中"?补交中:""} - {item==="评阅中"?评阅中:""} - {item==="待选中"?待选中:""} - {item==="交叉评阅中"?交叉评阅中:""} - {item==="已开启交叉评阅"?已开启交叉评阅:""} - {item==="待确认"?待确认:""} - {item==="待处理"?待处理:""} - {item==="未发布"?未发布:""} - {item==="私有"?私有:""} - {item==="未提交"?未提交:""} - {item==="已确认"?已确认:""} - {item==="已截止"?已截止:""} - - - ) - }) - } - - ) - } -} -export default CoursesListType; - - -// let typelist=["公开", -// "已开启补交", -// "未开启补交", -// "匿名作品", -// "已选择", -// "已结束", -// "提交中", -// "匿评中", -// "申诉中", -// "补交中", -// "评阅中", -// "待选中", -// "交叉评阅中", -// "已开启交叉评阅", -// "待确认", -// "待处理", -// "未发布", -// "私有", -// "未提交", -// "已确认", -// "已截止", +import React, { Component } from 'react'; +import {Tooltip} from 'antd' +import '../css/Courses.css'; +class CoursesListType extends Component { + constructor(props) { + super(props); + this.state={ + // typelist:[], + // typesylename:"", + // tipval:"" + } + + } + + componentDidMount() { + // let{typelist,typesylename,tipval}=this.props; + // + // this.setState({ + // typelist:typelist, + // typesylename:typesylename, + // tipval:tipval + // }) + // console.log("CoursesListType") + // console.log(typelist) + } + + render() { + let {typelist,typesylename,tipval}=this.props; + + return( + + { + typelist===undefined?"":typelist.map((item,key)=>{ + return( + document.querySelector('.TabsWarp')}> + + {item==="公开"?公开:""} + {item==="已开启补交"?已开启补交:""} + {item==="未开启补交"?未开启补交:""} + {item==="匿名作品"?匿名作品:""} + {item==="已选择"?已选择:""} + {item==="已结束"?已结束:""} + {item==="提交中"?提交中:""} + {item==="匿评中"?匿评中:""} + {item==="申诉中"?申诉中:""} + {item==="补交中"?补交中:""} + {item==="评阅中"?评阅中:""} + {item==="待选中"?待选中:""} + {item==="交叉评阅中"?交叉评阅中:""} + {item==="已开启交叉评阅"?已开启交叉评阅:""} + {item==="待确认"?待确认:""} + {item==="待处理"?待处理:""} + {item==="未发布"?未发布:""} + {item==="私有"?私有:""} + {item==="未提交"?未提交:""} + {item==="已确认"?已确认:""} + {item==="已截止"?已截止:""} + + + ) + }) + } + + ) + } +} +export default CoursesListType; + + +// let typelist=["公开", +// "已开启补交", +// "未开启补交", +// "匿名作品", +// "已选择", +// "已结束", +// "提交中", +// "匿评中", +// "申诉中", +// "补交中", +// "评阅中", +// "待选中", +// "交叉评阅中", +// "已开启交叉评阅", +// "待确认", +// "待处理", +// "未发布", +// "私有", +// "未提交", +// "已确认", +// "已截止", // ] \ No newline at end of file diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index 98983ba9b..ce7822d97 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -135,7 +135,7 @@ class GraduationTasksappraise extends Component{ let category_id=this.props.match.params.category_id; let graduation_id=datalist===undefined?"":datalist.graduation_id; let task_id=datalist===undefined?"":datalist.task_id; - console.log(datalist); + // console.log(datalist); return( @@ -197,7 +197,7 @@ class GraduationTasksappraise extends Component{
    -
    +
    内容 @@ -249,7 +249,7 @@ class GraduationTasksappraise extends Component{
    {firelistdata===undefined?"":firelistdata.length===0?"":firelistdata.revise_attachments.length===0?"": -
    +
    补交附件
    diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css index 074c4ed89..c5883692c 100644 --- a/public/stylesheets/educoder/edu-main.css +++ b/public/stylesheets/educoder/edu-main.css @@ -727,7 +727,7 @@ html>body #ajax-indicator { position: fixed; } .btn-cir-grey{background: #e1e1e1;color: #8c8c8c;font-weight: normal;border: 1px solid #e1e1e1} /*动态标签*/ -.edu-filter-btn{cursor: default;display: inline-block; padding:0px 9px; color:#666; background:#fff; text-align: center; border-radius:10px; font-size:12px; height:18px; line-height:18px;} +.edu-filter-btn{cursor: default;display: inline-block; padding:0px 9px; color:#666; text-align: center; border-radius:10px; font-size:12px; height:18px; line-height:18px;} .edu-filter-btn-blue{border:1px solid #3498db; color:#3498db;} .edu-filter-btn-orange{border:1px solid #ff6800; color:#ff6800!important;}/*提交中、评阅中*/ .edu-filter-btn-red{border:1px solid #DD1717; color:#DD1717;}/*已截止、未开启补交*/ From 712ba99281bef5e950c00eaab894b312dfd230cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 25 Jun 2019 17:40:07 +0800 Subject: [PATCH 174/964] =?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 --- .../react/src/modules/courses/css/Courses.css | 18 +++++++++--------- public/stylesheets/educoder/edu-main.css | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index f79800f28..8720dd860 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -849,31 +849,31 @@ a.white-btn.use_scope-btn:hover{ .edu-filter-btn-028d01{ /*border: 1px solid #ff6800;*/ /*color: #ff6800!important;*/ - background: #028d01; + background: #028d01 !important; } .edu-filter-btn-CC317C{ - background:#CC317C; + background:#CC317C !important; } .edu-filter-btn-006B75{ - background:#006B75; + background:#006B75 !important; } .edu-filter-btn-E99695{ - background:#E99695; + background:#E99695 !important; } .edu-filter-btn-EDEDED{ - background:#EDEDED; + background:#EDEDED !important; } .edu-filter-btn-4CACFF{ - background:#4CACFF; + background:#4CACFF !important; } .edu-filter-btn-84B6EB{ - background:#84B6EB; + background:#84B6EB !important; } .edu-filter-btn-5E5FB9{ - background:#5E5FB9; + background:#5E5FB9 !important; } .edu-filter-btn-FC2B6A{ - background:#FC2B6A; + background:#FC2B6A !important; } .color666666{ color:#666666 !important; diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css index c5883692c..074c4ed89 100644 --- a/public/stylesheets/educoder/edu-main.css +++ b/public/stylesheets/educoder/edu-main.css @@ -727,7 +727,7 @@ html>body #ajax-indicator { position: fixed; } .btn-cir-grey{background: #e1e1e1;color: #8c8c8c;font-weight: normal;border: 1px solid #e1e1e1} /*动态标签*/ -.edu-filter-btn{cursor: default;display: inline-block; padding:0px 9px; color:#666; text-align: center; border-radius:10px; font-size:12px; height:18px; line-height:18px;} +.edu-filter-btn{cursor: default;display: inline-block; padding:0px 9px; color:#666; background:#fff; text-align: center; border-radius:10px; font-size:12px; height:18px; line-height:18px;} .edu-filter-btn-blue{border:1px solid #3498db; color:#3498db;} .edu-filter-btn-orange{border:1px solid #ff6800; color:#ff6800!important;}/*提交中、评阅中*/ .edu-filter-btn-red{border:1px solid #DD1717; color:#DD1717;}/*已截止、未开启补交*/ From 7be953025f9c4a1a8e682659aef801a0bc8baa4b 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, 25 Jun 2019 18:18:51 +0800 Subject: [PATCH 175/964] =?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/shixunHomework/CommitSummary.js | 62 +- .../courses/shixunHomework/Listofworks.js | 825 +++++++++++++++--- .../shixunHomework/Listofworksstudentone.js | 139 ++- .../TraineetraininginformationModal.js | 5 +- .../shixunHomework/Trainingjobsetting.js | 34 +- 5 files changed, 826 insertions(+), 239 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/CommitSummary.js b/public/react/src/modules/courses/shixunHomework/CommitSummary.js index d8d84608c..3e12e2bb6 100644 --- a/public/react/src/modules/courses/shixunHomework/CommitSummary.js +++ b/public/react/src/modules/courses/shixunHomework/CommitSummary.js @@ -26,17 +26,11 @@ class CommitSummary extends Component{ data:undefined, cancels:false, } - // console.log("CommitSummary"); - // console.log(this.props); + } componentDidMount() { this.Getsubmissionsummaryinterface(); - // this.props.form.setFieldsValue({ - // description:"result.data.selected_data.tea_id", - // - // }); - this.getTrainingjobsetting(); let query = this.props.location.pathname; const type = query.split('/'); this.setState({ @@ -44,36 +38,6 @@ class CommitSummary extends Component{ }) } - // saveFormData = () => { - // form.validateFields((err, values) => { - // if (err) { - // return; - // } - // var worksid=this.state.data.homeworkid; - // // console.log(values); - // // console.log(homeworkid); - // console.log(worksid); - // // 在这里执行保存到服务器的操作使用axios - // // message.success('保存成功!') - // var url = `/student_works/${worksid}/update_des.json`; - // axios.post(url,{ - // description:values, - // }).then((result) => { - // if (result.status === 200) { - // // console.log(url) - // // console.log("提交总结接口") - // // console.log(JSON.stringify(result)) - // // message.success(result.data.message); - // } - // if(result.status === 403){ - // - // } - // }).catch((error) => { - // console.log(error) - // }) - // }); - // } - //获取提交总结接口 Getsubmissionsummaryinterface=()=>{ @@ -183,20 +147,6 @@ class CommitSummary extends Component{ * 内容
    - {/**/} - {/* {getFieldDecorator('description', {*/} - {/* rules: [{*/} - {/* required: true, message: '请输入帖子内容',*/} - {/* }, {*/} - {/* max: 5000, message: '最大限制为5000个字符',*/} - {/* }],*/} - {/* })(*/} - {/* */} - {/* )}*/} - {/**/} - {/**/}
    - {/**/} - {/*
    */} - {/* */} - {/* /!*提交*!/*/} - {/* 取消*/} - {/*
    */} - {/*
    */} -
    {/**/}
    diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 2200c8e77..6d19b13ef 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -92,6 +92,7 @@ class Listofworks extends Component { unlimitedtwo: 1, code_review: false, boolgalist:true, + challenges_count:0, columns: [ { title: '序号', @@ -179,7 +180,13 @@ class Listofworks extends Component { align: 'center', render: (text, record) => ( - {record.completion} + + +
    已通过{record.completion}关,共{this.state.challenges_count}关
    +
    }> + {record.completion+"/"+this.state.challenges_count} + + ) }, @@ -210,16 +217,43 @@ class Listofworks extends Component { align: 'center', render: (text, record) => ( - = 90 ? { - "color": '#DD1717', - "text-align": "center" - } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore} + { + record.efficiencyscore&& record.efficiencyscore=== "--"?( + record.submitstate==="按时提交"? + +
    作业截止时,系统根据学生在课堂成员中的效率表现自动评分
    +
    }> + + -- + + + : + record.submitstate==="延时提交"? + +
    补交结束时,系统根据学生在课堂成员中的效率表现自动评分
    +
    }> + + -- + + + : + + -- + + ) + : + = 90 ? { + "color": '#DD1717', + "text-align": "center" + } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore} + } + ) }, @@ -230,17 +264,63 @@ class Listofworks extends Component { align: 'center', render: (text, record) => ( - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.finalscore} - + { + record.ultimate_score=== true? + +
    {record.user_name}{record.user_login}
    +
    {record.finalscore === "--"?最终调整成绩:0分 :最终调整成绩:{record.finalscore}分}
    +
    }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } + + : + +
    {record.user_name}{record.user_login}
    +
    {record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
    +
    {record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
    +
    {record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
    +
    {record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
    +
    }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } + + + } + ) }, { @@ -251,10 +331,15 @@ class Listofworks extends Component { align: 'center', width:'93px', render: (text, record) => ( - record.submitstate === "未提交" ? "--" : + record.submitstate === "未提交" ? -- : + +
    直接调整最终成绩的分数
    +
    其它评分全部作废
    +
    }> this.Viewstudenttraininginformations(record)}>调分 + this.Viewstudenttraininginformation(record)}>{record.operating} @@ -320,7 +405,8 @@ class Listofworks extends Component { publish_immediately: result.data.publish_immediately, work_efficiency: result.data.work_efficiency, end_immediately: result.data.end_immediately, - code_review: result.data.code_review + code_review: result.data.code_review, + challenges_count:result.data.challenges_count, }) this.seacthdata(); } @@ -371,6 +457,7 @@ class Listofworks extends Component { task_status: result.data.task_status, course_group_info: result.data.course_group_info, loadingstate: false, + challenges_count:result.data.challenges_count, }) this.seacthdata(); @@ -420,11 +507,15 @@ class Listofworks extends Component { // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, - completion: this.state.teacherdata.student_works[i].complete_count === 4 ? "4/4" : this.state.teacherdata.student_works[i].complete_count === 3 ? "3/4" : this.state.teacherdata.student_works[i].complete_count === 2 ? "2/4" : this.state.teacherdata.student_works[i].complete_count === 1 ? "1/4" : this.state.teacherdata.student_works[i].complete_count === 0 ? "0/0" :this.state.teacherdata.student_works[i].complete_count == null ? "0/0" :this.state.teacherdata.student_works[i].complete_count == undefined ? "0/0": 0, + completion: this.state.teacherdata.student_works[i].complete_count === null ? "0" :this.state.teacherdata.student_works[i].complete_count === undefined ? "0": this.state.teacherdata.student_works[i].complete_count, levelscore: this.state.teacherdata.student_works[i].final_score, efficiencyscore: this.state.teacherdata.student_works[i].eff_score, finalscore: this.state.teacherdata.student_works[i].work_score, operating: "查看", + late_penalty: this.state.teacherdata.student_works[i].late_penalty=== null?"0":this.state.teacherdata.student_works[i].late_penalty === undefined?"0":this.state.teacherdata.student_works[i].late_penalty, + ultimate_score:this.state.teacherdata.student_works[i].ultimate_score, + user_name: this.state.teacherdata.student_works[i].user_name, + user_login: this.state.teacherdata.student_works[i].user_login, }) } @@ -435,64 +526,54 @@ class Listofworks extends Component { current: this.state.page, } if (this.state.work_efficiency === false) { - columns = [ - { - title: '序号', - dataIndex: 'number', - key: 'number', - align: 'center', - width:'96px', - render: (text, record) => ( - + if(JSON.stringify(this.state.course_group_info) === "[]" ? "" : this.state.course_group_info === undefined ? "" :this.state.course_group_info === null){ + columns = [ + { + title: '序号', + dataIndex: 'number', + key: 'number', + align: 'center', + width:'96px', + render: (text, record) => ( + {record.number} - ) - }, - { - title: '姓名', - dataIndex: 'name', - key: 'name', - align: 'center', - width:'147px', - render: (text, record) => ( - + ) + }, + { + title: '姓名', + dataIndex: 'name', + key: 'name', + align: 'center', + width:'147px', + render: (text, record) => ( + {record.name} - ) - }, - { - title: '学号', - dataIndex: 'stduynumber', - key: 'stduynumber', - align: 'center', - width:'200px', - render: (text, record) => ( - + ) + }, + { + title: '学号', + dataIndex: 'stduynumber', + key: 'stduynumber', + align: 'center', + width:'200px', + render: (text, record) => ( + {record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber} - ), - }, - { - title: '分班', - key: 'classroom', - dataIndex: 'classroom', - align: 'center', - render: (text, record) => ( - - {record.classroom} - - ) - }, - { - title: '提交状态', - dataIndex: 'submitstate', - key: 'submitstate', - align: 'center', - render: (text, record) => ( - + ), + }, + { + title: '提交状态', + dataIndex: 'submitstate', + key: 'submitstate', + align: 'center', + render: (text, record) => ( + {record.submitstate} - ) + ) - }, - { - title: '更新时间', - dataIndex: 'updatetime', - key: 'updatetime', - align: 'center', - render: (text, record) => ( - - {record.updatetime} + }, + { + title: '更新时间', + dataIndex: 'updatetime', + key: 'updatetime', + align: 'center', + render: (text, record) => ( + + {record.updatetime} - ), - }, - { - title: '完成情况', - dataIndex: 'completion', - key: 'completion', - align: 'center', + ), + }, + { + title: '完成情况', + dataIndex: 'completion', + key: 'completion', + align: 'center', + + render: (text, record) => ( + + + +
    已通过{record.completion}关,共{this.state.challenges_count}关
    +
    }> + {record.completion+"/"+this.state.challenges_count} + - render: (text, record) => ( - - {record.completion} - ) - }, - { - title: '最终成绩', - dataIndex: 'finalscore', - key: 'finalscore', - align: 'center', - render: (text, record) => ( - - ( + + { + record.ultimate_score=== true? + +
    {record.user_name}{record.user_login}
    +
    {record.finalscore === "--"?最终调整成绩:0分 :最终调整成绩:{record.finalscore}分}
    +
    }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } + + : + +
    {record.user_name}{record.user_login}
    +
    {record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
    +
    {record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
    +
    {record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
    +
    {record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
    +
    }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } + + + } + + ) + }, + { + title: '操作', + dataIndex: 'operating', + key: 'operating', + display: 'block', + align: 'center', + width:'96px', + render: (text, record) => ( + record.submitstate === "未提交" ? --: + + +
    直接调整最终成绩的分数
    +
    其它评分全部作废
    +
    }> + this.Viewstudenttraininginformations(record)}>调分 + + this.Viewstudenttraininginformation(record)}>{record.operating} + + ) + }, + ] + + }else{ + columns = [ + { + title: '序号', + dataIndex: 'number', + key: 'number', + align: 'center', + width:'96px', + render: (text, record) => ( + + {record.number} + + ) + }, + { + title: '姓名', + dataIndex: 'name', + key: 'name', + align: 'center', + width:'147px', + render: (text, record) => ( + + {record.name} + + ) + }, + { + title: '学号', + dataIndex: 'stduynumber', + key: 'stduynumber', + align: 'center', + width:'200px', + render: (text, record) => ( + + {record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber} + + ), + }, + { + title: '分班', + key: 'classroom', + dataIndex: 'classroom', + align: 'center', + render: (text, record) => ( + + { + record.classroom&&record.classroom==="--"? + + : + + } + + ) + }, + { + title: '提交状态', + dataIndex: 'submitstate', + key: 'submitstate', + align: 'center', + render: (text, record) => ( + + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + } : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : { "color": '#747A7F', "text-align": "center" - }}>{record.finalscore} + }}>{record.submitstate} + + ) + + }, + { + title: '更新时间', + dataIndex: 'updatetime', + key: 'updatetime', + align: 'center', + render: (text, record) => ( + + {record.updatetime} + + ), + }, + { + title: '完成情况', + dataIndex: 'completion', + key: 'completion', + align: 'center', + + render: (text, record) => ( + + + +
    已通过{record.completion}关,共{this.state.challenges_count}关
    +
    }> + {record.completion+"/"+this.state.challenges_count} + - ) - }, - { - title: '操作', - dataIndex: 'operating', - key: 'operating', - display: 'block', - align: 'center', - width:'96px', - render: (text, record) => ( - record.submitstate === "未提交" ? --: + ) + }, + { + title: '最终成绩', + dataIndex: 'finalscore', + key: 'finalscore', + align: 'center', + render: (text, record) => ( + { + record.ultimate_score=== true? + +
    {record.user_name}{record.user_login}
    +
    {record.finalscore === "--"?最终调整成绩:0分 :最终调整成绩:{record.finalscore}分}
    +
    }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } + + : + +
    {record.user_name}{record.user_login}
    +
    {record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
    +
    {record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
    +
    {record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
    +
    {record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
    +
    }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } + + + } + + ) + }, + { + title: '操作', + dataIndex: 'operating', + key: 'operating', + display: 'block', + align: 'center', + width:'96px', + render: (text, record) => ( + record.submitstate === "未提交" ? --: + + +
    直接调整最终成绩的分数
    +
    其它评分全部作废
    +
    }> this.Viewstudenttraininginformations(record)}>调分 + this.Viewstudenttraininginformation(record)}>{record.operating} + + ) + }, + ] + + } + }else { + if(JSON.stringify(this.state.course_group_info) === "[]" ? "" : this.state.course_group_info === undefined ? "" : this.state.course_group_info === null){ + columns=[ + { + title: '序号', + dataIndex: 'number', + key: 'number', + align: 'center', + width:'96px', + render: (text, record) => ( + + {record.number} + + ) + }, + { + title: '姓名', + dataIndex: 'name', + key: 'name', + align: 'center', + Width:'147px', + render: (text, record) => ( + + {record.name} - ) - }, - ] + ) + }, + { + title: '学号', + dataIndex: 'stduynumber', + key: 'stduynumber', + align: 'center', + width:'200px', + render: (text, record) => ( + + {record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber} + + ), + }, + { + title: '提交状态', + dataIndex: 'submitstate', + key: 'submitstate', + align: 'center', + render: (text, record) => ( + + {record.submitstate} + + ) + + }, + { + title: '更新时间', + dataIndex: 'updatetime', + key: 'updatetime', + align: 'center', + render: (text, record) => ( + + {record.updatetime} + + ), + }, + { + title: '完成情况', + dataIndex: 'completion', + key: 'completion', + align: 'center', + render: (text, record) => ( + + + +
    已通过{record.completion}关,共{this.state.challenges_count}关
    +
    }> + {record.completion+"/"+this.state.challenges_count} + + + + ) + }, + { + title: '关卡得分', + dataIndex: 'levelscore', + key: 'levelscore', + align: 'center', + render: (text, record) => ( + + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.levelscore} + + ) + }, + { + title: '效率分', + dataIndex: 'efficiencyscore', + key: 'efficiencyscore', + align: 'center', + render: (text, record) => ( + + { + record.efficiencyscore&& record.efficiencyscore=== "--"?( + record.submitstate==="按时提交"? + +
    作业截止时,系统根据学生在课堂成员中的效率表现自动评分
    +
    }> + + -- + + + : + record.submitstate==="延时提交"? + +
    补交结束时,系统根据学生在课堂成员中的效率表现自动评分
    +
    }> + + -- + + + : + + -- + + ) + : + = 90 ? { + "color": '#DD1717', + "text-align": "center" + } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore} + } + + + + ) + }, + { + title: '最终成绩', + dataIndex: 'finalscore', + key: 'finalscore', + align: 'center', + render: (text, record) => ( + + { + record.ultimate_score=== true? + +
    {record.user_name}{record.user_login}
    +
    {record.finalscore === "--"?最终调整成绩:0分 :最终调整成绩:{record.finalscore}分}
    +
    }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } + + : + +
    {record.user_name}{record.user_login}
    +
    {record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
    +
    {record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
    +
    {record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
    +
    {record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
    +
    }> + { + record.finalscore&&record.finalscore==="--"? + {record.finalscore} + : + = 90 ? {"color": '#DD1717', "text-align": "center"} : { + "color": '#747A7F', + "text-align": "center" + }}>{record.finalscore} + } + + + } + + ) + }, + { + title: '操作', + dataIndex: 'operating', + key: 'operating', + display: 'block', + align: 'center', + width:'93px', + render: (text, record) => ( + record.submitstate === "未提交" ? -- : + + +
    直接调整最终成绩的分数
    +
    其它评分全部作废
    +
    }> + this.Viewstudenttraininginformations(record)}>调分 + + this.Viewstudenttraininginformation(record)}>{record.operating} + + ) + }, + ] + } } } else { diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index af698386f..d5dbaf06d 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -91,8 +91,8 @@ class Listofworksstudentone extends Component { search: "", order: "", b_order: "asc", - page:1, - limit:20, + page: 1, + limit: 20, work_status: "", course_group: "", } @@ -165,7 +165,7 @@ class Listofworksstudentone extends Component { }).catch((error) => { console.log(error) this.setState({ - loadingstate:false + loadingstate: false }) }) } @@ -450,7 +450,7 @@ class Listofworksstudentone extends Component { } axios.post(urll, data).then((result) => { - if(result !== undefined){ + if (result !== undefined) { // console.log("学生公开的作品列表") // console.log(JSON.stringify(result)) this.setState({ @@ -495,20 +495,38 @@ class Listofworksstudentone extends Component { } render() { - let {visibles, game_list, limit, viewtrainingdata, teacherdata,page, data, jobsettingsdata,styletable, datas, order, loadingstate} = this.state; + let {visibles, game_list, limit, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state; let columns = [ { title: '序号', dataIndex: 'number', key: 'number', align: "center", - width:'96px', + width: '96px', render: (text, record) => ( - {record.number === undefined ? "--" : record.number === "" ? "--" : record.number} + {record.number === undefined ? + -- + : record.number === "" ? + -- + : record.number === "--" ? + -- + : + {record.number} + } + ), }, @@ -517,13 +535,39 @@ class Listofworksstudentone extends Component { dataIndex: 'name', key: 'name', align: "center", - width:'147px', + width: '147px', render: (text, record) => ( - {record.name === undefined ? "--" : record.name === "" ? "--" : record.name === null ? "--" : record.name} + {record.name === undefined ? + -- + : + record.name === "" ? + -- + : + record.name === null ? + -- + : + record.name === "--" ? + -- + : + {record.name} + } + ), }, @@ -532,7 +576,7 @@ class Listofworksstudentone extends Component { dataIndex: 'stduynumber', key: 'stduynumber', align: "center", - width:'200px', + width: '200px', render: (text, record) => ( ( - 90 ? { - "color": '#DD1717', - "text-align": "center" - } : parseInt(record.levelscore) <= 90 ? { - "color": '#FF6800', - "text-align": "center", - "margin-left": "20px" - } : parseInt(record.levelscore) <= 60 ? { - "color": '#747A7F', - "text-align": "center" - } : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore} + { + record.levelscore && record.levelscore === "--"? + {record.levelscore} + : + 90 ? { + "color": '#DD1717', + "text-align": "center" + } : parseInt(record.levelscore) <= 90 ? { + "color": '#FF6800', + "text-align": "center", + "margin-left": "20px" + } : parseInt(record.levelscore) <= 60 ? { + "color": '#747A7F', + "text-align": "center" + } : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore} + } + ), }, @@ -628,11 +678,11 @@ class Listofworksstudentone extends Component { dataIndex: 'operating', key: 'operating', align: "center", - width:'96px', + width: '96px', render: (text, record) => ( { - record.submitstate === "未提交" ? "--" + record.submitstate === "未提交" ?-- : this.cancelModulationModels()} />
    - : "" + : "" }
    @@ -683,12 +733,12 @@ class Listofworksstudentone extends Component { > {jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name} + to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name} > 作业详情

    -
    +

    {teacherdata === undefined ? "" : teacherdata.homework_name}

    @@ -696,11 +746,11 @@ class Listofworksstudentone extends Component { typelist={teacherdata === undefined ? [""] : teacherdata.homework_status} />
    返回 + href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回

    -
    +
    {teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}已交{teacherdata === undefined ? "" : teacherdata.uncommit_count}未交 - {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" :teacherdata.left_time === null ? "" : + {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata.left_time.status} } {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : - {teacherdata.left_time.time} + {teacherdata.left_time.time} } @@ -888,8 +939,11 @@ class Listofworksstudentone extends Component { {teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}已交{teacherdata === undefined ? "" : teacherdata.uncommit_count}未交 - {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :{teacherdata.left_time.status}} - {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" :teacherdata.left_time === null ? "0" :{teacherdata.left_time.time} } + {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : + {teacherdata.left_time.status}} + {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : + {teacherdata.left_time.time}}
    @@ -899,9 +953,12 @@ class Listofworksstudentone extends Component { {order === "updated_at" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序 diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index 8c7ad059e..9f82abcfe 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -136,6 +136,7 @@ class TraineetraininginformationModal extends Component { dataIndex: 'number', key: 'number', align: "center", + width: "117px", render: (text, record) => ( {record.number} @@ -146,7 +147,7 @@ class TraineetraininginformationModal extends Component { title: '完成时间', dataIndex: 'name', key: 'name', - width: 178, + width: "203px", align: "center", render: (text, record) => ( @@ -159,6 +160,7 @@ class TraineetraininginformationModal extends Component { dataIndex: 'stduynumber', key: 'stduynumber', align: "center", + width: "117px", render: (text, record) => ( {record.stduynumber} @@ -170,6 +172,7 @@ class TraineetraininginformationModal extends Component { key: 'classroom', dataIndex: 'classroom', align: "center", + width: "117px", render: (text, record) => ( {record.classroom} diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 18d970b1f..6a3379222 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -305,6 +305,10 @@ class Trainingjobsetting extends Component { }) return }else { + + if(!this.state.flagPageEditsthrees === false){ + + if (moment(this.state.end_time, "YYYY-MM-DD HH:mm") <= moment()) { //截止时间小于当前时间 this.scrollToAnchor("publishtimeid"); @@ -325,6 +329,7 @@ class Trainingjobsetting extends Component { }) return } + } } if (this.state.allowreplenishment === "允许补交") { @@ -489,19 +494,22 @@ class Trainingjobsetting extends Component { if (this.state.completionefficiencyscore === true) { latedeductiontwos = this.state.latedeductiontwo; } - var len = 0; - for (var k = 0; k < challenge_scoredata.length; k++) { - len = len + challenge_scoredata[k]; - } - var max = latedeductiontwos + len; - if (max > 100) { - this.props.showNotification(`总分值+效率占比分之和要等于100,现在分值为` + max); - return; - } - if(max<100){ - this.props.showNotification(`总分值+效率占比分之和要等于100,现在分值为` + max); - return; + if(challenge_scoredata.length>0){ + var len = 0; + for (var k = 0; k < challenge_scoredata.length; k++) { + len = len + challenge_scoredata[k]; + } + var max = latedeductiontwos + len; + if (max > 100) { + this.props.showNotification(`总分值+效率占比分之和要等于100,现在分值为` + max); + return; + } + if(max<100){ + this.props.showNotification(`总分值+效率占比分之和要等于100,现在分值为` + max); + return; + } } + var url = `/homework_commons/${homeworkid}/update_settings.json`; var data = undefined; // console.log("this.state.unified_setting") @@ -1939,7 +1947,7 @@ class Trainingjobsetting extends Component {
    公开作品 + checked={this.state.publicwork} style={{"color":"#666666"}}>公开成绩 (选中,则在作业截止/补交结束时间之后,已提交作品的学生可以查看其它学生的成绩,否则只能查看自己的成绩)
    From 59bbb18b376dd25f5dfc4473bb8cfdb076f3f075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 25 Jun 2019 18:39:39 +0800 Subject: [PATCH 176/964] =?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 --- .../courses/coursesPublic/AccessoryModal.js | 8 ++--- .../graduation/tasks/GraduateTaskItem.js | 32 +++++++++++++++-- .../tasks/GraduationTasksappraise.js | 2 +- .../tasks/GraduationTaskssettinglist.js | 34 +++++++++++++++---- 4 files changed, 62 insertions(+), 14 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/AccessoryModal.js b/public/react/src/modules/courses/coursesPublic/AccessoryModal.js index acd583e43..df59cb4ae 100644 --- a/public/react/src/modules/courses/coursesPublic/AccessoryModal.js +++ b/public/react/src/modules/courses/coursesPublic/AccessoryModal.js @@ -115,10 +115,10 @@ class AccessoryModal extends Component{ newfileList.push(list.response.id) } - if (newfileList.length == 0) { - this.props.showNotification('请先上传附件') - return; - } + // if (newfileList.length == 0) { + // this.props.showNotification('请先上传附件') + // return; + // } let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json" axios.post(url,{ diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 419f26315..519850271 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -6,6 +6,8 @@ import {Link} from 'react-router-dom'; import axios from 'axios'; import Modals from '../../../modals/Modals'; import Associationmodel from '../../coursesPublic/Associationmodel'; +import AccessoryModal from "../../coursesPublic/AccessoryModal"; + class GraduateTaskItem extends Component{ constructor(props){ @@ -111,12 +113,26 @@ class GraduateTaskItem extends Component{ } + addAccessory=()=>{ + this.setState({ + visibles:true + }) + } + Cancel=()=>{ this.setState({ visible:false }) } - + Cancelvisible=()=>{ + this.setState({ + visibles:false + }) + } + + setupdate=()=>{ + this.props.funlist + } render(){ let { Modalstype, @@ -161,6 +177,15 @@ class GraduateTaskItem extends Component{ taskid={taskid} funlist={this.props.funlist} />:""} + {this.state.visibles===true?:""} { {getFieldDecorator('description', { rules: [{ @@ -432,14 +445,13 @@ class NewWork extends Component{ )} - - - - (单个文件150M以内) - } + + + (单个文件150M以内) + { isGroup && diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index 8720dd860..eb674a397 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -916,7 +916,7 @@ a.white-btn.use_scope-btn:hover{ .ml22{ margin-left:22px; } - +/* FORM START */ .ant-form label{ /* 为了覆盖antd的样式,这里使用了important,TODO */ font-size: 16px !important; @@ -930,6 +930,12 @@ a.white-btn.use_scope-btn:hover{ .ant-form label.font-12 { font-size: 12px !important; } +/* md编辑器在form中时,使用这个样式,可以把错误信息绝对定位 */ +.mdInForm .has-error .ant-form-explain { + position: absolute; + margin-top: -2px; + margin-left: -7px; +} /*新建课堂*/ From b040e6efb6c9d4ebbaa3a16b628641ac35d2c0bd Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 26 Jun 2019 09:52:03 +0800 Subject: [PATCH 180/964] =?UTF-8?q?=E5=B0=8F=E6=A0=B7=E5=BC=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/busyWork/CommonWorkAppraise.js | 61 +++++++++---------- .../tasks/GraduationTasksappraise.js | 14 ++--- .../shixunHomework/ShixunhomeWorkItem.js | 10 +-- 3 files changed, 42 insertions(+), 43 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js index 77317792e..08832a059 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js @@ -186,32 +186,32 @@ class CommonWorkAppraise extends Component{ } `}
    - {(description || (attachments && attachments.length != 0)) &&
    -
    + {(description || (attachments && attachments.length != 0)) &&
    +
    内容
    -
    -
    +
    +
    +
    + {attachments.map((item,key)=>{ + return( +
    + + + + + {item.title} + + {item.filesize} + {/*{item.delete===true?:""}*/} + {item.delete===true?:""} +
    + ) + })} +
    - {attachments.map((item,key)=>{ - return( -
    - - - - - {item.title} - - {item.filesize} - {/*{item.delete===true?:""}*/} - {item.delete===true?:""} -
    - ) - })} - - -
    +
    { update_time && 更新 @@ -233,7 +233,7 @@ class CommonWorkAppraise extends Component{
    } - {revise_attachments.length===0?"":
    + {revise_attachments.length===0?"":
    - - {/**/} - - -
    - - -
    - - -
    -
    - ) - } - - - - - - -} -const Homeworddescriptions = Form.create({name: 'taskPollNew'})(Homeworddescription); +import React, {Component} from "react"; +import { + Form, + Select, + Input, + Button, + Checkbox, + Upload, + Icon, + message, + Modal, + Table, + Divider, + InputNumber, + Tag, + DatePicker, + Radio, + Tooltip, + notification +} from "antd"; +import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; +import {Link, Switch, Route, Redirect} from 'react-router-dom'; +import axios from 'axios'; +import '../css/members.css' +import "../common/formCommon.css" +import '../css/Courses.css' +import '../css/members.css' +import "../common/formCommon.css" +import '../css/Courses.css' +import moment from 'moment'; +import '../css/members.css' +import "../common/formCommon.css" +import './style.css' +import Workquestionandanswer from "./Workquestionandanswer"; +const { TextArea } = Input; + + +class Homeworddescription extends Component { + + constructor(props) { + super(props); + this.state = { + props: props, + description:undefined, + } + + + } + + componentDidMount() { + + + } + //取消操作 + clickcancel =()=>{ + this.props.NOReleaseNotes(); + } + //确认操作 + onSaveExercise=()=>{ + if(this.state.description === "" || this.state.description===undefined || this.state.description === null){ + this.props.showNotification("请输入作业说明"); + return + } + this.props.ReleaseNotes(this.state.description); + } + //获取输入框 + settextarea=(e)=>{ + this.setState({ + description:e + }) + } + render() { + return ( +
    +
    + + + {/**/} + + +
    + + +
    + + +
    +
    + ) + } + + + + + + +} +const Homeworddescriptions = Form.create({name: 'taskPollNew'})(Homeworddescription); export default Homeworddescriptions; \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index 272ac6418..a21d6f977 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -334,7 +334,7 @@ class ShixunhomeWorkItem extends Component{ {discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交} {discussMessage.uncommit_count===undefined?"":{discussMessage.uncommit_count} 未交} {/*{discussMessage.replies_count} 3 未评*/} - 0?"剩余时间":""} placement="bottom"> + {discussMessage.status_time} @@ -349,7 +349,7 @@ class ShixunhomeWorkItem extends Component{ {this.props.isAdmin?:""} diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 7ebbeb473..438babfea 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -429,27 +429,36 @@ class Workquestionandanswer extends Component { {jobsettingsdata === undefined|| jobsettingsdata.data.description===null? "无" :
    +
    {/* /!*{}}>
    {/* /!*{jobsettingsdata.data.description}*!/*/} - {/* */} + {/* */}
    - {/*
    */} - {/*

    */} - {/* /!*{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?""*!/*/} - {/* */} - {/* /!*}*!/*/} - {/*

    */} - - {/*
    */} + {/*
    */} + {/*

    */} + {/* /!*{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?""*!/*/} + {/* */} + {/* /!*}*!/*/} + {/*

    */} + + {/*
    */}
    } diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 70acf0f80..c3be53486 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -827,8 +827,8 @@ class ShixunHomework extends Component{ this.setState({ Modalstype:true, - Modalstopval:"公开后非课堂成员也可以访问查看", - ModalsBottomval:"是否确认公开?", + Modalstopval:"设为公开后,非课堂成员也可以访问查看", + ModalsBottomval:"是否确认设为公开?", ModalCancel:this.cancelmodel, ModalSave:this.saveonOpen, }) @@ -1190,6 +1190,7 @@ class ShixunHomework extends Component{ isAdmin={this.props.isAdmin()} isStudent={this.props.isStudent()} isNotMember={this.props.isNotMember()} + isClassManagement={this.props.isClassManagement()} checkBox={this.props.isAdmin()?:""} match={this.props.match} coursedata={this.props.coursedata} diff --git a/public/react/src/modules/paths/ShixunPathCard.js b/public/react/src/modules/paths/ShixunPathCard.js index e2c529aea..2d1090820 100644 --- a/public/react/src/modules/paths/ShixunPathCard.js +++ b/public/react/src/modules/paths/ShixunPathCard.js @@ -1,78 +1,80 @@ -import React, { Component } from 'react'; -import {getImageUrl} from 'educoder'; -import { BrowserRouter as Router, Route, Link } from "react-router-dom"; -import { Tooltip } from 'antd'; -import axios from 'axios'; - - -class ShixunPathCard extends Component{ - constructor(props) { - super(props) - } - render(){ - let {pathList}=this.props; - return( -
    - { - pathList && pathList.length > 0 ? - ( -
    - { - pathList && pathList.map((item,key)=>{ - - return( -
    - { - item.tag_name === null ? "" : -
    - {item.tag_name} - -
    - } - - -
    - -

    非试用内容,需要授权

    -
    - - 13?1543211263 - -
    -

    - {item.name} -

    -

    - - - {item.stages_count} - - - {/**/} - {/*{item.shixuns_count}*/} - {/**/} - - - {item.members_count} - -

    -
    -
    - ) - }) - } -
    - ):( -
    - -

    暂无数据哦~

    -
    - ) - } - -
    - ) - } -} +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import { BrowserRouter as Router, Route, Link } from "react-router-dom"; +import { Tooltip } from 'antd'; +import axios from 'axios'; + + +class ShixunPathCard extends Component{ + constructor(props) { + super(props) + } + render(){ + let {pathList}=this.props; + return( +
    + { + pathList && pathList.length > 0 ? + ( +
    + { + pathList && pathList.map((item,key)=>{ + + return( +
    + { + item.tag_name === null ? "" : +
    + {item.tag_name} + +
    + } + + +
    + +

    非试用内容,需要授权

    +
    + + {/*target="_blank"*/} + 13?1543211263 + +
    +

    + {item.name} + {/*target="_blank"*/} +

    +

    + + + {item.stages_count} + + + {/**/} + {/*{item.shixuns_count}*/} + {/**/} + + + {item.members_count} + +

    +
    +
    + ) + }) + } +
    + ):( +
    + +

    暂无数据哦~

    +
    + ) + } + +
    + ) + } +} export default ShixunPathCard; \ No newline at end of file diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 66d3d9273..1bdc505c3 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -183,7 +183,12 @@ export function TPMIndexHOC(WrappedComponent) { // return false return this.state.coursedata&&this.state.coursedata.course_identity === 0 } - // 管理员等 + // 课堂管理等 + isClassManagement = () => { + // return this.state.coursedata&&this.state.coursedata.course_identity >= 0 && + return this.state.coursedata&&this.state.coursedata.course_identity < 2 + } + //老师等 isAdminOrCreator = () => { // return this.state.coursedata&&this.state.coursedata.course_identity >= 0 && return this.state.coursedata&&this.state.coursedata.course_identity < 3 @@ -279,7 +284,7 @@ export function TPMIndexHOC(WrappedComponent) { const common = { isSuperAdmin:this.isSuperAdmin, isAdminOrCreator:this.isAdminOrCreator, - + isClassManagement:this.isClassManagement, isAdmin: this.isAdmin, isAdminOrTeacher: this.isAdminOrTeacher, isStudent: this.isStudent, diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index 85275e620..b60b641e0 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -324,7 +324,7 @@ export default class TPMsettings extends Component { opening_time:response.data.shixun.opening_time, newuse_scope:response.data.shixun.use_scope, scope_partments: response.data.shixun.scope_partment.length, - shixunmemoMDvalue:response.data.shixun.evaluate_script + shixunmemoMDvalue:response.data.shixun.evaluate_script, }) // if(response.data.status===403){ @@ -598,7 +598,7 @@ export default class TPMsettings extends Component { evaluate_script, exec_time, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh, opening_time, pod_exist_time,shixunmemoMDvalue } = this.state; - let operateauthority=this.props.identity<4&&this.props.status==0||this.props.identity===1&&this.props.status==2||this.props.identity===1&&this.props.status==1; + let operateauthority=this.props.identity<4&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1; const description_editormd = this.description_editormd.getValue(); @@ -1084,7 +1084,7 @@ export default class TPMsettings extends Component { } const dateFormat = 'YYYY-MM-DD HH:mm:ss'; - let operateauthority=this.props.identity===1?true:this.props.identity<4&&this.props.status==0; + let operateauthority=this.props.identity===1?true:this.props.identity<4&&this.state.status==0?true:false; return (
    @@ -1092,21 +1092,21 @@ export default class TPMsettings extends Component {
    配置 { - this.props.identity===1&&this.props.status==2? + this.props.identity===1&&this.state.status==2? this.operateshixuns(2)}> 永久关闭 :"" } { - this.props.identity < 4 && this.props.status==0? + this.props.identity < 4 && this.state.status==0? this.operateshixuns(1)}> 删除实训 :"" } { - this.props.identity == 1 && this.props.status == 2 ? + this.props.identity == 1 && this.state.status == 2 ? this.operateshixuns(1)}> 删除实训 @@ -1510,7 +1510,7 @@ export default class TPMsettings extends Component {
    -
    +

    公开程度

    对所有公开 (选中则所有已被试用授权的用户可以学习) @@ -1556,7 +1556,7 @@ export default class TPMsettings extends Component { onClick={(key)=>this.deleteScopeInput(key)} // style={{display:this.props.status===2&&this.props.identity>1||this.props.status===1&&this.props.identity>1===true?"none":"block"}} > - {this.props.identity===1?"x":this.props.status===2&&scope_partment===scope_partments||this.props.status===1&&scope_partment===scope_partments?"":"×"} + {this.props.identity===1?"x":this.state.status===2&&scope_partment===scope_partments||this.state.status===1&&scope_partment===scope_partments?"":"×"}
    ) diff --git a/public/react/src/modules/tpm/shixuns/ShixunCard.js b/public/react/src/modules/tpm/shixuns/ShixunCard.js index 7237f9e35..e0850143c 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunCard.js +++ b/public/react/src/modules/tpm/shixuns/ShixunCard.js @@ -1,174 +1,177 @@ -import React, { Component } from 'react'; -import { Redirect } from 'react-router'; - -import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; - -import PropTypes from 'prop-types'; - -import classNames from 'classnames'; - -// import { Rating,Loading} from '@icedesign/base'; - -import {getImageUrl,setImagesUrl, toPath} from 'educoder'; - -// import { Pagination,Row,Col } from 'antd'; - -import 'antd/lib/pagination/style/index.css'; - -import './shixunCss/shixunCard.css'; - -import Rating from '@icedesign/base/lib/rating'; - -import Pagination from '@icedesign/base/lib/pagination'; - -// import Loading from '@icedesign/base/lib/loading'; - -// 引入业务组件样式 -import '@icedesign/base/lib/pagination/style.js'; - -import '@icedesign/base/lib/rating/style.js'; - -import { Tooltip } from 'antd'; - -// import '@icedesign/base/lib/loading/style.js'; - -import axios from 'axios'; - -const $ = window.$; - -class ShixunCard extends Component { - constructor(props) { - super(props) - - this.state = { - startValue:[], - order_by:"", - page:1, - limit:16, - keyword:"", - status:0, - diff:0, - hideme:false, - tag_level:3, - tag_id:'' - } - - } - - PaginationonChange=(pageNumber)=> { - this.props.shixunsPage(pageNumber); - } - - render() { - let {middleshixundata, pagination, typepvisible, pages, totalcount} = this.props; - return ( -
    - {/**/} - -
    -
    -
    - -

    暂无数据哦~

    -
    -
    -
    -
    -
      - -
    -
    -
    -
    -
    - -
    -
    -
    - { middleshixundata===undefined?" ":middleshixundata.map((item,key)=>{ - return( -
    - { - item.tag_name === null ? "": -
    - {item.tag_name} - -
    - } -
    - -

    非试用内容,需要授权

    -
    - - - {/**/} - - - -
    -

    - - {item.name} - -

    - -

    - - - - {item.score_info===null?"5分":item.score_info+"分"} -

    - -

    - - - {item.challenges_count} - - - - {/**/} - {/**/} - {/*{item.exp}*/} - {/**/} - {/**/} - - - - {item.stu_num} - - - - {item.level} -

    - -
    -
    - ) - }) - } - -
    - -
    - {/*totalcount*/} -
    - {/**/} - {/* 不加参数请求的时候,没返回总数了。加了个比较大的数字,让他可以翻页 */} - -
    - -
    - -
    - {/*
    */} -
    - ) - } -} - -export default ShixunCard; +import React, { Component } from 'react'; +import { Redirect } from 'react-router'; + +import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; + +import PropTypes from 'prop-types'; + +import classNames from 'classnames'; + +// import { Rating,Loading} from '@icedesign/base'; + +import {getImageUrl,setImagesUrl, toPath} from 'educoder'; + +// import { Pagination,Row,Col } from 'antd'; + +import 'antd/lib/pagination/style/index.css'; + +import './shixunCss/shixunCard.css'; + +import Rating from '@icedesign/base/lib/rating'; + +import Pagination from '@icedesign/base/lib/pagination'; + +// import Loading from '@icedesign/base/lib/loading'; + +// 引入业务组件样式 +import '@icedesign/base/lib/pagination/style.js'; + +import '@icedesign/base/lib/rating/style.js'; + +import { Tooltip } from 'antd'; + +// import '@icedesign/base/lib/loading/style.js'; + +import axios from 'axios'; + +const $ = window.$; + +class ShixunCard extends Component { + constructor(props) { + super(props) + + this.state = { + startValue:[], + order_by:"", + page:1, + limit:16, + keyword:"", + status:0, + diff:0, + hideme:false, + tag_level:3, + tag_id:'' + } + + } + + PaginationonChange=(pageNumber)=> { + this.props.shixunsPage(pageNumber); + } + + render() { + let {middleshixundata, pagination, typepvisible, pages, totalcount} = this.props; + return ( +
    + {/**/} + +
    +
    +
    + +

    暂无数据哦~

    +
    +
    +
    +
    +
      + +
    +
    +
    +
    +
    + +
    +
    +
    + { middleshixundata===undefined?" ":middleshixundata.map((item,key)=>{ + return( +
    + { + item.tag_name === null ? "": +
    + {item.tag_name} + +
    + } +
    + +

    非试用内容,需要授权

    +
    + + + {/**/} + + + {/*target="_blank"*/} + +
    +

    + + {item.name} + +

    + + {/*target="_blank"*/} + +

    + + + + {item.score_info===null?"5分":item.score_info+"分"} +

    + +

    + + + {item.challenges_count} + + + + {/**/} + {/**/} + {/*{item.exp}*/} + {/**/} + {/**/} + + + + {item.stu_num} + + + + {item.level} +

    + +
    +
    + ) + }) + } + +
    + +
    + {/*totalcount*/} +
    + {/**/} + {/* 不加参数请求的时候,没返回总数了。加了个比较大的数字,让他可以翻页 */} + +
    + +
    + +
    + {/*
    */} +
    + ) + } +} + +export default ShixunCard; From 2d8b2ef96f0fd45d519f9dce443a2723c919f910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 26 Jun 2019 11:35:00 +0800 Subject: [PATCH 185/964] =?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/shixunHomework/Listofworks.js | 16 ++++++---- .../src/modules/login/Trialapplication.js | 32 +++++++++---------- public/react/src/modules/tpm/NewHeader.js | 2 +- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 6d19b13ef..98ba43e55 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -75,7 +75,7 @@ class Listofworks extends Component { teacherlist: undefined, searchtext: "", course_groupysls: undefined, - course_groupyslstwo: undefined, + course_groupyslstwo: [], visible: false, userid: 0, course_group: null, @@ -1164,7 +1164,7 @@ class Listofworks extends Component { // console.log(checkedValues); this.setState({ unlimited: 0, - course_groupyslstwo: undefined, + course_groupyslstwo: [], loadingstate: true, }) @@ -1172,7 +1172,7 @@ class Listofworks extends Component { } else if (checkedValues.length === data.length) { this.setState({ unlimited: 0, - course_groupyslstwo: undefined, + course_groupyslstwo: [], loadingstate: true, }) this.Startsorting(this.state.order, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); @@ -1198,6 +1198,7 @@ class Listofworks extends Component { this.setState({ unlimitedtwo: 1, course_groupysls: undefined, + checkedValuesineinfo:[], loadingstate: true, }) @@ -1206,6 +1207,7 @@ class Listofworks extends Component { this.setState({ unlimitedtwo: 1, course_groupysls: undefined, + checkedValuesineinfo:[], loadingstate: true, }) this.Startsorting(this.state.order, this.state.checcourse_groupyslstwokedValuesine, checkedValues, this.state.searchtext, this.state.page, this.state.limit); @@ -1485,22 +1487,22 @@ class Listofworks extends Component { notlimiteds = () => { this.setState({ checkedValuesine: undefined, - course_groupyslstwo: undefined, + course_groupyslstwo: [], unlimited: 0, loadingstate: true, }) - this.Startsorting(this.state.order, null, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); + this.Startsorting(this.state.order, [], this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); } notlimitedst = () => { // console.log(this.state.course_group_info); this.setState({ unlimitedtwo: 1, - checkedValuesineinfo: undefined, + checkedValuesineinfo: [], course_groupysls: undefined, loadingstate: true, }) - this.Startsorting(this.state.order, this.state.course_groupyslstwo, undefined, this.state.searchtext, this.state.page, this.state.limit); + this.Startsorting(this.state.order, this.state.course_groupyslstwo, [], this.state.searchtext, this.state.page, this.state.limit); } //立即截止确定按钮 coursetaskend = () => { diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index e5bc75466..846971e82 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -30,7 +30,7 @@ class Trialapplication extends Component { Phonenumberisnotco: undefined, Phonenumberisnotcobool: false, readonlyInput: true, - user_phone_binded: false, + user_phone_binded: props.user_phone_binded, showTrial: false, user: undefined, } @@ -383,7 +383,7 @@ class Trialapplication extends Component { { isRenders === false ? "" : -
    +
    + {this.props.isAdmin()?
  • + 导出 + +
  • :""} {this.props.isAdmin() ? teacherdata && teacherdata.end_immediately === true ? 立即截止 : "" From df742dbbfabe515ea6bd19c1fb0f03f936932486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 26 Jun 2019 15:55:28 +0800 Subject: [PATCH 201/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/shixunHomework/Listofworks.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 697ff92e4..5a7aa56ae 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -94,8 +94,6 @@ class Listofworks extends Component { boolgalist:true, challenges_count:0, experience:0, - exportResultUrl:"", - exportUrl:"", columns: [ { title: '序号', @@ -1599,7 +1597,7 @@ class Listofworks extends Component { render() { // console.log("Listofworks.js000") - let {columns, page, boolgalist,limit,exportUrl, exportResultUrl,experience,course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state; + let {columns, page, boolgalist,limit,experience,course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state; // // console.log(teacherdata&&teacherdata.shixun_identifier) // console.log(course_group_info) From 02a4009821abe49d61facc2469bd54c8f035e24a Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 26 Jun 2019 16:33:34 +0800 Subject: [PATCH 202/964] =?UTF-8?q?=E6=88=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/busyWork/CommonWorkAnswer.js | 2 +- .../modules/courses/busyWork/CommonWorkList.js | 6 ++++-- .../src/modules/courses/common/courseMessage.css | 1 + .../src/modules/courses/members/studentsList.js | 16 +++++++++++----- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAnswer.js b/public/react/src/modules/courses/busyWork/CommonWorkAnswer.js index 51031de17..d7614459c 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkAnswer.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkAnswer.js @@ -86,7 +86,7 @@ class CommonWorkAnswer extends Component{ {/* 内容区 */}
    {reference_answer ? : - reference_answer === undefined ? '' : } + reference_answer === undefined ? '' : ((!attachments || attachments.length == 0) && )} { attachments && attachments.map((item) => { return (
    diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 28de13fe7..31532f78e 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -64,7 +64,9 @@ function buildColumns(that, student_works) { key: 'id', render: (text, record, index) => { return ( - {(that.state.page - 1) * PAGE_SIZE + index + 1} + + {record.isMine == true ? '我' : (that.state.page - 1) * PAGE_SIZE + index + 1} + )}, }, { title: '姓名', @@ -547,7 +549,7 @@ class CommonWorkList extends Component{ StudentData=isStudent ? [{ id, user_name, user_login, student_id, group_name, work_status, update_time, teacher_score, teaching_asistant_score, student_score, ultimate_score, work_score, student_comment_count, appeal_all_count, appeal_deal_count, late_penalty, absence_penalty, appeal_penalty, - work_group: '' }] : [] + work_group: '', isMine: true }] : [] } let params = this._getRequestParams() let exportUrl = `/api/homework_commons/${workId}/works_list.zip?${queryString.stringify(params)}`; diff --git a/public/react/src/modules/courses/common/courseMessage.css b/public/react/src/modules/courses/common/courseMessage.css index c219df018..fede51ded 100644 --- a/public/react/src/modules/courses/common/courseMessage.css +++ b/public/react/src/modules/courses/common/courseMessage.css @@ -40,6 +40,7 @@ .course-message .comment_item_cont:last-child { /* 作品评阅需要 */ border-bottom: none; + padding-bottom: 0px; } .course-message .memoMore { diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index d997592ef..9c6254cbd 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -46,24 +46,30 @@ const buildColumns = (that) => { key: 'login', align:'center', className:"color-grey-6", - // render: (name, record) => { - // return {name} - // } + render: (name, record) => { + return {name} + } }, { title: '姓名', dataIndex: 'name', key: 'name', align:'center', + width:"10%", className:"color-grey-6", render: (name, record) => { - return {name} + return {name} } }, { title: '学号', dataIndex: 'student_id', key: 'student_id', align:'center', - className:"color-grey-6" + className:"color-grey-6", + render: (student_id, record) => { + return {student_id} + } }, { title: '分班', dataIndex: 'course_group_name', From 26023201bb1e0b97b21ee4de90d838c07d017b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 26 Jun 2019 16:39:39 +0800 Subject: [PATCH 203/964] =?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/shixunHomework/Listofworks.js | 2 +- .../shixunHomework/Listofworksstudentone.js | 2 +- .../TraineetraininginformationModal.js | 1 + .../src/modules/tpm/newshixuns/Newshixuns.js | 2386 +++++++++-------- 4 files changed, 1198 insertions(+), 1193 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 5a7aa56ae..8a9a0a53f 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1377,7 +1377,7 @@ class Listofworks extends Component { classroom: game_list[i].score, complete_status: game_list[i].complete_status, }) - experience=game_list[i].complete_status+experience; + experience=game_list[i].score+experience; if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){ boolgalist=false; diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index d0628930f..29af983e5 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -394,7 +394,7 @@ class Listofworksstudentone extends Component { classroom: game_list[i].score, complete_status: game_list[i].complete_status, }) - experience=game_list[i].complete_status+experience; + experience=game_list[i].score+experience; if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){ boolgalist=false; diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index 61b066580..735e3f396 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -52,6 +52,7 @@ class TraineetraininginformationModal extends Component { // this.seacthdata(); } + LimitNumber=(txt)=> { var str = txt; if(str.length>25){ diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js index 895b5dd7f..aa5b62a0a 100644 --- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js +++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js @@ -1,1191 +1,1195 @@ -import React, {Component} from 'react'; - -import {TPMIndexHOC} from '../TPMIndexHOC'; - -import {SnackbarHOC} from 'educoder'; - -import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form} from 'antd'; - -// import "antd/dist/antd.css"; - -import locale from 'antd/lib/date-picker/locale/zh_CN'; - -import axios from 'axios'; - -import './css/Newshixuns.css'; - -import {getUrl} from 'educoder' - -let path = getUrl("/editormd/lib/") - -const $ = window.$; - -let timeout; - -let currentValue; - -const Option = Select.Option; - -const RadioGroup = Radio.Group; -const confirm = Modal.confirm; -// 恢复数据 -function md_rec_data(k, mdu, id, editor) { - if (window.sessionStorage.getItem(k + mdu) !== null) { - editor.setValue(window.sessionStorage.getItem(k + mdu)); - md_clear_data(k, mdu, id); - } -} - -// 保存数据 -function md_add_data(k, mdu, d) { - window.sessionStorage.setItem(k + mdu, d); -} - -// 清空保存的数据 -function md_clear_data(k, mdu, id) { - window.sessionStorage.removeItem(k + mdu); - var id1 = "#e_tip_" + id; - var id2 = "#e_tips_" + id; - if (k == 'content') { - $(id2).html(""); - } else { - $(id1).html(""); - } -} - -function md_elocalStorage(editor, mdu, id) { - if (window.sessionStorage) { - var oc = window.sessionStorage.getItem('content' + mdu); - if (oc !== null) { - $("#e_tips_" + id).data('editor', editor); - var h = '您上次有已保存的数据,是否恢复 ? / 不恢复'; - $("#e_tips_" + id).html(h); - } - setInterval(function () { - var d = new Date(); - var h = d.getHours(); - var m = d.getMinutes(); - var s = d.getSeconds(); - h = h < 10 ? '0' + h : h; - m = m < 10 ? '0' + m : m; - s = s < 10 ? '0' + s : s; - if (editor.getValue().trim() != "") { - md_add_data("content", mdu, editor.getValue()); - var id1 = "#e_tip_" + id; - var id2 = "#e_tips_" + id; - - $(id1).html(" 数据已于 " + h + ':' + m + ':' + s + " 保存 "); - $(id2).html(""); - } - }, 10000); - - } else { - $("#e_tip_" + id).after('您的浏览器不支持localStorage.无法开启自动保存草稿服务,请升级浏览器!'); - } -} - - -function create_editorMD(id, width, high, placeholder, imageUrl, callback) { - var editorName = window.editormd(id, { - width: width, - height: high, - path: path, // "/editormd/lib/" - - syncScrolling: "single", - tex: true, - tocm: true, - emoji: true, - taskList: true, - codeFold: true, - searchReplace: true, - htmlDecode: "style,script,iframe", - sequenceDiagram: true, - autoFocus: false, - toolbarIcons: function () { - // Or return editormd.toolbarModes[name]; // full, simple, mini - // Using "||" set icons align right. - return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear"] - }, - toolbarCustomIcons: { - testIcon: "
    ", - testIcon1: "
    " - }, - //这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。 - saveHTMLToTextarea: true, - // 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标 - dialogMaskOpacity: 0.6, - placeholder: placeholder, - imageUpload: true, - imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"], - imageUploadURL: imageUrl,//url - onload: function () { - // this.previewing(); - $("#" + id + " [type=\"latex\"]").bind("click", function () { - editorName.cm.replaceSelection("```latex"); - editorName.cm.replaceSelection("\n"); - editorName.cm.replaceSelection("\n"); - editorName.cm.replaceSelection("```"); - var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line - 1, 0); - }); - - $("#" + id + " [type=\"inline\"]").bind("click", function () { - editorName.cm.replaceSelection("$$$$"); - var __Cursor = editorName.cm.getDoc().getCursor(); - editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); - editorName.cm.focus(); - }); - $("[type=\"inline\"]").attr("title", "行内公式"); - $("[type=\"latex\"]").attr("title", "多行公式"); - - md_elocalStorage(editorName, `memoNew_${id}`, "memoNew"); - - callback && callback() - } - }); - return editorName; -} - - -class Newshixuns extends Component { - constructor(props) { - super(props) - this.state = { - fileList: [], - newshixunlist: undefined, - departmentslist: undefined, - name: "", - main_type: "", - small_type: "", - trainee: "", - webssh: 0, - use_scope: 0, - can_copy: "", - scope_partment: undefined, - vnc: "", - scopetype: false, - postapplyvisible: false, - sendsure_applyvalue: undefined, - postapplytitle: false, - shixun_nametype: false, - main_types: false, - trainee_types: false, - SelectTheCommandtype: false, - opers: false, - operss: false, - TimePickervalue: "", - opensmail: false, - onSearchvalue: "", - scope_partmenttype: false, - languagewrite: undefined, - systemenvironment:undefined, - testcoderunmode:undefined, - file:undefined, - } - } - - initMD(initValue) { - this.contentChanged = false; - const placeholder = ""; - // amp; - // 编辑时要传memoId - const imageUrl = `/api/attachments.json`; - // 创建editorMd - - const taskpass_editormd = create_editorMD("memoMD", '100%', 400, placeholder, imageUrl, () => { - setTimeout(() => { - taskpass_editormd.resize() - taskpass_editormd.cm && taskpass_editormd.cm.refresh() - }, 500) - - if (initValue) { - taskpass_editormd.setValue(initValue) - } - taskpass_editormd.cm.on("change", (_cm, changeObj) => { - // console.log('....contentChanged') - this.contentChanged = true; - }) - }); - this.taskpass_editormd = taskpass_editormd; - window.taskpass_editormd = taskpass_editormd; - - } - - componentDidMount() { - let newshixunUrl = `/shixuns/new.json`; - axios.get(newshixunUrl).then((response) => { - if (response.status === 200) { - if (response.data.status === 403 || response.data.status === 401 || response.data.status === 500) { - - } else { - this.setState({ - newshixunlist: response.data - }); - this.initMD(response.data.sample[0][1]); - } - - } - }).catch((error) => { - console.log(error) - }); - - let departmentsUrl = `/shixuns/departments.json`; - axios.get(departmentsUrl).then((response) => { - if (response.status === 200) { - this.setState({ - departmentslist: response.data.shools_name - }); - } - }).catch((error) => { - console.log(error) - }); - } - - setlanguagewrite = (e)=>{ - this.setState({ - languagewrite: e.target.value - }) - } - - setsystemenvironment = (e) => { - this.setState({ - systemenvironment: e.target.value - }) - } - settestcoderunmode = (e) => { - this.setState({ - testcoderunmode: e.target.value - }) - - } - shixunname = (e) => { - this.setState({ - name: e.target.value, - shixun_nametype: false - }); - } - - bigClass = (value) => { - this.setState({ - main_type: value - }) - } - - littleClass = (value) => { - this.setState({ - small_type: value - }) - } - - Selectthestudent = (value) => { - this.setState({ - trainee: value - }) - } - - SelectTheCommand = (e) => { - this.setState({ - webssh: e.target.value, - }); - - if (e.target.value === 2) { - this.setState({ - SelectTheCommandtype: true, - multi_webssh: false - }); - } else { - this.setState({ - SelectTheCommandtype: false, - multi_webssh: false - }); - } - } - - Selectpublic = (e) => { - this.setState({ - scopetype: false, - use_scope: e.target.value, - }); - if (e.target.value === 1) { - this.setState({ - scopetype: true - }); - } - - } - - Teacherscopy = (e) => { - let sum = "" - if (e.target.checked === false) { - sum = 0 - } else if (e.target.checked === true) { - sum = 1 - } - this.setState({ - can_copy: sum, - }); - } - - TeachersUbuntu = (e) => { - let sum = "" - if (e.target.checked === false) { - sum = 0 - } else if (e.target.checked === true) { - sum = 1 - } - this.setState({ - vnc: sum, - }); - } - - adduse_scopeinput = () => { - let {scope_partment} = this.state; - let array = scope_partment; - let newarray = "" - array.push(newarray) - this.setState({ - scope_partment: array, - }); - } - - shixunScopeInput = (e, id) => { - 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: "" - }); - } - - deleteScopeInput = (key) => { - let {scope_partment} = this.state; - let datalist = scope_partment; - datalist.splice(key, 1); - this.setState({ - scope_partment: datalist - }); - } - - //提交数据 - submit_new_shixun = () => { - const mdVal = this.taskpass_editormd.getValue(); - let {can_copy, main_type, name, scope_partment, small_type, trainee, use_scope, vnc, webssh, multi_webssh, TimePickervalue} = this.state; - let Url = `/shixuns.json` - if (name === "") { - this.setState({ - shixun_nametype: true - }) - this.props.showSnackbar("实训名称为空"); - $('html').animate({ - scrollTop: 10 - }, 1000); - return - } - if (main_type === "") { - this.setState({ - main_types: true - }) - $('html').animate({ - scrollTop: 700 - }, 1000); - this.props.showSnackbar("请选择技术平台大类别"); - - return - } - - if (use_scope === 1) { - if (scope_partment === undefined || scope_partment.length === 0) { - this.setState({ - scope_partmenttype: true - }) - $('html').animate({ - scrollTop: 900 - }, 1000); - this.props.showSnackbar("公开程度,指定单位为空"); - return - } - } - if (trainee === "") { - this.setState({ - trainee_types: true - }) - // $('html').animate({ - // scrollTop: 700 - // }, 1000); - this.props.showSnackbar("请选择发布信息"); - return - } - let newmulti_webssh = multi_webssh; - if (newmulti_webssh === true) { - newmulti_webssh = 1 - } else { - newmulti_webssh = "" - } - axios.post(Url, { - name: name, - can_copy: can_copy, - description: mdVal, - main_type: main_type, - scope_partment: scope_partment, - small_type: small_type, - trainee: trainee, - use_scope: use_scope, - vnc: vnc, - webssh: webssh, - multi_webssh: newmulti_webssh, - task_pass: 1, - opening_time: TimePickervalue - } - ).then((response) => { - if (response.status === 200) { - window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges"; - // window.open("/shixuns/"+response.data.shixun_identifier+"/challenges"); - } - }).catch((error) => { - console.log(error) - }) - } - - - shixunsfetch = (value, callback) => { - if (timeout) { - clearTimeout(timeout); - timeout = null; - } - currentValue = value; - - function fake() { - let departmentsUrl = `/shixuns/departments.json?q=` + currentValue; - axios.get(departmentsUrl).then((response) => { - callback(response.data.shools_name); - }).catch((error) => { - console.log(error) - }); - } - - timeout = setTimeout(fake, 300); - } - - shixunHandleSearch = (value) => { - this.shixunsfetch(value, departmentslist => this.setState({departmentslist})); - this.setState({ - onSearchvalue: "" - }) - } - - post_apply = () => { - this.setState({ - postapplyvisible: true - }) - } - sendsure_apply = () => { - let {languagewrite,systemenvironment,testcoderunmode} = this.state; - // console.log("点击确定") - // console.log("languagewrite"+languagewrite); - // console.log("systemenvironment"+systemenvironment); - // console.log("testcoderunmode"+testcoderunmode); - - // let attachment_ids = undefined - // if (this.state.fileList) { - // attachment_ids = this.state.fileList.map(item => { - // return item.response ? item.response.id : item.id - // }) - // } - if(languagewrite === undefined || languagewrite === "" ){ - this.props.showNotification(`请填写该镜像是基于什么语言`); - - return - } - if(systemenvironment === undefined || systemenvironment === ""){ - this.props.showNotification(`请填写该镜像是基于什么语言系统环境`); - - return; - - } - if(testcoderunmode === undefined || testcoderunmode === "") { - this.props.showNotification(`请填写该镜像中测试代码运行方式`); - - return; - - } - var attachment_ids=undefined; - if (this.state.fileList) { - attachment_ids = this.state.fileList.map(item => { - return item.response ? item.response.id : item.id - }) - } - if( attachment_ids === undefined || attachment_ids.length===0){ - this.props.showNotification(`请上传附件`); - - return; - } - // console.log("attachment_ids"+attachment_ids); - - // alert(languagewrite +" "+systemenvironment +" "+testcoderunmode + " "+attachment_ids); - - var data={ - language:languagewrite, - runtime:systemenvironment, - run_method:testcoderunmode, - attachment_id:attachment_ids[0], - } - var url =`/shixuns/apply_shixun_mirror.json`; - axios.post(url,data - ).then((response) => { - - try { - if (response.data) { - // const { id } = response.data; - // if (id) { - if(this.state.file !== undefined){ - this.deleteAttachment(this.state.file); - this.setState({ - file:undefined, - languagewrite:"", - systemenvironment:"", - testcoderunmode:"", - }) - }else { - this.setState({ - file:undefined, - languagewrite:"", - systemenvironment:"", - testcoderunmode:"", - }) - } - this.props.showNotification('提交成功!'); - // this.props.history.push(`/courses/${cid}/graduation_topics`); - // } - } - }catch (e) { - - } - - }) - - } - sendhideModaly = () => { - this.setState({ - postapplyvisible: false, - }) - if(this.state.file !== undefined){ - this.deleteAttachment(this.state.file); - this.setState({ - file:undefined, - languagewrite:"", - systemenvironment:"", - testcoderunmode:"", - }) - }else { - this.setState({ - file:undefined, - languagewrite:"", - systemenvironment:"", - testcoderunmode:"", - }) - } - } - sendsure_applyvalues = (e) => { - this.setState({ - sendsure_applyvalue: e.target.value - }) - } - yeshidemodel = () => { - this.setState({ - postapplytitle: false - }) - } - - SelectTheCommandonChange = (e) => { - this.setState({ - multi_webssh: e.target.checked - }) - } - - - bigopen = () => { - this.setState({ - opers: true - }) - } - - bigopens = () => { - this.setState({ - opers: false, - operss: false, - opensmail: false - }) - - } - - bigopensmal = () => { - this.setState({ - opensmail: true - }) - } - - sbigopen = () => { - this.setState({ - operss: true - }) - } - - // sbigopens=()=>{ - // this.setState({ - // operss:false - // }) - // } - - onChangeTimePicker = (value, dateString) => { - this.setState({ - TimePickervalue: dateString - }) - } - // 附件相关 START - handleChange = (info) => { - console.log("handleChange1"); - let fileList = info.fileList; - this.setState({ fileList }); - } - onAttachmentRemove = (file) => { - confirm({ - title: '确定要删除这个附件吗?', - okText: '确定', - cancelText: '取消', - // content: 'Some descriptions', - onOk: () => { - this.deleteAttachment(file) - }, - onCancel() { - console.log('Cancel'); - }, - }); - return false; - } - deleteAttachment = (file) => { - // console.log(file); - let id=file.response ==undefined ? file.id : file.response.id - const url = `/attachments/${id}.json` - axios.delete(url, { - }) - .then((response) => { - if (response.data) { - const { status } = response.data; - if (status == 0) { - // console.log('--- success') - - this.setState((state) => { - const index = state.fileList.indexOf(file); - const newFileList = state.fileList.slice(); - newFileList.splice(index, 1); - return { - fileList: newFileList, - }; - }); - } - } - }) - .catch(function (error) { - console.log(error); - }); - } - - - handleSubmit=()=>{ - // console.log(this.state.languagewrite) - // console.log(this.state.systemenvironment) - // console.log(this.state.testcoderunmode) - var attachment_ids; - if (this.state.fileList) { - attachment_ids = this.state.fileList.map(item => { - return item.response ? item.response.id : item.id - }) - } - // console.log(attachment_ids); - // var data={ - // language:"", - // runtime:"", - // run_method:"", - // attachment_id:"", - // } - // axios.post(url,data - // ).then((response) => { - // if (response.data) { - // // const { id } = response.data; - // // if (id) { - // this.props.showNotification('提交成功!'); - // // this.props.history.push(`/courses/${cid}/graduation_topics`); - // // } - // } - // }) - - - - } - render() { - const { getFieldDecorator } = this.props.form; - const thiss=this; - let {testcoderunmode ,systemenvironment,languagewrite, 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 options - if (departmentslist != undefined) { - options = this.state.departmentslist.map((d, k) => { - return ( - - ) - }) - } - const uploadProps = { - width: 600, - fileList, - multiple: true, - // https://github.com/ant-design/ant-design/issues/15505 - // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 - // showUploadList: false, - action: `${getUrl()}/api/attachments.json`, - onChange: this.handleChange, - onRemove: this.onAttachmentRemove, - beforeUpload: (file) => { - // console.log('beforeUpload', file.name); - const isLt150M = file.size / 1024 / 1024 < 50; - if (!isLt150M) { - this.props.showNotification(`文件大小必须小于50MB`); - - } - if(thiss.state.file !== undefined){ - thiss.deleteAttachment(thiss.state.file); - thiss.setState({ - file:file - }) - }else { - thiss.setState({ - file:file - }) - } - - console.log("handleChange2"); - return isLt150M; - }, - } - // const uploadProps = { - // width: 600, - // fileList, - // multiple: true, - // // https://github.com/ant-design/ant-design/issues/15505 - // // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 - // // showUploadList: false, - // action: `${getUrl()}/api/attachments.json`, - // onChange: this.handleChange, - // onRemove: this.onAttachmentRemove, - // beforeUpload: (file) => { - // // console.log('beforeUpload', file.name); - // const isLt50M = file.size / 1024 / 1024 < 50; - // if (!isLt50M) { - // message.error('文件大小必须小于150MB!'); - // } - // return isLt50M; - // }, - // }; - return ( - -
    -
    -
    - -
    -

    - 创建实训 - 实训制作指南 -

    - -
    -

    实训名称

    -
    - * -
    - - - 必填项 - -
    - -
    -
    - -
    - - -
    - -

    简介

    - -
    -
    - -
    -
    -

    -

    -
    - -
    -

    技术平台

    -
    - * -
    - -

    - 列表中没有? - 申请新建 -

    - - - {/*
    */} -
    -
  • - - -
  • -
  • - - -
  • - -
  • - - - -
  • - -
  • - -
    - {/**/} - {/* {*/} - {/* getFieldDecorator('file',{*/} - {/* rules:[{*/} - {/* }]*/} - {/* })(*/} - - - 上传附件 - (单个文件50M以内) - - - {/* )*/} - {/* }*/} - {/**/} -
    - -
  • -
  • - - - this.sendhideModaly()} - >取消 - - -
  • -
    -
    - {/**/} -
    - - -
    -

    新建申请已提交,请等待管理员的审核

    -
  • 我们将在1-2个工作日内与您联系 -
  • -
    -
    - 知道啦 -
    -
    -
    -
    -
    - -
    -

    请在配置页面完成后续的评测脚本设置操作

    -
    - 必填项 -
    -
    -
    - - -
    -

    命令行

    -
    - - 无命令行窗口 (选中则不给学员的实践任务提供命令窗口) - 命令行练习窗口 (选中则给学员提供用于练习操作的命令行窗口) - 命令行评测窗口 (选中则给学员提供用于关卡评测的命令行窗口) - - 多个命令行窗口(选中则允许学员同时开启多个命令行窗口) - - -
    -
    - - -
    -

    公开程度

    -
    - - 对所有公开 (选中则所有已被试用授权的用户可以学习) - 对指定单位公开 (选中则下方指定单位的已被试用授权的用户可以学习) - - -
    -
    -
    -
    -
    - -
    - (搜索选中添加单位名称) - {/*+ 添加*/} -
    -
    - -
    -
    - { - scope_partment === undefined ? "" : scope_partment.map((item, key) => { - return ( -
  • {item} - this.deleteScopeInput(key)}>× -
  • - ) - }) - } -
    - {/*{*/} - {/*scope_partment===undefined?"":scope_partment.map((item,key)=>{*/} - {/*return(*/} - {/*
    */} - {/*this.deleteScopeInput(key)} style={{ color: 'rgba(0,0,0,.25)' }} />}*/} - {/*value={item}*/} - {/*/>*/} - {/*
    */} - - {/*)*/} - {/*})*/} - {/*}*/} -
    - - - - 请选择需要公开的单位 - -
    -
    -
    -
    - - -
    -

    发布信息

    -
    -
    - *面向学员: -
    - -
    - 实训难易度定位,不限定用户群体 -
    - 必填项 -
    -
    -
    -
  • - 复制: - - -
  • -
    - 开启时间: -
  • - - -
  • -
    -
    - {/*
    */} - {/*

    VNC图形化

    */} - {/*
  • */} - {/**/} - {/**/} - {/*
  • */} - {/*
    */} - - -
    - 提交 - 取消 -
    - - -
    -
    -
    - - ); - } -} -const NewshixunsNew = Form.create({ name: 'newshixunsnew' })(Newshixuns); -export default SnackbarHOC()(TPMIndexHOC(NewshixunsNew)); - - - - - - +import React, {Component} from 'react'; + +import {TPMIndexHOC} from '../TPMIndexHOC'; + +import {SnackbarHOC} from 'educoder'; + +import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form} from 'antd'; + +// import "antd/dist/antd.css"; + +import locale from 'antd/lib/date-picker/locale/zh_CN'; + +import axios from 'axios'; + +import './css/Newshixuns.css'; + +import {getUrl} from 'educoder' + +let path = getUrl("/editormd/lib/") + +const $ = window.$; + +let timeout; + +let currentValue; + +const Option = Select.Option; + +const RadioGroup = Radio.Group; +const confirm = Modal.confirm; +// 恢复数据 +function md_rec_data(k, mdu, id, editor) { + if (window.sessionStorage.getItem(k + mdu) !== null) { + editor.setValue(window.sessionStorage.getItem(k + mdu)); + md_clear_data(k, mdu, id); + } +} + +// 保存数据 +function md_add_data(k, mdu, d) { + window.sessionStorage.setItem(k + mdu, d); +} + +// 清空保存的数据 +function md_clear_data(k, mdu, id) { + window.sessionStorage.removeItem(k + mdu); + var id1 = "#e_tip_" + id; + var id2 = "#e_tips_" + id; + if (k == 'content') { + $(id2).html(""); + } else { + $(id1).html(""); + } +} + +function md_elocalStorage(editor, mdu, id) { + if (window.sessionStorage) { + var oc = window.sessionStorage.getItem('content' + mdu); + if (oc !== null) { + $("#e_tips_" + id).data('editor', editor); + var h = '您上次有已保存的数据,是否恢复 ? / 不恢复'; + $("#e_tips_" + id).html(h); + } + setInterval(function () { + var d = new Date(); + var h = d.getHours(); + var m = d.getMinutes(); + var s = d.getSeconds(); + h = h < 10 ? '0' + h : h; + m = m < 10 ? '0' + m : m; + s = s < 10 ? '0' + s : s; + if (editor.getValue().trim() != "") { + md_add_data("content", mdu, editor.getValue()); + var id1 = "#e_tip_" + id; + var id2 = "#e_tips_" + id; + + $(id1).html(" 数据已于 " + h + ':' + m + ':' + s + " 保存 "); + $(id2).html(""); + } + }, 10000); + + } else { + $("#e_tip_" + id).after('您的浏览器不支持localStorage.无法开启自动保存草稿服务,请升级浏览器!'); + } +} + + +function create_editorMD(id, width, high, placeholder, imageUrl, callback) { + var editorName = window.editormd(id, { + width: width, + height: high, + path: path, // "/editormd/lib/" + + syncScrolling: "single", + tex: true, + tocm: true, + emoji: true, + taskList: true, + codeFold: true, + searchReplace: true, + htmlDecode: "style,script,iframe", + sequenceDiagram: true, + autoFocus: false, + toolbarIcons: function () { + // Or return editormd.toolbarModes[name]; // full, simple, mini + // Using "||" set icons align right. + return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear"] + }, + toolbarCustomIcons: { + testIcon: "
    ", + testIcon1: "
    " + }, + //这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。 + saveHTMLToTextarea: true, + // 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标 + dialogMaskOpacity: 0.6, + placeholder: placeholder, + imageUpload: true, + imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"], + imageUploadURL: imageUrl,//url + onload: function () { + // this.previewing(); + $("#" + id + " [type=\"latex\"]").bind("click", function () { + editorName.cm.replaceSelection("```latex"); + editorName.cm.replaceSelection("\n"); + editorName.cm.replaceSelection("\n"); + editorName.cm.replaceSelection("```"); + var __Cursor = editorName.cm.getDoc().getCursor(); + editorName.cm.setCursor(__Cursor.line - 1, 0); + }); + + $("#" + id + " [type=\"inline\"]").bind("click", function () { + editorName.cm.replaceSelection("$$$$"); + var __Cursor = editorName.cm.getDoc().getCursor(); + editorName.cm.setCursor(__Cursor.line, __Cursor.ch - 2); + editorName.cm.focus(); + }); + $("[type=\"inline\"]").attr("title", "行内公式"); + $("[type=\"latex\"]").attr("title", "多行公式"); + + md_elocalStorage(editorName, `memoNew_${id}`, "memoNew"); + + callback && callback() + } + }); + return editorName; +} + + +class Newshixuns extends Component { + constructor(props) { + super(props) + this.state = { + fileList: [], + newshixunlist: undefined, + departmentslist: undefined, + name: "", + main_type: "", + small_type: "", + trainee: "", + webssh: 0, + use_scope: 0, + can_copy: "", + scope_partment: undefined, + vnc: "", + scopetype: false, + postapplyvisible: false, + sendsure_applyvalue: undefined, + postapplytitle: false, + shixun_nametype: false, + main_types: false, + trainee_types: false, + SelectTheCommandtype: false, + opers: false, + operss: false, + TimePickervalue: "", + opensmail: false, + onSearchvalue: "", + scope_partmenttype: false, + languagewrite: undefined, + systemenvironment:undefined, + testcoderunmode:undefined, + file:undefined, + } + } + + initMD(initValue) { + this.contentChanged = false; + const placeholder = ""; + // amp; + // 编辑时要传memoId + const imageUrl = `/api/attachments.json`; + // 创建editorMd + + const taskpass_editormd = create_editorMD("memoMD", '100%', 400, placeholder, imageUrl, () => { + setTimeout(() => { + taskpass_editormd.resize() + taskpass_editormd.cm && taskpass_editormd.cm.refresh() + }, 500) + + if (initValue) { + taskpass_editormd.setValue(initValue) + } + taskpass_editormd.cm.on("change", (_cm, changeObj) => { + // console.log('....contentChanged') + this.contentChanged = true; + }) + }); + this.taskpass_editormd = taskpass_editormd; + window.taskpass_editormd = taskpass_editormd; + + } + + componentDidMount() { + let newshixunUrl = `/shixuns/new.json`; + axios.get(newshixunUrl).then((response) => { + if (response.status === 200) { + if (response.data.status === 403 || response.data.status === 401 || response.data.status === 500) { + + } else { + this.setState({ + newshixunlist: response.data + }); + this.initMD(response.data.sample[0][1]); + } + + } + }).catch((error) => { + console.log(error) + }); + + let departmentsUrl = `/shixuns/departments.json`; + axios.get(departmentsUrl).then((response) => { + if (response.status === 200) { + this.setState({ + departmentslist: response.data.shools_name + }); + } + }).catch((error) => { + console.log(error) + }); + } + + setlanguagewrite = (e)=>{ + this.setState({ + languagewrite: e.target.value + }) + } + + setsystemenvironment = (e) => { + this.setState({ + systemenvironment: e.target.value + }) + } + settestcoderunmode = (e) => { + this.setState({ + testcoderunmode: e.target.value + }) + + } + shixunname = (e) => { + this.setState({ + name: e.target.value, + shixun_nametype: false + }); + } + + bigClass = (value) => { + this.setState({ + main_type: value + }) + } + + littleClass = (value) => { + this.setState({ + small_type: value + }) + } + + Selectthestudent = (value) => { + this.setState({ + trainee: value + }) + } + + SelectTheCommand = (e) => { + this.setState({ + webssh: e.target.value, + }); + + if (e.target.value === 2) { + this.setState({ + SelectTheCommandtype: true, + multi_webssh: false + }); + } else { + this.setState({ + SelectTheCommandtype: false, + multi_webssh: false + }); + } + } + + Selectpublic = (e) => { + this.setState({ + scopetype: false, + use_scope: e.target.value, + }); + if (e.target.value === 1) { + this.setState({ + scopetype: true + }); + } + + } + + Teacherscopy = (e) => { + let sum = "" + if (e.target.checked === false) { + sum = 0 + } else if (e.target.checked === true) { + sum = 1 + } + this.setState({ + can_copy: sum, + }); + } + + TeachersUbuntu = (e) => { + let sum = "" + if (e.target.checked === false) { + sum = 0 + } else if (e.target.checked === true) { + sum = 1 + } + this.setState({ + vnc: sum, + }); + } + + adduse_scopeinput = () => { + let {scope_partment} = this.state; + let array = scope_partment; + let newarray = "" + array.push(newarray) + this.setState({ + scope_partment: array, + }); + } + + shixunScopeInput = (e, id) => { + 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: "" + }); + } + + deleteScopeInput = (key) => { + let {scope_partment} = this.state; + let datalist = scope_partment; + datalist.splice(key, 1); + this.setState({ + scope_partment: datalist + }); + } + + //提交数据 + submit_new_shixun = () => { + const mdVal = this.taskpass_editormd.getValue(); + let {can_copy, main_type, name, scope_partment, small_type, trainee, use_scope, vnc, webssh, multi_webssh, TimePickervalue} = this.state; + let Url = `/shixuns.json` + if (name === "") { + this.setState({ + shixun_nametype: true + }) + this.props.showSnackbar("实训名称为空"); + $('html').animate({ + scrollTop: 10 + }, 1000); + return + } + if (main_type === "") { + this.setState({ + main_types: true + }) + $('html').animate({ + scrollTop: 700 + }, 1000); + this.props.showSnackbar("请选择技术平台大类别"); + + return + } + + if (use_scope === 1) { + if (scope_partment === undefined || scope_partment.length === 0) { + this.setState({ + scope_partmenttype: true + }) + $('html').animate({ + scrollTop: 900 + }, 1000); + this.props.showSnackbar("公开程度,指定单位为空"); + return + } + } + if (trainee === "") { + this.setState({ + trainee_types: true + }) + // $('html').animate({ + // scrollTop: 700 + // }, 1000); + this.props.showSnackbar("请选择发布信息"); + return + } + let newmulti_webssh = multi_webssh; + if (newmulti_webssh === true) { + newmulti_webssh = 1 + } else { + newmulti_webssh = "" + } + axios.post(Url, { + name: name, + can_copy: can_copy, + description: mdVal, + main_type: main_type, + scope_partment: scope_partment, + small_type: small_type, + trainee: trainee, + use_scope: use_scope, + vnc: vnc, + webssh: webssh, + multi_webssh: newmulti_webssh, + task_pass: 1, + opening_time: TimePickervalue + } + ).then((response) => { + if (response.status === 200) { + window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges"; + // window.open("/shixuns/"+response.data.shixun_identifier+"/challenges"); + } + }).catch((error) => { + console.log(error) + }) + } + + + shixunsfetch = (value, callback) => { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + currentValue = value; + + function fake() { + let departmentsUrl = `/shixuns/departments.json?q=` + currentValue; + axios.get(departmentsUrl).then((response) => { + callback(response.data.shools_name); + }).catch((error) => { + console.log(error) + }); + } + + timeout = setTimeout(fake, 300); + } + + shixunHandleSearch = (value) => { + this.shixunsfetch(value, departmentslist => this.setState({departmentslist})); + this.setState({ + onSearchvalue: "" + }) + } + + post_apply = () => { + this.setState({ + postapplyvisible: true + }) + } + sendsure_apply = () => { + let {languagewrite,systemenvironment,testcoderunmode} = this.state; + // console.log("点击确定") + // console.log("languagewrite"+languagewrite); + // console.log("systemenvironment"+systemenvironment); + // console.log("testcoderunmode"+testcoderunmode); + + // let attachment_ids = undefined + // if (this.state.fileList) { + // attachment_ids = this.state.fileList.map(item => { + // return item.response ? item.response.id : item.id + // }) + // } + if(languagewrite === undefined || languagewrite === "" ){ + this.props.showNotification(`请填写该镜像是基于什么语言`); + + return + } + if(systemenvironment === undefined || systemenvironment === ""){ + this.props.showNotification(`请填写该镜像是基于什么语言系统环境`); + + return; + + } + if(testcoderunmode === undefined || testcoderunmode === "") { + this.props.showNotification(`请填写该镜像中测试代码运行方式`); + + return; + + } + var attachment_ids=undefined; + if (this.state.fileList) { + attachment_ids = this.state.fileList.map(item => { + return item.response ? item.response.id : item.id + }) + } + if( attachment_ids === undefined || attachment_ids.length===0){ + this.props.showNotification(`请上传附件`); + + return; + } + // console.log("attachment_ids"+attachment_ids); + + // alert(languagewrite +" "+systemenvironment +" "+testcoderunmode + " "+attachment_ids); + + var data={ + language:languagewrite, + runtime:systemenvironment, + run_method:testcoderunmode, + attachment_id:attachment_ids[0], + } + var url =`/shixuns/apply_shixun_mirror.json`; + axios.post(url,data + ).then((response) => { + + try { + if (response.data) { + // const { id } = response.data; + // if (id) { + if(this.state.file !== undefined){ + console.log("549"); + this.deleteAttachment(this.state.file); + this.setState({ + file:undefined, + languagewrite:"", + systemenvironment:"", + testcoderunmode:"", + }) + }else { + this.setState({ + file:undefined, + languagewrite:"", + systemenvironment:"", + testcoderunmode:"", + }) + } + this.props.showNotification('提交成功!'); + // this.props.history.push(`/courses/${cid}/graduation_topics`); + // } + } + }catch (e) { + + } + + }) + + } + sendhideModaly = () => { + this.setState({ + postapplyvisible: false, + }) + if(this.state.file !== undefined){ + console.log("580"); + this.deleteAttachment(this.state.file); + this.setState({ + file:undefined, + languagewrite:"", + systemenvironment:"", + testcoderunmode:"", + }) + }else { + this.setState({ + file:undefined, + languagewrite:"", + systemenvironment:"", + testcoderunmode:"", + }) + } + } + sendsure_applyvalues = (e) => { + this.setState({ + sendsure_applyvalue: e.target.value + }) + } + yeshidemodel = () => { + this.setState({ + postapplytitle: false + }) + } + + SelectTheCommandonChange = (e) => { + this.setState({ + multi_webssh: e.target.checked + }) + } + + + bigopen = () => { + this.setState({ + opers: true + }) + } + + bigopens = () => { + this.setState({ + opers: false, + operss: false, + opensmail: false + }) + + } + + bigopensmal = () => { + this.setState({ + opensmail: true + }) + } + + sbigopen = () => { + this.setState({ + operss: true + }) + } + + // sbigopens=()=>{ + // this.setState({ + // operss:false + // }) + // } + + onChangeTimePicker = (value, dateString) => { + this.setState({ + TimePickervalue: dateString + }) + } + // 附件相关 START + handleChange = (info) => { + console.log("handleChange1"); + let fileList = info.fileList; + this.setState({ fileList }); + } + onAttachmentRemove = (file) => { + confirm({ + title: '确定要删除这个附件吗?', + okText: '确定', + cancelText: '取消', + // content: 'Some descriptions', + onOk: () => { + console.log("665") + this.deleteAttachment(file) + }, + onCancel() { + console.log('Cancel'); + }, + }); + return false; + } + deleteAttachment = (file) => { + console.log(file); + let id=file.response ==undefined ? file.id : file.response.id + const url = `/attachments/${id}.json` + axios.delete(url, { + }) + .then((response) => { + if (response.data) { + const { status } = response.data; + if (status == 0) { + // console.log('--- success') + + this.setState((state) => { + const index = state.fileList.indexOf(file); + const newFileList = state.fileList.slice(); + newFileList.splice(index, 1); + return { + fileList: newFileList, + }; + }); + } + } + }) + .catch(function (error) { + console.log(error); + }); + } + + + handleSubmit=()=>{ + // console.log(this.state.languagewrite) + // console.log(this.state.systemenvironment) + // console.log(this.state.testcoderunmode) + var attachment_ids; + if (this.state.fileList) { + attachment_ids = this.state.fileList.map(item => { + return item.response ? item.response.id : item.id + }) + } + // console.log(attachment_ids); + // var data={ + // language:"", + // runtime:"", + // run_method:"", + // attachment_id:"", + // } + // axios.post(url,data + // ).then((response) => { + // if (response.data) { + // // const { id } = response.data; + // // if (id) { + // this.props.showNotification('提交成功!'); + // // this.props.history.push(`/courses/${cid}/graduation_topics`); + // // } + // } + // }) + + + + } + render() { + const { getFieldDecorator } = this.props.form; + const thiss=this; + let {testcoderunmode ,systemenvironment,languagewrite, 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 options + if (departmentslist != undefined) { + options = this.state.departmentslist.map((d, k) => { + return ( + + ) + }) + } + const uploadProps = { + width: 600, + fileList, + multiple: true, + // https://github.com/ant-design/ant-design/issues/15505 + // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 + // showUploadList: false, + action: `${getUrl()}/api/attachments.json`, + onChange: this.handleChange, + onRemove: this.onAttachmentRemove, + beforeUpload: (file) => { + // console.log('beforeUpload', file.name); + const isLt150M = file.size / 1024 / 1024 < 50; + if (!isLt150M) { + this.props.showNotification(`文件大小必须小于50MB`); + + } + if(thiss.state.file !== undefined){ + console.log("763") + thiss.deleteAttachment(thiss.state.file); + thiss.setState({ + file:file + }) + }else { + thiss.setState({ + file:file + }) + } + + console.log("handleChange2"); + return isLt150M; + }, + } + // const uploadProps = { + // width: 600, + // fileList, + // multiple: true, + // // https://github.com/ant-design/ant-design/issues/15505 + // // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 + // // showUploadList: false, + // action: `${getUrl()}/api/attachments.json`, + // onChange: this.handleChange, + // onRemove: this.onAttachmentRemove, + // beforeUpload: (file) => { + // // console.log('beforeUpload', file.name); + // const isLt50M = file.size / 1024 / 1024 < 50; + // if (!isLt50M) { + // message.error('文件大小必须小于150MB!'); + // } + // return isLt50M; + // }, + // }; + return ( + +
    +
    +
    + +
    +

    + 创建实训 + 实训制作指南 +

    + +
    +

    实训名称

    +
    + * +
    + + + 必填项 + +
    + +
    +
    + +
    + + +
    + +

    简介

    + +
    +
    + +
    +
    +

    +

    +
    + +
    +

    技术平台

    +
    + * +
    + +

    + 列表中没有? + 申请新建 +

    + + + {/*
    */} +
    +
  • + + +
  • +
  • + + +
  • + +
  • + + + +
  • + +
  • + +
    + {/**/} + {/* {*/} + {/* getFieldDecorator('file',{*/} + {/* rules:[{*/} + {/* }]*/} + {/* })(*/} + + + 上传附件 + (单个文件50M以内) + + + {/* )*/} + {/* }*/} + {/**/} +
    + +
  • +
  • + + + this.sendhideModaly()} + >取消 + + +
  • +
    +
    + {/**/} +
    + + +
    +

    新建申请已提交,请等待管理员的审核

    +
  • 我们将在1-2个工作日内与您联系 +
  • +
    +
    + 知道啦 +
    +
    +
    +
    +
    + +
    +

    请在配置页面完成后续的评测脚本设置操作

    +
    + 必填项 +
    +
    +
    + + +
    +

    命令行

    +
    + + 无命令行窗口 (选中则不给学员的实践任务提供命令窗口) + 命令行练习窗口 (选中则给学员提供用于练习操作的命令行窗口) + 命令行评测窗口 (选中则给学员提供用于关卡评测的命令行窗口) + + 多个命令行窗口(选中则允许学员同时开启多个命令行窗口) + + +
    +
    + + +
    +

    公开程度

    +
    + + 对所有公开 (选中则所有已被试用授权的用户可以学习) + 对指定单位公开 (选中则下方指定单位的已被试用授权的用户可以学习) + + +
    +
    +
    +
    +
    + +
    + (搜索选中添加单位名称) + {/*+ 添加*/} +
    +
    + +
    +
    + { + scope_partment === undefined ? "" : scope_partment.map((item, key) => { + return ( +
  • {item} + this.deleteScopeInput(key)}>× +
  • + ) + }) + } +
    + {/*{*/} + {/*scope_partment===undefined?"":scope_partment.map((item,key)=>{*/} + {/*return(*/} + {/*
    */} + {/*this.deleteScopeInput(key)} style={{ color: 'rgba(0,0,0,.25)' }} />}*/} + {/*value={item}*/} + {/*/>*/} + {/*
    */} + + {/*)*/} + {/*})*/} + {/*}*/} +
    + + + + 请选择需要公开的单位 + +
    +
    +
    +
    + + +
    +

    发布信息

    +
    +
    + *面向学员: +
    + +
    + 实训难易度定位,不限定用户群体 +
    + 必填项 +
    +
    +
    +
  • + 复制: + + +
  • +
    + 开启时间: +
  • + + +
  • +
    +
    + {/*
    */} + {/*

    VNC图形化

    */} + {/*
  • */} + {/**/} + {/**/} + {/*
  • */} + {/*
    */} + + +
    + 提交 + 取消 +
    + + +
    +
    +
    + + ); + } +} +const NewshixunsNew = Form.create({ name: 'newshixunsnew' })(Newshixuns); +export default SnackbarHOC()(TPMIndexHOC(NewshixunsNew)); + + + + + + From b1a27b3e2c03826fc152aee9d7c800ecff4dc1ed Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 26 Jun 2019 17:04:39 +0800 Subject: [PATCH 204/964] width --- .../src/modules/courses/busyWork/CommonWorkAppraise.js | 2 +- public/react/src/modules/courses/busyWork/CommonWorkList.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js index 472cf57b5..5d4a34f6f 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js @@ -190,7 +190,7 @@ class CommonWorkAppraise extends Component{
    内容
    -
    +
    {attachments.map((item,key)=>{ diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 31532f78e..2243310a2 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -80,7 +80,7 @@ function buildColumns(that, student_works) { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', - maxWidth: '98px' + width: '98px' }} title={text}> {/* */} @@ -99,7 +99,7 @@ function buildColumns(that, student_works) { {record.student_id} ), @@ -234,7 +234,7 @@ function buildColumns(that, student_works) { + isNiPing ? `你的评阅分数:${record.student_score}分` :
    {record.student_comment_count &&
    {`${record.student_comment_count}名学生进行了匿评`}
    }
    有效平均分:{record.student_score}分
    From fa26030c9233770c59b18ae82799ab467cdf88ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 26 Jun 2019 17:35:57 +0800 Subject: [PATCH 205/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/poll/PollNew.js | 5686 ++++++++--------- .../TraineetraininginformationModal.js | 21 +- 2 files changed, 2863 insertions(+), 2844 deletions(-) diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 7b936a0b6..392acf57c 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -1,2844 +1,2844 @@ -import React, {Component} from "react"; -import {Form, Input, Tooltip, Checkbox, Radio, Select, message, Modal, Button} from 'antd' -import {WordsBtn, ActionBtn} from 'educoder' -import '../css/members.css' -import "../common/formCommon.css" - -import './pollStyle.css' -import '../css/Courses.css' -import axios from 'axios' -import moment from "../new/CoursesNew"; -import Modals from "../../modals/Modals"; - - -const TextArea = Input.TextArea -const RadioGroup = Radio.Group -const CheckboxGroup = Checkbox.Group -const Option = Select.Option; -const maps = {1: "未发布", 2: "提交中", 3: "已截止"} -const confirm = Modal.confirm; - -class PollNew extends Component { - // 问卷新建和编辑 - // - // * addonAfter 字数限制 - // * q_counts 题目总数 - // * mysingles 单选题数量 - // * mydoubles 多选题数量 - // * mymainsint 主观题数量 - // * adddom 添加编辑的数据 页面点击新增题目 - // * editentry 编辑条目 新增的题目点击到条目中 - //* questionnair 问卷是否存在 默认不存在 - // * - - constructor(props) { - super(props); - this.state = { - visible: false, - poll_questions: [], - user_permission: "", - addonAfter: 60, - addonAftertwo: 100, - mysingles: 0, - mydoubles: 0, - mymainsint: 0, - adddom: [], - editentry: [], - questionnair: false, - polls_name: undefined, - polls_nametest: "", - polls_description: "", - polls_descriptiontest: "", - storagedesc:"", - storagedesctwo:"", - coursesId: "", - pollid: undefined, - polls_status: undefined, - q_countst: 0, - Newedit: true, - Insertposition: undefined, - Modalstype: false, - mysave: false, - readOnlys: "readOnly", - problemtopic: null, - problemtopicbool: false, - newoption: false, - cancellation: false, - } - // console.log("试卷新建和编辑"); - // console.log(JSON.stringify(props)); - - } - - changeTopicName = (e) => { - let num = 60 - parseInt(e.target.value.length); - this.setState({ - addonAfter: num < 0 ? 0 : num - }) - this.setState({ - polls_nametest: e.target.value - }) - } - - - changeTopicNametwo = (e) => { - // console.log("获取的值" + e.target.value); - let num = 100 - parseInt(e.target.value.length); - this.setState({ - addonAftertwo: num < 0 ? 0 : num - }) - this.setState({ - polls_descriptiontest: e.target.value - }) - } - - // 初始化数据 - componentDidMount = () => { - console.log("componentDidMount 50") - if (this.props.match.params.news !== undefined) { - if (this.props.match.params.news === "new") { - this.state.Newedit === true; - this.setState({ - Newedit: true, - mysave: true, - readOnlys: "", - cancellation: true, - }) - } else { - this.Initializatio_data(); - this.state.Newedit === false; - this.setState({ - Newedit: false, - mysave: false, - readOnlys: "readOnly", - }) - } - } - - - // this.getPollInfo(); - - } - //获取权限 - // getPollInfo(){ - // // console.log(this.props.match); - // let pollId=this.props.match.params.pollId; - // let url=`/polls/${pollId}/common_header.json` - // axios.get(url).then((result)=>{ - // if(result.status==200){ - // this.setState({ - // pollDetail:result.data, - // user_permission:result.data.user_permission - // }) - // } - // }).catch((error)=>{ - // console.log(error); - // }) - // } - //初始化请求网络 - Initializatio_data = () => { - console.log("Initializatio_data 582") - //课堂id - let coursesId = this.props.match.params.coursesId; - //时间id - let pollid = this.props.match.params.pollid; - console.log(pollid); - // let coursesId = 557; - if (pollid === undefined) { - // console.log("没有问卷新建问卷~~~") - // let coursesId=this.props.match.params.coursesId; - // // to={`/courses/${coursesId}/polls/new`} - // - // const urll = `/courses/${coursesId}/polls/new.json` - // axios.get(urll).then((result) => { - // if (result.status === 200) { - // console.log(urll) - // console.log("问卷新建成功") - // console.log(JSON.stringify(result)) - // // var path=`/courses/${coursesId}/polls/new`; - // // - // // this.props.history.push({ pathname: path, state: { } }); - // } - // }).catch((error) => { - // console.log(error) - // }) - - // const urlls = `/courses/${coursesId}/polls.json` - // axios.post(urlls,{ - // polls_name: "这是标题", - // polls_description:"这是标题须知" - // }).then((result)=>{ - // console.log("创建问卷++++++") - // console.log(result) - // try { - // if(result.data.status===0){ - // console.log("创建问卷") - // console.log(JSON.stringify(result.data)) - // } - // }catch (e) { - // - // } - // - // }) - //没有问卷 - this.setState({ - projects: [], - polls_name: "", - polls_description: "", - poll_questions: [], - question_types: [], - pollid: undefined, - mysingles: 0, - mydoubles: 0, - mymainsint: 0, - polls_nametest: "", - polls_descriptiontest: "", - coursesId: 0, - questionnair: false - }) - } else { - const url = `/polls/${pollid}/edit.json`; - axios.get(url).then((result) => { - if (result !== undefined) - - // console.log("有问卷~~~") - // if (result.status === 200) { - // console.log(JSON.stringify(result.data)) - this.props.form.setFieldsValue({ - polls_nametest: result.data.poll.polls_name, - polls_descriptiontest: result.data.poll.polls_description, - }); - this.setState({ - projects: result.data, - pollid: pollid, - polls_status: result.data.poll.polls_status, - polls_name: result.data.poll.polls_name, - polls_description: result.data.poll.polls_description, - poll_questions: result.data.poll_questions, - question_types: result.data.question_types, - mysingles: result.data.question_types.q_singles, - mydoubles: result.data.question_types.q_doubles, - mymainsint: result.data.question_types.q_mains, - polls_nametest: result.data.poll.polls_name, - polls_descriptiontest: result.data.poll.polls_description, - questionnair: true, - }) - console.log(this.state.polls_nametest) - console.log(this.state.polls_descriptiontest) - // } - }).catch((error) => { - console.log(error) - }) - } - - } - - //重新获取数据 - thisinitializationdatanew = () => { - var pollidsy = null; - if (this.state.pollid !== undefined) { - pollidsy = this.state.pollid; - if (pollidsy === null || pollidsy === undefined) { - pollidsy = this.props.match.params.pollid; - } - } - - if (pollidsy === null || pollidsy === undefined) { - return - } - - const url = `/polls/${pollidsy}/edit.json`; - axios.get(url).then((result) => { - if (result !== undefined) - - // console.log("有问卷~~~") - // if (result.status === 200) { - // console.log(JSON.stringify(result.data)) - this.setState({ - projects: result.data, - pollid: pollidsy, - polls_status: result.data.poll.polls_status, - polls_name: result.data.poll.polls_name, - polls_description: result.data.poll.polls_description, - poll_questions: result.data.poll_questions, - question_types: result.data.question_types, - mysingles: result.data.question_types.q_singles, - mydoubles: result.data.question_types.q_doubles, - mymainsint: result.data.question_types.q_mains, - polls_nametest: result.data.poll.polls_name, - polls_descriptiontest: result.data.poll.polls_description, - questionnair: true, - }) - - // } - }).catch((error) => { - console.log(error) - }) - } - //新建问卷 - newword = () => { - if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { - this.props.showNotification(`请输入标题`); - return - } - let coursesId = this.props.match.params.coursesId; - const urlls = `/courses/${coursesId}/polls.json` - axios.post(urlls, { - polls_name: this.state.polls_nametest, - polls_description: this.state.polls_descriptiontest - }).then((result) => { - if (result.data.status === 0) { - this.state.Newedit === false; - // this.props.showNotification(`试卷创建成功`); - this.setState({ - pollid: result.data.data.id, - Newedit: false, - }) - this.props.history.push(`/courses/${this.props.match.params.coursesId}/polls/${result.data.data.id}/detail?tab=2`) - } - }) - } - //添加单选题目 - addmysingles = () => { - - if (this.state.newoption === true) { - this.setState({ - newoption: false - }) - } - - var Insertposition = this.state.poll_questions.length; - // console.log(JSON.stringify(this.state.poll_questions)); - for (var i = 0; i < this.state.poll_questions.length; i++) { - if (this.state.poll_questions[i].question.question_type === 1) { - Insertposition = i; - } - - } - this.addMytopic(1, this.state.pollid, Insertposition, false, 0); - // } - } - - //添加多选题目 - addmydoubles = () => { - console.log("addmymainsint 70") - if (this.state.newoption === true) { - this.setState({ - newoption: false - }) - } - - var Insertposition = this.state.poll_questions.length; - // console.log(JSON.stringify(this.state.poll_questions)); - for (var i = 0; i < this.state.poll_questions.length; i++) { - if (this.state.poll_questions[i].question.question_type === 2) { - Insertposition = i; - } - - - } - this.addMytopic(2, this.state.pollid, Insertposition, false, 0); - - // } - } - - //添加主观题目 - addmymainsint = () => { - - var Insertposition = this.state.poll_questions.length; - // console.log(JSON.stringify(this.state.poll_questions)); - for (var i = 0; i < this.state.poll_questions.length; i++) { - if (this.state.poll_questions[i].question.question_type === 3) { - Insertposition = i; - } - - - } - - this.addMytopic(3, this.state.pollid, Insertposition, false, 0); - // } - } - - //编辑方法 - adddomedit = (object) => { - console.log("adddomedit 76"); - if (this.state.q_countst > 0) { - this.props.showNotification(`不能同时编辑两题`); - - return; - } - var anserbool = false; - this.setState({ - q_countst: 1, - }) - window.scrollTo(0, this.refs.targetElement.offsetTop) - let {adddom} = this.state; - // var arr =new Object(objects); - // console.log(arr) - // adddom.push(arr); - var question = {}; - var Insertposition = this.state.poll_questions.length; - if (object.question.question_type === 1) { - var answers = []; - var questiontwo = {}; - ///////////////////////////daying - for (var y = 0; y < object.question.answers.length; y++) { - var answerstwo; - if (object.question.answers[y].answer_text === "其他") { - answerstwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - anserbool = true; - } else { - answerstwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - } - answers.push(answerstwo); - - - } - // 插入单选题 - questiontwo = { - // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, - "id": object.question.id, - "is_necessary": object.question.is_necessary, - "question_number": 1, - "question_title": object.question.question_title, - "question_type": 1, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - adddom.push(question); - for (var i = 0; i < this.state.poll_questions.length; i++) { - if (this.state.poll_questions[i].question.question_type === 1) { - Insertposition = i; - } - } - } else if (object.question.question_type === 2) { - //插入多选题 - var answers = []; - var questiontwo = {}; - - for (var y = 0; y < object.question.answers.length; y++) { - if (object.question.answers[y].answer_text === "其他") { - answerstwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - anserbool = true; - } else { - answerstwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - } - answers.push(answerstwo); - } - questiontwo = { - "id": object.question.id, - "is_necessary": object.question.is_necessary, - "question_number": 2, - "question_title": object.question.question_title, - "question_type": 2, - "max_choices": object.question.max_choices, - "min_choices": object.question.min_choices, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - adddom.push(question); - for (var i = 0; i < this.state.poll_questions.length; i++) { - if (this.state.poll_questions[i].question.question_type === 2) { - Insertposition = i; - } - } - } else if (object.question.question_type === 3) { - //插入主观题 - var answers = []; - var questiontwo = {}; - - if (object.question.answers.length > 0) { - for (var y = 0; y < object.question.answers.length; y++) { - var answerstwo; - if (object.question.answers[y].answer_text === "其他") { - answerstwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - } else { - answerstwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - } - answers.push(answerstwo); - } - } - questiontwo = { - "id": object.question.id, - "is_necessary": object.question.is_necessary, - "question_number": 3, - "question_title": object.question.question_title, - "question_type": 3, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - adddom.push(question); - for (var i = 0; i < this.state.poll_questions.length; i++) { - if (this.state.poll_questions[i].question.question_type === 3) { - Insertposition = i; - } - } - } - this.setState({ - adddom: adddom, - newoption: anserbool, - Insertposition: Insertposition - }) - - } - - //新增添加题目 有new - addMytopic = (index, pollid, Insertposition, Whether, id) => { - //Whether 是否插入 - // console.log("id") - // console.log(id) - // console.log("Whether") - // console.log(Whether) - console.log("addMytopic 90") - if (this.state.q_countst > 0) { - this.props.showNotification(`不能同时编辑两题`); - - return; - } - this.state.Insertposition = Insertposition; - var Whethername = null; - if (Whether === true) { - Whethername = id; - } - this.setState({ - Insertposition: Insertposition, - q_countst: 1, - }) - window.scrollTo(0, this.refs.targetElement.offsetTop) - var arrr = this.state.adddom; - let newarrr = [...arrr]; - - var arr = this.state.poll_questions; - let newarr = [...arr]; - - if (newarr.length > 0) { - if (index === 1) { - // 插入单选题 - // console.log(this.state.poll_questions[newarr.length - 1].question.id); - var question = {} - var questiontwo = { - // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, - "id": this.state.poll_questions[newarr.length - 1].question.id + 1, - "is_necessary": 1, - "question_number": 1, - "question_title": "", - "question_type": 1, - "new": "new", - "answers": [ - {"answer_id": 1, "answer_position": 1, "answer_text": ""}, - {"answer_id": 2, "answer_position": 2, "answer_text": ""}, - {"answer_id": 3, "answer_position": 3, "answer_text": ""}, - {"answer_id": 4, "answer_position": 4, "answer_text": ""}, - // {"answer_id": 5, "answer_position": 5, "answer_text": "其他"}, - ] - }; - question = {"question": questiontwo}; - newarrr.push(question); - - this.setState({ - adddom: newarrr, - problemtopic: Whethername, - problemtopicbool: Whether, - }) - - } else if (index === 2) { - //插入多选题 - var question = {} - var questiontwo = { - "id": this.state.poll_questions[newarr.length - 1].question.id + 1, - "is_necessary": 1, - "question_number": 2, - "question_title": "", - "question_type": 2, - "max_choices": 0, - "min_choices": 0, - "new": "new", - "answers": [ - {"answer_id": 1, "answer_position": 1, "answer_text": ""}, - {"answer_id": 2, "answer_position": 2, "answer_text": ""}, - {"answer_id": 3, "answer_position": 3, "answer_text": ""}, - {"answer_id": 4, "answer_position": 4, "answer_text": ""}, - // {"answer_id": 5, "answer_position": 5, "answer_text": "其他"}, - ] - }; - question = {"question": questiontwo}; - newarrr.push(question); - - this.setState({ - adddom: newarrr, - problemtopic: Whethername, - problemtopicbool: Whether, - }) - - } else if (index === 3) { - //插入主观题 - // console.log(this.state.poll_questions[newarr.length - 1].question.id); - var question = {} - var questiontwo = { - "id": this.state.poll_questions[newarr.length - 1].question.id + 1, - "is_necessary": 1, - "question_number": 3, - "question_title": "", - "question_type": 3, - "new": "new", - "answers": [] - }; - question = {"question": questiontwo}; - newarrr.push(question); - this.setState({ - adddom: newarrr, - problemtopic: Whethername, - problemtopicbool: Whether, - }) - - } - } else { - /////上面视图全部删除后 要加载的 - if (index === 1) { - // 插入单选题 - var id; - try { - id = this.state.poll_questions[newarr.length - 1].question.id + 1 - } catch (e) { - id = 1; - } - var questiontwo = { - // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, - "id": id, - "is_necessary": 1, - "question_number": 1, - "question_title": "", - "question_type": 1, - "new": "new", - "answers": [ - {"answer_id": 1, "answer_position": 1, "answer_text": ""}, - {"answer_id": 2, "answer_position": 2, "answer_text": ""}, - {"answer_id": 3, "answer_position": 3, "answer_text": ""}, - {"answer_id": 4, "answer_position": 4, "answer_text": ""}, - // {"answer_id": 5, "answer_position": 5, "answer_text": "其他"}, - ] - }; - question = {"question": questiontwo}; - newarrr.push(question); - - this.setState({ - adddom: newarrr, - problemtopic: Whethername, - problemtopicbool: Whether, - }) - - } else if (index === 2) { - //插入多选题 - var id; - try { - id = this.state.poll_questions[newarr.length - 1].question.id + 1 - } catch (e) { - id = 1; - } - var questiontwo = { - "id": id, - "is_necessary": 1, - "question_number": 2, - "question_title": "", - "question_type": 2, - "max_choices": 0, - "min_choices": 0, - "new": "new", - "answers": [ - {"answer_id": 1, "answer_position": 1, "answer_text": ""}, - {"answer_id": 2, "answer_position": 2, "answer_text": ""}, - {"answer_id": 3, "answer_position": 3, "answer_text": ""}, - {"answer_id": 4, "answer_position": 4, "answer_text": ""}, - // {"answer_id": 5, "answer_position": 5, "answer_text": "其他"}, - ] - }; - question = {"question": questiontwo}; - newarrr.push(question); - - this.setState({ - adddom: newarrr, - problemtopic: Whethername, - problemtopicbool: Whether, - }) - - } else if (index === 3) { - //插入主观题 - var id; - try { - id = this.state.poll_questions[newarr.length - 1].question.id + 1 - } catch (e) { - id = 1; - } - var questiontwo = { - "id": id, - "is_necessary": 1, - "question_number": 3, - "question_title": "", - "question_type": 3, - "new": "new", - "answers": [] - }; - question = {"question": questiontwo}; - newarrr.push(question); - this.setState({ - adddom: newarrr, - problemtopic: Whethername, - problemtopicbool: Whether, - }) - } - } - } - - //删除指定条目 - deleteadddom = (indexo) => { - console.log("deleteadddom 259") - var arr = this.state.adddom; - let newarr = [...arr]; - - newarr.splice(indexo, 1); - this.setState({ - adddom: newarr, - q_countst: 0, - problemtopic: null, - problemtopicbool: false, - }) - } - //保存并继续 - //保存并继续,即提交本题的新建并继续创建一个相同的题(该新题处于编辑模式,题目和选项不要清空) - deleteadddomtwo = (indexo, object) => { - var thiss = this; - this.setState({ - q_countst: 1, - }) - var poll_questionslength = this.state.poll_questions.length; - // console.log("deleteadddomtwo|||||||||||||||||||||||||||||||||||||||||\\"); - // console.log(indexo); - // console.log(object); - // console.log(object.question.question_type); - let arr = this.state.adddom; - let arrpoll = this.state.poll_questions; - let newarr = [...arr]; - let newarrpoll = [...arrpoll]; - - //选项内容不能为空 - let max = 0; - let maxtie = newarr[indexo].question.answers.length; - for (var k = 0; k < newarr[indexo].question.answers.length; k++) { - try { - if (newarr[indexo].question.answers[k].answer_text != undefined) { - if (newarr[indexo].question.answers[k].answer_text === "") { - max = max + 1; - } - } - } catch (e) { - console.log("PollNew281") - console.log(e) - } - } - if (newarr[indexo].question.question_title === "") { - this.props.showNotification(`题目不能为空`); - - return - } - if (max > 0) { - if (object.question.question_type === 1) { - this.props.showNotification(`选项内容不能为空`); - - return - } else if (object.question.question_type === 2) { - this.props.showNotification(`选项内容不能为空`); - - return - } - - } - if (maxtie < 2) { - if (object.question.question_type === 1) { - this.props.showNotification(`选项不能少于2个!`); - - return - } else if (object.question.question_type === 2) { - this.props.showNotification(`选项不能少于2个!`); - - return - } - - - } - - if (object.question.question_type === 2) { - if (object.question.max_choices > 0) { - if (object.question.min_choices < 2) { - this.props.showNotification(`可选最小不能少于2个`); - - return; - - } - } - - } - if (object.question.new === "new") { - // 根据数组里面的new 来确定是否是新增还是 修改 - //添加道数组上 - //不能共用数组 所以自己写个新数组 然后push 上面卷子中 - var question = {}; - if (object.question.question_type === 1) { - - var questiontwo = {}; - var other = []; - var option = []; - var answerstwos = []; - var answerstwoss = []; - ///////////////////////////daying - // 这个是装选项和其他的 - for (var y = 0; y < object.question.answers.length; y++) { - if (object.question.answers[y].answer_text === "其他") { - var dataone = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - other.push(object.question.answers[y].answer_text); - answerstwos.push(dataone); - } else { - var datatwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - option.push(object.question.answers[y].answer_text) - answerstwoss.push(datatwo); - } - - - } - - var arrc = option.concat(other); - var answers = answerstwoss.concat(answerstwos); - // 插入单选题 - // var id - // try { - // id = newarrpoll[newarrpoll.length - 1].question.id + 1; - // } catch (e) { - // id = 1; - // } - questiontwo = { - // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, - "id": null, - "is_necessary": object.question.is_necessary, - "question_number": 1, - "question_title": object.question.question_title, - "question_type": 1, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - var insindex = null; - // if (poll_questionslength !== thiss.state.Insertposition) { - // insindex = newarrpoll[thiss.state.Insertposition].question.id; - // } - if (this.state.problemtopicbool === true) { - insindex = this.state.problemtopic; - } - this.createquestionsandanswers(object, 1, arrc, null, 0, 0, insindex); - // newarrpoll.push(question); - newarrpoll.splice(thiss.state.Insertposition, 0, question); - - } else if (object.question.question_type === 2) { - //插入多选题 - if (object.question.max_choices < object.question.min_choices) { - this.props.showNotification(`可选的最大限制不能小于最小限制`); - - return; - } - - var questiontwo = {}; - var other = []; - var option = []; - var answerstwos = []; - var answerstwoss = []; - for (var y = 0; y < object.question.answers.length; y++) { - if (object.question.answers[y].answer_text === "其他") { - var dataone = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - other.push(object.question.answers[y].answer_text); - answerstwos.push(dataone); - } else { - var datatwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - option.push(object.question.answers[y].answer_text) - answerstwoss.push(datatwo); - } - } - var arrc = option.concat(other); - var answers = answerstwoss.concat(answerstwos); - // var id - // try { - // id = newarrpoll[newarrpoll.length - 1].question.id + 1; - // } catch (e) { - // id = 1; - // } - questiontwo = { - "id": null, - "is_necessary": object.question.is_necessary, - "question_number": 2, - "question_title": object.question.question_title, - "question_type": 2, - "max_choices": object.question.max_choices, - "min_choices": object.question.min_choices, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - var insindex = null; - if (this.state.problemtopicbool === true) { - insindex = this.state.problemtopic; - } - this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, insindex); - //插入多选题 - // if (object.question.max_choices > arrc.length) { - // // console.log("选择题的最大可选项不能大于选项数") - // this.props.showNotification(`选择题的最大可选项不能大于选项数`); - // - // return; - // } - // if (object.question.min_choices === 0) { - // // console.log("选择题的最大可选项不能小于2项目") - // this.props.showNotification(`选择题的最大可选项不能小于2项目`); - // - // return; - // - // } - // newarrpoll.push(question); - newarrpoll.splice(thiss.state.Insertposition, 0, question); - } else if (object.question.question_type === 3) { - //插入主观题 - var answers = []; - var questiontwo = {}; - var answerstwos = []; - var answerstwoss = []; - if (object.question.answers.length > 0) { - for (var y = 0; y < object.question.answers.length; y++) { - var answerstwo; - if (object.question.answers[y].answer_text === "其他") { - var dataone = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - answerstwos.push(dataone); - } else { - var datatwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - answerstwoss.push(datatwo); - } - } - } - - answers = answerstwoss.concat(answerstwos); - // var id - // try { - // id = newarrpoll[newarrpoll.length - 1].question.id + 1; - // } catch (e) { - // id = 1; - // } - questiontwo = { - "id": null, - "is_necessary": object.question.is_necessary, - "question_number": 3, - "question_title": object.question.question_title, - "question_type": 3, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - // var insindex = null; - // if (poll_questionslength !== thiss.state.Insertposition) { - // insindex = newarrpoll[thiss.state.Insertposition].question.id; - // } - //主观题不需要可选选项 - var insindex = null; - if (this.state.problemtopicbool === true) { - insindex = this.state.problemtopic; - } - this.createquestionsandanswers(object, 3, null, null, 0, 0, insindex); - // newarrpoll.push(question); - newarrpoll.splice(thiss.state.Insertposition, 0, question); - } - //////////////////////////////////////////////////////////////////////////////////////////////////// 上面是新增 - } else { - ///////////////////////////////////////////////////////////////////////////////////////////////////修改点了编辑 - console.log("点了编辑") - var uuk = -1 - //这个地方判断 点了编辑上面题目又把他删除了 保存的时候就只能是插入新增了 - for (var uk = 0; uk < newarrpoll.length; uk++) { - if (object.question.id === newarrpoll[uk].question.id) { - uuk = uk; - } - } - - - var question = {}; - if (object.question.question_type === 1) { - var questiontwo = {}; - var other = []; - var option = []; - var answerstwos = []; - var answerstwoss = []; - ///////////////////////////daying - //这个装选项和其他的 - for (var y = 0; y < object.question.answers.length; y++) { - if (object.question.answers[y].answer_text === "其他") { - var dataone = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - other.push(object.question.answers[y].answer_text); - answerstwos.push(dataone); - } else { - var datatwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - option.push(object.question.answers[y].answer_text) - answerstwoss.push(datatwo); - } - - - } - var arrc = option.concat(other); - var answers = answerstwoss.concat(answerstwos); - // 插入单选题 - questiontwo = { - // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, - "id": object.question.id, - "is_necessary": object.question.is_necessary, - "question_number": 1, - "question_title": object.question.question_title, - "question_type": 1, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - if (uuk !== -1) { - // console.log("修改") - this.edittotheserver(object, 1, arrc, null, 0, 0); - newarrpoll.splice(uuk, 1, question); - } else { - // console.log("他原来的删除掉了") - this.createquestionsandanswers(object, 1, arrc, null, 0, 0, object.question.id); - newarrpoll.push(question); - } - newarr[indexo].question.new = "new" - // console.log(newarrpoll) - } else if (object.question.question_type === 2) { - //插入多选题 - - if (object.question.max_choices < object.question.min_choices) { - this.props.showNotification('可选的最大限制不能小于最小限制!'); - - return; - } - var questiontwo = {}; - var other = []; - var option = []; - var answerstwos = []; - var answerstwoss = []; - for (var y = 0; y < object.question.answers.length; y++) { - if (object.question.answers[y].answer_text === "其他") { - var dataone = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - other.push(object.question.answers[y].answer_text); - answerstwos.push(dataone); - } else { - var datatwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - option.push(object.question.answers[y].answer_text) - answerstwoss.push(datatwo); - } - } - var arrc = option.concat(other); - var answers = answerstwoss.concat(answerstwos); - questiontwo = { - "id": object.question.id, - "is_necessary": object.question.is_necessary, - "question_number": 2, - "question_title": object.question.question_title, - "question_type": 2, - "max_choices": object.question.max_choices, - "min_choices": object.question.min_choices, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - //插入多选题 - // if (object.question.max_choices > arrc.length) { - // // console.log("选择题的最大可选项不能大于答案数") - // this.props.showNotification('选择题的最大可选项不能大于选项数!'); - // - // return; - // } - // if (object.question.min_choices === 0) { - // // console.log("选择题的最大可选项不能小于2项目") - // this.props.showNotification('选择题的最大可选项不能小于2项目!'); - // - // return; - // - // } - if (uuk !== -1) { - console.log("修改") - this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices); - newarrpoll.splice(uuk, 1, question); - } else { - console.log("删除") - this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, object.question.id); - newarrpoll.push(question); - } - console.log(newarrpoll) - newarr[indexo].question.new = "new" - } else if (object.question.question_type === 3) { - //插入主观题 - var answers = []; - var questiontwo = {}; - - if (object.question.answers.length > 0) { - for (var y = 0; y < object.question.answers.length; y++) { - var answerstwo; - if (object.question.answers[y].answer_text === "其他") { - answerstwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - } else { - answerstwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - } - answers.push(answerstwo); - } - } - questiontwo = { - "id": object.question.id, - "is_necessary": object.question.is_necessary, - "question_number": 3, - "question_title": object.question.question_title, - "question_type": 3, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - - if (uuk !== -1) { - console.log("修改") - this.edittotheserver(object, 3, null, null, 0, 0); - newarrpoll.splice(uuk, 1, question); - } else { - console.log("删除") - this.createquestionsandanswers(object, 3, null, null, 0, 0, object.question.id); - newarrpoll.push(question); - } - console.log(newarrpoll) - newarr[indexo].question.new = "new" - } - - } - - - //添加到上面列表中 - //改变题目总数 - if (object.question.question_type === 1) { - //单选题 - this.state.mysingles = this.state.mysingles + 1; - } else if (object.question.question_type === 2) { - //多选题 - this.state.mydoubles = this.state.mydoubles + 1; - } else if (object.question.question_type === 3) { - //主观题 - this.state.mymainsint = this.state.mymainsint + 1; - - } - this.setState({ - // poll_questions: newarrpoll, - adddom: newarr, - problemtopic: null, - problemtopicbool: false, - // mysingles: this.state.mysingles, - // mydoubles: this.state.mydoubles, - // mymainsint: this.state.mymainsint - }) - - } - - - //保存 后期可以考虑和保存并继续 合并 - //保存,即完成新建并退出本题编辑 - // indexo 第几个数组 - //object 单个数组数据 - deleteadddomthree = (indexo, object) => { - // console.log("deleteadddom 349") - var thiss = this; - let arr = this.state.adddom; - let arrpoll = this.state.poll_questions; - let newarr = [...arr]; - let newarrpoll = [...arrpoll]; - var poll_questionslength = this.state.poll_questions.length; //获取单前问题最大长度 - //选项内容不能为空 - let max = 0; - let maxtie = newarr[indexo].question.answers.length; - //判断选项值是否不为空 - for (var k = 0; k < newarr[indexo].question.answers.length; k++) { - try { - if (newarr[indexo].question.answers[k].answer_text != undefined) { - if (newarr[indexo].question.answers[k].answer_text === "") { - max = max + 1; - } - } - } catch (e) { - // console.log("PollNew281") - // console.log(e) - } - } - if (newarr[indexo].question.question_title === "") { - this.props.showNotification('题目不能为空!'); - return - } - if (max > 0) { - if (object.question.question_type === 1) { - this.props.showNotification('选项内容不能为空!'); - return - } else if (object.question.question_type === 2) { - this.props.showNotification('选项内容不能为空!'); - return - } - - } - if (maxtie < 2) { - if (object.question.question_type === 1) { - this.props.showNotification('选项不能少于2个!'); - return - } else if (object.question.question_type === 2) { - this.props.showNotification('选项不能少于2个!'); - return - } - - - } - - if (object.question.question_type === 2) { - if (object.question.max_choices > 0) { - if (object.question.min_choices < 2) { - this.props.showNotification(`可选最小不能少于2个`); - return; - } - } - } - if (object.question.new === "new") { - ///////////////////////////////////////////////////////////////////新增模式 - // 根据数组里面的new 来确定是否是新增还是 修改 - //添加道数组上 - //不能共用数组 所以自己写个新数组 然后push 上面卷子中 - var question = {}; - if (object.question.question_type === 1) { - var questiontwo = {}; - var other = []; - var option = []; - var answerstwos = []; - var answerstwoss = []; - ///////////////////////////daying - // 这个是装选项和其他的 - for (var y = 0; y < object.question.answers.length; y++) { - if (object.question.answers[y].answer_text === "其他") { - var dataone = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - other.push(object.question.answers[y].answer_text); - answerstwos.push(dataone); - } else { - var datatwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - option.push(object.question.answers[y].answer_text) - answerstwoss.push(datatwo); - } - } - var arrc = option.concat(other); - var answers = answerstwoss.concat(answerstwos); - // 插入单选题' - // var id; - // try { - // id = newarrpoll[newarrpoll.length - 1].question.id + 1 - // } catch (e) { - // id = 1; - // } - questiontwo = { - // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, - "id": null, - "is_necessary": object.question.is_necessary, - "question_number": 1, - "question_title": object.question.question_title, - "question_type": 1, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - //获取指定id 号 用来插入,如果不是就是在最后添加 - - //执行新增操作 - var insindex = null; - if (this.state.problemtopicbool === true) { - insindex = this.state.problemtopic; - } - this.createquestionsandanswers(object, 1, arrc, null, 0, 0, insindex); - newarrpoll.splice(thiss.state.Insertposition, 0, question); - } else if (object.question.question_type === 2) { - //插入多选题 - if (object.question.max_choices < object.question.min_choices) { - this.props.showNotification(`可选的最大限制不能小于最小限制`); - - return; - } - - var questiontwo = {}; - var other = []; - var option = []; - var answerstwos = []; - var answerstwoss = []; - for (var y = 0; y < object.question.answers.length; y++) { - if (object.question.answers[y].answer_text === "其他") { - var dataone = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - other.push(object.question.answers[y].answer_text); - answerstwos.push(dataone); - } else { - var datatwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - option.push(object.question.answers[y].answer_text) - answerstwoss.push(datatwo); - } - } - var arrc = option.concat(other); - var answers = answerstwoss.concat(answerstwos); - - questiontwo = { - "id": null, - "is_necessary": object.question.is_necessary, - "question_number": 2, - "question_title": object.question.question_title, - "question_type": 2, - "max_choices": object.question.max_choices, - "min_choices": object.question.min_choices, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - - var insindex = null; - if (this.state.problemtopicbool === true) { - insindex = this.state.problemtopic; - } - this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, insindex); - //插入多选题 - // if (object.question.max_choices > arrc.length) { - - newarrpoll.splice(thiss.state.Insertposition, 0, question); - } else if (object.question.question_type === 3) { - //插入主观题 - var answers = []; - var questiontwo = {}; - var answerstwos = []; - var answerstwoss = []; - if (object.question.answers.length > 0) { - for (var y = 0; y < object.question.answers.length; y++) { - if (object.question.answers[y].answer_text === "其他") { - var dataone = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - answerstwos.push(dataone); - } else { - var datatwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - answerstwoss.push(datatwo); - } - } - } - answers = answerstwoss.concat(answerstwos); - - questiontwo = { - "id": null, - "is_necessary": object.question.is_necessary, - "question_number": 3, - "question_title": object.question.question_title, - "question_type": 3, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - //主观题不需要可选选项 - - var insindex = null; - if (this.state.problemtopicbool === true) { - insindex = this.state.problemtopic; - } - this.createquestionsandanswers(object, 3, null, null, 0, 0, insindex); - // newarrpoll.push(question); - newarrpoll.splice(thiss.state.Insertposition, 0, question); - } - ///////////////////////////////////////////////////////////////////新增模式 - } else { - //////////////////////////////////////////////////////////////////////////////修改模式 - //修改 - var uuk = -1 - for (var uk = 0; uk < newarrpoll.length; uk++) { - if (object.question.id === newarrpoll[uk].question.id) { - uuk = uk; - console.log("删除了数据=-09876543234567890-111111111111") - } - } - - - var question = {}; - if (object.question.question_type === 1) { - var questiontwo = {}; - var other = []; - var option = []; - var answerstwos = []; - var answerstwoss = []; - ///////////////////////////daying - //这个装选项和其他的 - for (var y = 0; y < object.question.answers.length; y++) { - if (object.question.answers[y].answer_text === "其他") { - var dataone = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - other.push(object.question.answers[y].answer_text); - answerstwos.push(dataone); - } else { - var datatwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - option.push(object.question.answers[y].answer_text) - answerstwoss.push(datatwo); - } - } - var arrc = option.concat(other); - var answers = answerstwoss.concat(answerstwos); - // 插入单选题 - questiontwo = { - // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, - "id": object.question.id, - "is_necessary": object.question.is_necessary, - "question_number": 1, - "question_title": object.question.question_title, - "question_type": 1, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - if (uuk !== -1) { - console.log("修改") - this.edittotheserver(object, 1, arrc, null, 0, 0); - newarrpoll.splice(uuk, 1, question); - } else { - console.log("删除") - this.createquestionsandanswers(object, 1, arrc, null, 0, 0, object.question.id); - newarrpoll.push(question); - } - console.log(newarrpoll) - } else if (object.question.question_type === 2) { - //插入多选题 - if (object.question.max_choices < object.question.min_choices) { - this.props.showNotification(`可选的最大限制不能小于最小限制`); - - return; - } - var questiontwo = {}; - var other = []; - var option = []; - var answerstwos = []; - var answerstwoss = []; - for (var y = 0; y < object.question.answers.length; y++) { - if (object.question.answers[y].answer_text === "其他") { - var dataone = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - other.push(object.question.answers[y].answer_text); - answerstwos.push(dataone); - } else { - var datatwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - option.push(object.question.answers[y].answer_text) - answerstwoss.push(datatwo); - } - } - var arrc = option.concat(other); - var answers = answerstwoss.concat(answerstwos); - questiontwo = { - "id": object.question.id, - "is_necessary": object.question.is_necessary, - "question_number": 2, - "question_title": object.question.question_title, - "question_type": 2, - "max_choices": object.question.max_choices, - "min_choices": object.question.min_choices, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - //插入多选题 - if (uuk !== -1) { - console.log("修改") - this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices); - newarrpoll.splice(uuk, 1, question); - } else { - console.log("删除") - this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, object.question.id); - newarrpoll.push(question); - } - console.log(newarrpoll) - - } else if (object.question.question_type === 3) { - //插入主观题 - var answers = []; - var questiontwo = {}; - - if (object.question.answers.length > 0) { - for (var y = 0; y < object.question.answers.length; y++) { - var answerstwo; - if (object.question.answers[y].answer_text === "其他") { - answerstwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - } else { - answerstwo = { - "answer_id": object.question.answers[y].answer_id, - "answer_position": object.question.answers[y].answer_position, - "answer_text": object.question.answers[y].answer_text - } - } - answers.push(answerstwo); - } - } - questiontwo = { - "id": object.question.id, - "is_necessary": object.question.is_necessary, - "question_number": 3, - "question_title": object.question.question_title, - "question_type": 3, - "new": "", - "answers": answers - }; - question = {"question": questiontwo}; - if (uuk !== -1) { - console.log("修改") - this.edittotheserver(object, 3, null, null, 0, 0); - newarrpoll.splice(uuk, 1, question); - } else { - console.log("删除") - this.createquestionsandanswers(object, 3, null, null, 0, 0, object.question.id); - newarrpoll.push(question); - } - console.log(newarrpoll) - - } - - } - - - //添加到上面列表中 - //改变题目总数 - if (object.question.question_type === 1) { - //单选题 - this.state.mysingles = this.state.mysingles + 1; - } else if (object.question.question_type === 2) { - //多选题 - this.state.mydoubles = this.state.mydoubles + 1; - } else if (object.question.question_type === 3) { - //主观题 - this.state.mymainsint = this.state.mymainsint + 1; - - } - - //这里更新数据 - if (this.state.q_countst == 1) { - this.setState({ - q_countst: 0, - }) - } - this.deleteadddom(indexo); - // console.log(indexo) - } - - - ////新增到服务器中 - createquestionsandanswers = (object, number, option, other, max_choices, min_choices, insert_id) => { - var thiss = this; - var poll_id = this.state.pollid; - var urlly = `/polls/${poll_id}/poll_questions.json` - var max_choicess = null; - var min_choicess = null; - if (max_choices === 0 && min_choices === 0) { - max_choicess = null; - min_choicess = null; - } else { - max_choicess = max_choices; - min_choicess = min_choices; - } - axios.post(urlly, { - question_title: object.question.question_title, - question_type: number, - is_necessary: object.question.is_necessary, - max_choices: max_choicess, - min_choices: min_choicess, - question_answers: option, - question_other_answer: null, - insert_id: insert_id - }).then((result) => { - // try { - if (result !== undefined) { - if (result.data.status === 0) { - this.props.showNotification(`已完成`); - thiss.thisinitializationdatanew(); - // console.log("确认创建问题") - // console.log(result) - // try { - // if (result.data.status === 0) { - // console.log("确认创建问题") - // console.log(JSON.stringify(result.data)) - // } - // } catch (e) { - // - // } - } - } - // } catch (e) { - // - // } - - }) - - - } - ///编辑修改到服务器当中 - edittotheserver = (object, number, option, other, max_choices, min_choices) => { - console.log("调用了edittotheserver") - var url = `/poll_questions/${object.question.id}.json` - var thiss = this; - axios.put(url, { - // debug: true, - question_title: object.question.question_title, - question_type: number, - is_necessary: object.question.is_necessary, - max_choices: max_choices, - min_choices: min_choices, - question_answers: option, - question_other_answer: null, - }).then((result) => { - try { - if (result.data.status === 0) { - this.props.showNotification(`编辑题目成功`); - thiss.thisinitializationdatanew(); - } - } catch (e) { - // console.log("调用了edittotheserver") - console.log(e) - } - }) - } - - //删除到服务器当中 - eletetoserver = (pollid, newarr, type, index) => { - console.log("调用了eletetoserver") - var id = pollid; - var url = `/poll_questions/${id}.json` - let {mysingles, mydoubles, mymainsint} = this.state - var thiss = this; - - axios - .delete(url, {}) - .then(function (response) { - console.log(response) - if (response === undefined) { - return; - } - if (response.data.message === "删除成功") { - thiss.props.showNotification(`删除成功`); - - newarr.splice(index, 1); - if (type === 1) { - mysingles = mysingles - 1; - } else if (type === 2) { - mydoubles = mydoubles - 1; - - } else if (type === 3) { - mymainsint = mymainsint - 1; - - } - // thiss.setState({ - // poll_questions: newarr, - // mysingles: mysingles, - // mydoubles: mydoubles, - // mymainsint: mymainsint - // }); - thiss.thisinitializationdatanew(); - } - }) - } - - //上移到服务器中 - Upanddownmovementof = (bool, poll_question_id) => { - // console.log("调用了Upanddownmovementofr") - // console.log(poll_question_id) - var thiss = this; - if (bool === true) { - var url = `/poll_questions/${poll_question_id}/up_down.json`; - axios.post(url, { - opr: "up", - }).then((result) => { - try { - if (result.data.status === 0) { - this.props.showNotification(`已完成`); - thiss.thisinitializationdatanew(); - } - // console.log(JSON.stringify(result)) - } catch (e) { - console.log("上移题目成功 错误") - console.log(e) - } - - }) - } else { - var url = `/poll_questions/${poll_question_id}/up_down.json`; - axios.post(url, { - opr: "down", - }).then((result) => { - try { - if (result.data.status === 0) { - // message.success("下移题目成功", 1) - this.props.showNotification(`已完成`); - thiss.thisinitializationdatanew(); - } - // console.log(JSON.stringify(result)) - } catch (e) { - console.log("下移题目成功 错误") - console.log(e) - } - }) - } - - } - - //删除编辑新增条目 - //id 条目的唯一id - //i 为要删除的子条目 - deleteentrys = (id, i, stirngname) => { - console.log(id) - console.log(stirngname); - var arrtwoy = this.state.adddom; - let newarrtwoy = [...arrtwoy]; - for (var k = 0; k < newarrtwoy.length; k++) { - if (newarrtwoy[k] != undefined) { - if (newarrtwoy[k].question.id === id) { - for (var c = 0; c < newarrtwoy[k].question.answers.length; c++) { - if (c === i) { - // console.log("删除了") - // console.log(c) - newarrtwoy[k].question.answers.splice(c, 1); - } - } - } - } - } - if (stirngname === true) { - console.log(stirngname); - this.setState({ - newoption: false, - adddom: newarrtwoy, - - }) - } else { - console.log(stirngname); - this.setState({ - adddom: newarrtwoy, - }); - } - - - } - - - // 新增选项 - ewoption = (id, object) => { - console.log("ewoption 440") - console.log("是否是新建题目还是编辑") - // console.log(object.question.new) - - - let arrtwo = this.state.adddom; - let newarrtwo = [...arrtwo]; - - - for (var k = 0; k < newarrtwo.length; k++) { - // console.log(arrtwo[k].question.id); - if (newarrtwo[k] != undefined) { - if (newarrtwo[k].question.id === id) { - var data = { - "answer_id": newarrtwo[k].question.answers.length + 1, - "answer_position": newarrtwo[k].question.answers.length + 1, - "answer_text": "" - }; - //向头部添加元素 - // newarrtwo[k].question.answers.unshift(data); - //如果有其他这一项就删除掉 - if (newarrtwo[k].question.answers.length > 0) { - for (var o = 0; o < newarrtwo[k].question.answers.length; o++) { - if (newarrtwo[k].question.answers[o].answer_text != undefined) { - if (newarrtwo[k].question.answers[o].answer_text === "其他") { - newarrtwo[k].question.answers.splice(o, 0, data); - this.setState({ - adddom: newarrtwo - }) - return - } else { - if (o === newarrtwo[k].question.answers.length - 1) { - newarrtwo[k].question.answers.push(data); - this.setState({ - adddom: newarrtwo - }) - return - } - } - } - } - } else { - newarrtwo[k].question.answers.push(data); - this.setState({ - adddom: newarrtwo - }) - } - - } - } - } - - } - - - swapArray = (arr, index1, index2) => { - arr[index1] = arr.splice(index2, 1, arr[index1])[0]; - return arr; - } - - //新增其他选项 - addanotheroption = (id) => { - console.log("addanotheroption 457") - let arrtwo = this.state.adddom; - let newarrtwo = [...arrtwo]; - console.log(newarrtwo) - for (var k = 0; k < newarrtwo.length; k++) { - if (newarrtwo[k] != undefined) { - if (newarrtwo[k].question.id === id) { - var data = { - "answer_id": newarrtwo[k].question.answers.length + 1, - "answer_position": newarrtwo[k].question.answers.length + 1, - "answer_text": "其他" - }; - newarrtwo[k].question.answers.push(data); - } - } - } - this.setState({ - adddom: newarrtwo, - newoption: true, - }) - } - - - //点击向上排序按钮事件 - handleClickBySortUp = (index, object) => { - console.log("handleClickBySortUp 521") - let arr = this.state.poll_questions; - let newarr = [...arr]; - console.log(newarr) - if (index != 0) { - this.Upanddownmovementof(true, object.question.id); - let temp = newarr[index - 1]; - newarr[index - 1] = newarr[index]; - newarr[index] = temp; - this.setState({ - poll_questions: newarr, - }); - } - } - - //点击向下排序按钮事件 - handleClickBySortDown = (index, object) => { - console.log("handleClickBySortDown 536") - let arr = this.state.poll_questions; - let newarr = [...arr]; - // - if (index != newarr.length - 1) { - this.Upanddownmovementof(false, object.question.id); - let temp = newarr[index + 1]; - newarr[index + 1] = newarr[index]; - newarr[index] = temp; - this.setState({ - poll_questions: newarr, - }); - } else { - console.log("2222index==arr.length"); - console.log(this.state.poll_questions); - } - } - - //点击删除按钮事件 - handleClickByDelete = (type, index, object) => { - console.log("handleClickByDelete 556") - console.log("object.question.id") - console.log(object.question.id) - let arr = this.state.poll_questions; - let newarr = [...arr]; - this.eletetoserver(object.question.id, newarr, type, index) - - } - - // 数字输入监听 - //e为获取组件对象 - //i外层数组 - //k为内层数组 - handleInputChanges = (e, i, k) => { - console.log("handleInputChanges 612") - - let value = e.target.value;//取到input的数据 - console.log("handleInputChanges value is :" + value); - console.log(k); - let arr = this.state.adddom; - let newarr = [...arr]; - - newarr[i].question.answers[k].answer_text = value - this.setState({ - adddom: newarr - }) - - } - - //标题输入监听 - handleInputTopic = (e, i) => { - console.log("handleInputTopic 633") - - let value = e.target.value;//取到input的数据 - console.log("handleInputTopic value is :" + value); - console.log(i); - let arr = this.state.adddom; - let newarr = [...arr]; - newarr[i].question.question_title = value - this.setState({ - adddom: newarr - }) - } - - //最小值 - handleGradationGroupChangee = (value, index, max, length) => { - - debugger - var minbool = false; - var maxbool = false; - let arr = this.state.adddom; - if (parseInt(value) === 0 || parseInt(value) === "0" || parseInt(value) === null || parseInt(value) === undefined || parseInt(value) < 1) { - minbool = true; - } - if (max === 0 || max === "0" || max === null || max === undefined) { - maxbool = true; - } - - if (minbool === true && maxbool === true) { - for (var i = 0; i < arr.length; i++) { - if (index === i) { - arr[i].question.min_choices = parseInt(value); - } - } - this.setState({ - adddom: arr - }) - } else { - for (var i = 0; i < arr.length; i++) { - if (index === i) { - arr[i].question.min_choices = parseInt(value); - arr[i].question.max_choices = length; - } - } - this.setState({ - adddom: arr - }) - } - - } - - //最大值 - handleGradationGroupChangeee = (value, index) => { - - let arr = this.state.adddom; - for (var i = 0; i < arr.length; i++) { - if (index === i) { - arr[i].question.max_choices = parseInt(value); - } - } - this.setState({ - adddom: arr - }) - // console.log(this.state.adddom); - } - - //提交题目//没有就创建新的题库,新建问题和保存题目不一样不能同时保存 这里只是新建 和编辑 标题和须知 - submitQuestionnaire = () => { - console.log("调用了submitQuestionnaire") - if (this.state.Newedit === true) { - - this.newword(); - - } else { - if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { - this.props.showNotification("请输入标题"); - return - } - - if (this.state.polls_descriptiontest.length > 100) { - - } - var pollid; - if (this.state.pollid === undefined) { - pollid = this.props.match.params.pollid; - } else { - pollid = this.state.pollid; - } - - - var url = `/polls/${pollid}.json`; - axios.put(url, { - polls_name: this.state.polls_nametest, - polls_description: this.state.polls_descriptiontest - }).then((result) => { - try { - // console.log(JSON.stringify(result)) - if (result.data.status === 0) { - // console.log("更新题目成功") - // this.props.showNotification("保存成功"); - this.props.history.push(`/courses/${this.props.match.params.coursesId}/polls/${pollid}/detail?tab=2`) - } - } catch (e) { - - } - }) - } - } - - cancelmodel = () => { - - this.setState({ - Modalstype: false, - Modalstopval: "", - ModalsBottomval: "", - }) - - } - savedelete = (question_type, index, item) => { - console.log("savedelete"); - this.handleClickByDelete(question_type, index, item); - this.setState({ - Modalstype: false, - Modalstopval: "", - ModalsBottomval: "", - }) - } - // 问题的类型,1单选题,2为多选题,3为主观题 - showDeleteConfirm = (question_type, index, item) => { - this.setState({ - Modalstype: true, - Modalstopval: "是否确认删除?", - ModalsBottomval: "", - ModalCancel: this.cancelmodel, - ModalSave: () => this.savedelete(question_type, index, item), - }) - - } - //必答选项 - onCheckAllChange = (e, index) => { - console.log("onCheckAllChange"); - console.log(e.target.checked); - // console.log(e.target.value); - let arr = this.state.adddom; - for (var i = 0; i < arr.length; i++) { - if (index === i) { - if (e.target.checked === true) { - arr[i].question.is_necessary = 1; - - } else { - arr[i].question.is_necessary = 0; - } - } - } - this.setState({ - adddom: arr - }) - } - - //重新编辑标题和须知 - adddomeditit = () => { - if (this.state.mysave === true) { - this.setState({ - mysave: false, - readOnlys: "readOnly", - storagedesc:this.state.polls_nametest, - storagedesctwo:this.state.polls_descriptiontest, - }) - } else if (this.state.mysave === false) { - this.setState({ - mysave: true, - readOnlys: "", - storagedesc:this.state.polls_nametest, - storagedesctwo:this.state.polls_descriptiontest, - }) - } - } - //取消保存 - onSaveExercisetwo = () => { - if (this.state.mysave === true) { - this.setState({ - mysave: false, - Newedit: false, - readOnlys: "readOnly", - polls_nametest:this.state.storagedesc, - polls_descriptiontest:this.state.storagedesctwo, - }) - } else { - this.setState({ - mysave: false, - Newedit: false, - readOnlys: "readOnly", - polls_nametest:this.state.storagedesc, - polls_descriptiontest:this.state.storagedesctwo, - }) - } - } - // 创建问卷 - onSaveExercise = () => { - if (this.state.Newedit === true) { - - if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { - this.props.showNotification(`请输入标题`); - return - } - let coursesId = this.props.match.params.coursesId; - const urlls = `/courses/${coursesId}/polls.json` - axios.post(urlls, { - polls_name: this.state.polls_nametest, - polls_description: this.state.polls_descriptiontest - }).then((result) => { - if (result === undefined) { - return; - } - this.state.Newedit === false; - this.props.showNotification(`问卷创建成功!`); - this.setState({ - pollid: result.data.data.id, - Newedit: false, - mysave: false, - readOnlys: "readOnly", - cancellation: false, - }) - - - }) - } else { - if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { - this.props.showNotification("请输入标题"); - return - } - - var pollid; - if (this.state.pollid === undefined) { - pollid = this.props.match.params.pollid; - } else { - pollid = this.state.pollid; - } - - - var url = `/polls/${pollid}.json`; - axios.put(url, { - polls_name: this.state.polls_nametest, - polls_description: this.state.polls_descriptiontest - }).then((result) => { - if (result !== undefined) { - this.props.showNotification(`问卷更新成功!`); - this.setState({ - mysave: false, - readOnlys: "readOnly", - }) - } - - }) - } - - } - - //试图 - render() { - let { - addonAfter, - user_permission, - polls_status, - Modalstype, - mysave, - readOnlys, - newoption, - cancellation, - } = this.state - //获取老师权限 - // console.log("[`${maps[polls_status && polls_status]}`]]"); - // console.log(polls_status); - // console.log([[`${maps[polls_status && polls_status]}`]] + ""); - - const IsAdmin = this.props.isAdmin(); - const {getFieldDecorator} = this.props.form; - const formItemLayout = { - labelCol: { - xs: {span: 24}, - // sm: { span: 8 }, - sm: {span: 24}, - }, - wrapperCol: { - xs: {span: 24}, - // sm: { span: 16 }, - sm: {span: 24}, - }, - }; - - const radioStyle = { - display: 'block', - height: '30px', - lineHeight: '30px', - }; - - // console.log(this.state.projects===undefined?"":this.state.projects.poll_questions) - var displaymysave = (mysave === true) ? "" : "display:none;"; - return ( -
    - {/*提示*/} - {Modalstype && Modalstype === true ? : ""} -
    -

    - {this.props.coursedata.name} - > - 问卷 - > - {this.props.match.params.news === undefined ? "新建" : this.props.match.params.news === "new" ? "新建" : "编辑"} -

    -
    -

    {this.props.match.params.news === undefined ? "新建问卷" : this.props.match.params.news === "new" ? "新建问卷" : "编辑问卷"}

    - 返回 -
    - - {/*
    */} -
    -
    - - -
    -
    *问卷标题 -
    - { - this.props.match.params.news === undefined ? "" : this.props.match.params.news === "new" ? - ( - this.state.mysave === false ? - - : "") - : - - } - -
    - - - -
    -
    - - -
    问卷须知
    - - - { - this.state.Newedit === true || this.state.mysave === true ? -
    - - {cancellation === false ? - - : ""} - -
    - : "" - } - -
    - -
    -

    - - - { - this.state.mysingles + this.state.mydoubles + this.state.mymainsint === 0 ? "" : -

    - - {this.state.mysingles === 0 ? "" : 单选题{this.state.mysingles === undefined ? "" : this.state.mysingles} 题} - - {this.state.mydoubles === 0 ? "" : - 多选题{this.state.mydoubles === undefined ? "" : this.state.mydoubles}题} - {this.state.mymainsint === 0 ? "" : - - 主观题{this.state.mymainsint === undefined ? "" : this.state.mymainsint}题 - - } - - - 合计 {this.state.mysingles === undefined ? "" : this.state.mydoubles === undefined ? "" : this.state.mymainsint === undefined ? "" : this.state.mysingles + this.state.mydoubles + this.state.mymainsint} -
    - - } - -

    -
    - - {/*自动生成修改好的获取到的*/} - {/**************************************************************************/} - {this.state.poll_questions === undefined ? "" : this.state.poll_questions.map((item, index) => { - // console.log('打印this.state.poll_questions') - // console.log(item.question) - let resultDom; - resultDom =
    -

    - 第{index + 1}题: - {item.question.question_type === 1 ? "(单选题)" : item.question.question_type === 2 ? "(多选题)" : "(主观题)"} - {item.question.is_necessary === 1 ? "必答" : item.question.question_type === 2 ? "选答" : "选答"} - {(item.question.min_choices === undefined && item.question.max_choices === undefined ? "" : item.question.min_choices === null && item.question.max_choices === null ? "" : item.question.min_choices === 0 && item.question.max_choices === 0 ? "" : "可选" + item.question.min_choices + "-" + item.question.max_choices + "项")} - { - polls_status === undefined || polls_status === 1 ? - - this.showDeleteConfirm(item.question.question_type, index, item)}> - {index === 0 ? "" : - this.handleClickBySortUp(index, item)}>} - {index === this.state.poll_questions.length - 1 ? "" : - this.handleClickBySortDown(index, item)}>} - this.addMytopic(item.question.question_type, this.state.pollid, index + 1, true, item.question.id)}> - this.adddomedit(item)}> - : this.adddomedit(item)}> - } - -

    -

    {item.question.question_title}

    - {/*
    {item.question.question_title}
    */} - {item.question.question_type === 1 ? - ( - {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { - return ( -
    - - {/*
    {items.answer_text}
    */} - {/*
    {items.answer_text}
    */} - {items.answer_text} - -
    - ) - })} -
    ) - : item.question.question_type === 2 ? - ( - {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { - return ( -
    - - {items.answer_text} - - {/*{items.answer_text}*/} -
    - ) - })} -
    ) - : item.question.question_type === 3 ? (
    ) : (
    )} -
    - - return ( -
    - {resultDom} -
    - ) - })} - {/**************************************************************************/} - {/*编辑用的新增用的*/} - {/**************************************************************************/} - - {this.state.adddom === undefined ? "" : this.state.adddom.map((itemo, indexo) => { - // console.log('打印this.state.adddom') - // console.log(itemo.question) - let arrid = itemo.question.id; - let resultDomtwo; - resultDomtwo = -
    - {itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"} - this.onCheckAllChange(e, indexo)} - className="lineh-40" - style={{"marginLeft": "20px"}}>必答 - - - - - {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => { - return ( -
    - {itemt.answer_text === undefined ? ( -
    ) : itemt.answer_text === "其他" ? ( -

    - 其它 - - - {polls_status === undefined || polls_status === 1 ? - this.deleteentrys(arrid, indext, true)}> - : ""} -

    ) : (

    - 选项 - - - {polls_status === undefined || polls_status === 1 ? - this.deleteentrys(arrid, indext, false)}> - : ""} -

    )} -
    - ) - })} - -
    - {itemo.question.question_type === 1 ? ( -
    -
    - {polls_status === undefined || polls_status === 1 ? - this.ewoption(itemo.question.id, itemo)}>新增选项 - - : ""} - {polls_status === undefined || polls_status === 1 ? - - (newoption === false ? - this.addanotheroption(itemo.question.id)}>新增其他选项 - : "") - : ""} - - this.deleteadddom(indexo)}>取消 - this.deleteadddomthree(indexo, itemo)}>保存 - this.deleteadddomtwo(indexo, itemo)}>保存并继续 - -
    -
    - - - ) - - - : itemo.question.question_type === 2 ? ( - //////////////////////////////////////////// 可选 -
    -
    -
    - 可选 -
    - {/*可选最小*/} - - - ~ - {/*可选最大*/} - - - (学生答题时,系统对其选择的选项个数进行限制,--表示不限制) -
    - -
    -
    -
    - ) - - : (
    ) - - } -
    -
    - {itemo.question.question_type === 2 ? - ( - polls_status === undefined || polls_status === 1 ? -
    - -
    this.ewoption(itemo.question.id, itemo)}>新增选项 - - { - newoption === false ? this.addanotheroption(itemo.question.id)}>新增其他选项 : "" - } - -
    - - - - this.deleteadddom(indexo)}>取消 - this.deleteadddomthree(indexo, itemo)}>保存 - this.deleteadddomtwo(indexo, itemo)}>保存并继续 - -
    - - - : "" - ) - - : itemo.question.question_type === 3 ? -
    - - this.deleteadddom(indexo)}>取消 - this.deleteadddomthree(indexo, itemo)}>保存 - this.deleteadddomtwo(indexo, itemo)}>保存并继续 - -
    - : - ""} - - -
    -
    - - - return ( -
    - {resultDomtwo} -
    - ) - })} - {/**************************************************************************/} - - {polls_status === undefined || polls_status === 1 ? -
    - { - this.props.match.params.news === "new" ? - this.state.Newedit === false ? -
    -
    - -
    - this.addmysingles()}>单选题 - this.addmydoubles()}>多选题 - this.addmymainsint()}>主观题 -
    -
    - - : "" - : -
    -
    -
    - this.addmysingles()}>单选题 - this.addmydoubles()}>多选题 - this.addmymainsint()}>主观题 -
    -
    - } -
    - :
    } -
    - { - this.props.match.params.news === "new" ? - (this.state.Newedit === false ? - - - : "") - : - - } - - {/**/} -
    -
    -
    - ) - } - -} - -const WrappedPollNew = Form.create({name: 'taskPollNew'})(PollNew); -// RouteHOC() +import React, {Component} from "react"; +import {Form, Input, Tooltip, Checkbox, Radio, Select, message, Modal, Button} from 'antd' +import {WordsBtn, ActionBtn} from 'educoder' +import '../css/members.css' +import "../common/formCommon.css" + +import './pollStyle.css' +import '../css/Courses.css' +import axios from 'axios' +import moment from "../new/CoursesNew"; +import Modals from "../../modals/Modals"; + + +const TextArea = Input.TextArea +const RadioGroup = Radio.Group +const CheckboxGroup = Checkbox.Group +const Option = Select.Option; +const maps = {1: "未发布", 2: "提交中", 3: "已截止"} +const confirm = Modal.confirm; + +class PollNew extends Component { + // 问卷新建和编辑 + // + // * addonAfter 字数限制 + // * q_counts 题目总数 + // * mysingles 单选题数量 + // * mydoubles 多选题数量 + // * mymainsint 主观题数量 + // * adddom 添加编辑的数据 页面点击新增题目 + // * editentry 编辑条目 新增的题目点击到条目中 + //* questionnair 问卷是否存在 默认不存在 + // * + + constructor(props) { + super(props); + this.state = { + visible: false, + poll_questions: [], + user_permission: "", + addonAfter: 60, + addonAftertwo: 100, + mysingles: 0, + mydoubles: 0, + mymainsint: 0, + adddom: [], + editentry: [], + questionnair: false, + polls_name: undefined, + polls_nametest: "", + polls_description: "", + polls_descriptiontest: "", + storagedesc:"", + storagedesctwo:"", + coursesId: "", + pollid: undefined, + polls_status: undefined, + q_countst: 0, + Newedit: true, + Insertposition: undefined, + Modalstype: false, + mysave: false, + readOnlys: "readOnly", + problemtopic: null, + problemtopicbool: false, + newoption: false, + cancellation: false, + } + // console.log("试卷新建和编辑"); + // console.log(JSON.stringify(props)); + + } + + changeTopicName = (e) => { + let num = 60 - parseInt(e.target.value.length); + this.setState({ + addonAfter: num < 0 ? 0 : num + }) + this.setState({ + polls_nametest: e.target.value + }) + } + + + changeTopicNametwo = (e) => { + // console.log("获取的值" + e.target.value); + let num = 100 - parseInt(e.target.value.length); + this.setState({ + addonAftertwo: num < 0 ? 0 : num + }) + this.setState({ + polls_descriptiontest: e.target.value + }) + } + + // 初始化数据 + componentDidMount = () => { + console.log("componentDidMount 50") + if (this.props.match.params.news !== undefined) { + if (this.props.match.params.news === "new") { + this.state.Newedit === true; + this.setState({ + Newedit: true, + mysave: true, + readOnlys: "", + cancellation: true, + }) + } else { + this.Initializatio_data(); + this.state.Newedit === false; + this.setState({ + Newedit: false, + mysave: false, + readOnlys: "readOnly", + }) + } + } + + + // this.getPollInfo(); + + } + //获取权限 + // getPollInfo(){ + // // console.log(this.props.match); + // let pollId=this.props.match.params.pollId; + // let url=`/polls/${pollId}/common_header.json` + // axios.get(url).then((result)=>{ + // if(result.status==200){ + // this.setState({ + // pollDetail:result.data, + // user_permission:result.data.user_permission + // }) + // } + // }).catch((error)=>{ + // console.log(error); + // }) + // } + //初始化请求网络 + Initializatio_data = () => { + console.log("Initializatio_data 582") + //课堂id + let coursesId = this.props.match.params.coursesId; + //时间id + let pollid = this.props.match.params.pollid; + console.log(pollid); + // let coursesId = 557; + if (pollid === undefined) { + // console.log("没有问卷新建问卷~~~") + // let coursesId=this.props.match.params.coursesId; + // // to={`/courses/${coursesId}/polls/new`} + // + // const urll = `/courses/${coursesId}/polls/new.json` + // axios.get(urll).then((result) => { + // if (result.status === 200) { + // console.log(urll) + // console.log("问卷新建成功") + // console.log(JSON.stringify(result)) + // // var path=`/courses/${coursesId}/polls/new`; + // // + // // this.props.history.push({ pathname: path, state: { } }); + // } + // }).catch((error) => { + // console.log(error) + // }) + + // const urlls = `/courses/${coursesId}/polls.json` + // axios.post(urlls,{ + // polls_name: "这是标题", + // polls_description:"这是标题须知" + // }).then((result)=>{ + // console.log("创建问卷++++++") + // console.log(result) + // try { + // if(result.data.status===0){ + // console.log("创建问卷") + // console.log(JSON.stringify(result.data)) + // } + // }catch (e) { + // + // } + // + // }) + //没有问卷 + this.setState({ + projects: [], + polls_name: "", + polls_description: "", + poll_questions: [], + question_types: [], + pollid: undefined, + mysingles: 0, + mydoubles: 0, + mymainsint: 0, + polls_nametest: "", + polls_descriptiontest: "", + coursesId: 0, + questionnair: false + }) + } else { + const url = `/polls/${pollid}/edit.json`; + axios.get(url).then((result) => { + if (result !== undefined) + + // console.log("有问卷~~~") + // if (result.status === 200) { + // console.log(JSON.stringify(result.data)) + this.props.form.setFieldsValue({ + polls_nametest: result.data.poll.polls_name, + polls_descriptiontest: result.data.poll.polls_description, + }); + this.setState({ + projects: result.data, + pollid: pollid, + polls_status: result.data.poll.polls_status, + polls_name: result.data.poll.polls_name, + polls_description: result.data.poll.polls_description, + poll_questions: result.data.poll_questions, + question_types: result.data.question_types, + mysingles: result.data.question_types.q_singles, + mydoubles: result.data.question_types.q_doubles, + mymainsint: result.data.question_types.q_mains, + polls_nametest: result.data.poll.polls_name, + polls_descriptiontest: result.data.poll.polls_description, + questionnair: true, + }) + console.log(this.state.polls_nametest) + console.log(this.state.polls_descriptiontest) + // } + }).catch((error) => { + console.log(error) + }) + } + + } + + //重新获取数据 + thisinitializationdatanew = () => { + var pollidsy = null; + if (this.state.pollid !== undefined) { + pollidsy = this.state.pollid; + if (pollidsy === null || pollidsy === undefined) { + pollidsy = this.props.match.params.pollid; + } + } + + if (pollidsy === null || pollidsy === undefined) { + return + } + + const url = `/polls/${pollidsy}/edit.json`; + axios.get(url).then((result) => { + if (result !== undefined) + + // console.log("有问卷~~~") + // if (result.status === 200) { + // console.log(JSON.stringify(result.data)) + this.setState({ + projects: result.data, + pollid: pollidsy, + polls_status: result.data.poll.polls_status, + polls_name: result.data.poll.polls_name, + polls_description: result.data.poll.polls_description, + poll_questions: result.data.poll_questions, + question_types: result.data.question_types, + mysingles: result.data.question_types.q_singles, + mydoubles: result.data.question_types.q_doubles, + mymainsint: result.data.question_types.q_mains, + polls_nametest: result.data.poll.polls_name, + polls_descriptiontest: result.data.poll.polls_description, + questionnair: true, + }) + + // } + }).catch((error) => { + console.log(error) + }) + } + //新建问卷 + newword = () => { + if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { + this.props.showNotification(`请输入标题`); + return + } + let coursesId = this.props.match.params.coursesId; + const urlls = `/courses/${coursesId}/polls.json` + axios.post(urlls, { + polls_name: this.state.polls_nametest, + polls_description: this.state.polls_descriptiontest + }).then((result) => { + if (result.data.status === 0) { + this.state.Newedit === false; + // this.props.showNotification(`试卷创建成功`); + this.setState({ + pollid: result.data.data.id, + Newedit: false, + }) + this.props.history.push(`/courses/${this.props.match.params.coursesId}/polls/${result.data.data.id}/detail?tab=2`) + } + }) + } + //添加单选题目 + addmysingles = () => { + + if (this.state.newoption === true) { + this.setState({ + newoption: false + }) + } + + var Insertposition = this.state.poll_questions.length; + // console.log(JSON.stringify(this.state.poll_questions)); + for (var i = 0; i < this.state.poll_questions.length; i++) { + if (this.state.poll_questions[i].question.question_type === 1) { + Insertposition = i; + } + + } + this.addMytopic(1, this.state.pollid, Insertposition, false, 0); + // } + } + + //添加多选题目 + addmydoubles = () => { + console.log("addmymainsint 70") + if (this.state.newoption === true) { + this.setState({ + newoption: false + }) + } + + var Insertposition = this.state.poll_questions.length; + // console.log(JSON.stringify(this.state.poll_questions)); + for (var i = 0; i < this.state.poll_questions.length; i++) { + if (this.state.poll_questions[i].question.question_type === 2) { + Insertposition = i; + } + + + } + this.addMytopic(2, this.state.pollid, Insertposition, false, 0); + + // } + } + + //添加主观题目 + addmymainsint = () => { + + var Insertposition = this.state.poll_questions.length; + // console.log(JSON.stringify(this.state.poll_questions)); + for (var i = 0; i < this.state.poll_questions.length; i++) { + if (this.state.poll_questions[i].question.question_type === 3) { + Insertposition = i; + } + + + } + + this.addMytopic(3, this.state.pollid, Insertposition, false, 0); + // } + } + + //编辑方法 + adddomedit = (object) => { + console.log("adddomedit 76"); + if (this.state.q_countst > 0) { + this.props.showNotification(`不能同时编辑两题`); + + return; + } + var anserbool = false; + this.setState({ + q_countst: 1, + }) + window.scrollTo(0, this.refs.targetElement.offsetTop) + let {adddom} = this.state; + // var arr =new Object(objects); + // console.log(arr) + // adddom.push(arr); + var question = {}; + var Insertposition = this.state.poll_questions.length; + if (object.question.question_type === 1) { + var answers = []; + var questiontwo = {}; + ///////////////////////////daying + for (var y = 0; y < object.question.answers.length; y++) { + var answerstwo; + if (object.question.answers[y].answer_text === "其他") { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + anserbool = true; + } else { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } + answers.push(answerstwo); + + + } + // 插入单选题 + questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 1, + "question_title": object.question.question_title, + "question_type": 1, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + adddom.push(question); + for (var i = 0; i < this.state.poll_questions.length; i++) { + if (this.state.poll_questions[i].question.question_type === 1) { + Insertposition = i; + } + } + } else if (object.question.question_type === 2) { + //插入多选题 + var answers = []; + var questiontwo = {}; + + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + anserbool = true; + } else { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } + answers.push(answerstwo); + } + questiontwo = { + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 2, + "question_title": object.question.question_title, + "question_type": 2, + "max_choices": object.question.max_choices, + "min_choices": object.question.min_choices, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + adddom.push(question); + for (var i = 0; i < this.state.poll_questions.length; i++) { + if (this.state.poll_questions[i].question.question_type === 2) { + Insertposition = i; + } + } + } else if (object.question.question_type === 3) { + //插入主观题 + var answers = []; + var questiontwo = {}; + + if (object.question.answers.length > 0) { + for (var y = 0; y < object.question.answers.length; y++) { + var answerstwo; + if (object.question.answers[y].answer_text === "其他") { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } else { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } + answers.push(answerstwo); + } + } + questiontwo = { + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 3, + "question_title": object.question.question_title, + "question_type": 3, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + adddom.push(question); + for (var i = 0; i < this.state.poll_questions.length; i++) { + if (this.state.poll_questions[i].question.question_type === 3) { + Insertposition = i; + } + } + } + this.setState({ + adddom: adddom, + newoption: anserbool, + Insertposition: Insertposition + }) + + } + + //新增添加题目 有new + addMytopic = (index, pollid, Insertposition, Whether, id) => { + //Whether 是否插入 + // console.log("id") + // console.log(id) + // console.log("Whether") + // console.log(Whether) + console.log("addMytopic 90") + if (this.state.q_countst > 0) { + this.props.showNotification(`不能同时编辑两题`); + + return; + } + this.state.Insertposition = Insertposition; + var Whethername = null; + if (Whether === true) { + Whethername = id; + } + this.setState({ + Insertposition: Insertposition, + q_countst: 1, + }) + window.scrollTo(0, this.refs.targetElement.offsetTop) + var arrr = this.state.adddom; + let newarrr = [...arrr]; + + var arr = this.state.poll_questions; + let newarr = [...arr]; + + if (newarr.length > 0) { + if (index === 1) { + // 插入单选题 + // console.log(this.state.poll_questions[newarr.length - 1].question.id); + var question = {} + var questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": this.state.poll_questions[newarr.length - 1].question.id + 1, + "is_necessary": 1, + "question_number": 1, + "question_title": "", + "question_type": 1, + "new": "new", + "answers": [ + {"answer_id": 1, "answer_position": 1, "answer_text": ""}, + {"answer_id": 2, "answer_position": 2, "answer_text": ""}, + {"answer_id": 3, "answer_position": 3, "answer_text": ""}, + {"answer_id": 4, "answer_position": 4, "answer_text": ""}, + // {"answer_id": 5, "answer_position": 5, "answer_text": "其他"}, + ] + }; + question = {"question": questiontwo}; + newarrr.push(question); + + this.setState({ + adddom: newarrr, + problemtopic: Whethername, + problemtopicbool: Whether, + }) + + } else if (index === 2) { + //插入多选题 + var question = {} + var questiontwo = { + "id": this.state.poll_questions[newarr.length - 1].question.id + 1, + "is_necessary": 1, + "question_number": 2, + "question_title": "", + "question_type": 2, + "max_choices": 0, + "min_choices": 0, + "new": "new", + "answers": [ + {"answer_id": 1, "answer_position": 1, "answer_text": ""}, + {"answer_id": 2, "answer_position": 2, "answer_text": ""}, + {"answer_id": 3, "answer_position": 3, "answer_text": ""}, + {"answer_id": 4, "answer_position": 4, "answer_text": ""}, + // {"answer_id": 5, "answer_position": 5, "answer_text": "其他"}, + ] + }; + question = {"question": questiontwo}; + newarrr.push(question); + + this.setState({ + adddom: newarrr, + problemtopic: Whethername, + problemtopicbool: Whether, + }) + + } else if (index === 3) { + //插入主观题 + // console.log(this.state.poll_questions[newarr.length - 1].question.id); + var question = {} + var questiontwo = { + "id": this.state.poll_questions[newarr.length - 1].question.id + 1, + "is_necessary": 1, + "question_number": 3, + "question_title": "", + "question_type": 3, + "new": "new", + "answers": [] + }; + question = {"question": questiontwo}; + newarrr.push(question); + this.setState({ + adddom: newarrr, + problemtopic: Whethername, + problemtopicbool: Whether, + }) + + } + } else { + /////上面视图全部删除后 要加载的 + if (index === 1) { + // 插入单选题 + var id; + try { + id = this.state.poll_questions[newarr.length - 1].question.id + 1 + } catch (e) { + id = 1; + } + var questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": id, + "is_necessary": 1, + "question_number": 1, + "question_title": "", + "question_type": 1, + "new": "new", + "answers": [ + {"answer_id": 1, "answer_position": 1, "answer_text": ""}, + {"answer_id": 2, "answer_position": 2, "answer_text": ""}, + {"answer_id": 3, "answer_position": 3, "answer_text": ""}, + {"answer_id": 4, "answer_position": 4, "answer_text": ""}, + // {"answer_id": 5, "answer_position": 5, "answer_text": "其他"}, + ] + }; + question = {"question": questiontwo}; + newarrr.push(question); + + this.setState({ + adddom: newarrr, + problemtopic: Whethername, + problemtopicbool: Whether, + }) + + } else if (index === 2) { + //插入多选题 + var id; + try { + id = this.state.poll_questions[newarr.length - 1].question.id + 1 + } catch (e) { + id = 1; + } + var questiontwo = { + "id": id, + "is_necessary": 1, + "question_number": 2, + "question_title": "", + "question_type": 2, + "max_choices": 0, + "min_choices": 0, + "new": "new", + "answers": [ + {"answer_id": 1, "answer_position": 1, "answer_text": ""}, + {"answer_id": 2, "answer_position": 2, "answer_text": ""}, + {"answer_id": 3, "answer_position": 3, "answer_text": ""}, + {"answer_id": 4, "answer_position": 4, "answer_text": ""}, + // {"answer_id": 5, "answer_position": 5, "answer_text": "其他"}, + ] + }; + question = {"question": questiontwo}; + newarrr.push(question); + + this.setState({ + adddom: newarrr, + problemtopic: Whethername, + problemtopicbool: Whether, + }) + + } else if (index === 3) { + //插入主观题 + var id; + try { + id = this.state.poll_questions[newarr.length - 1].question.id + 1 + } catch (e) { + id = 1; + } + var questiontwo = { + "id": id, + "is_necessary": 1, + "question_number": 3, + "question_title": "", + "question_type": 3, + "new": "new", + "answers": [] + }; + question = {"question": questiontwo}; + newarrr.push(question); + this.setState({ + adddom: newarrr, + problemtopic: Whethername, + problemtopicbool: Whether, + }) + } + } + } + + //删除指定条目 + deleteadddom = (indexo) => { + console.log("deleteadddom 259") + var arr = this.state.adddom; + let newarr = [...arr]; + + newarr.splice(indexo, 1); + this.setState({ + adddom: newarr, + q_countst: 0, + problemtopic: null, + problemtopicbool: false, + }) + } + //保存并继续 + //保存并继续,即提交本题的新建并继续创建一个相同的题(该新题处于编辑模式,题目和选项不要清空) + deleteadddomtwo = (indexo, object) => { + var thiss = this; + this.setState({ + q_countst: 1, + }) + var poll_questionslength = this.state.poll_questions.length; + // console.log("deleteadddomtwo|||||||||||||||||||||||||||||||||||||||||\\"); + // console.log(indexo); + // console.log(object); + // console.log(object.question.question_type); + let arr = this.state.adddom; + let arrpoll = this.state.poll_questions; + let newarr = [...arr]; + let newarrpoll = [...arrpoll]; + + //选项内容不能为空 + let max = 0; + let maxtie = newarr[indexo].question.answers.length; + for (var k = 0; k < newarr[indexo].question.answers.length; k++) { + try { + if (newarr[indexo].question.answers[k].answer_text != undefined) { + if (newarr[indexo].question.answers[k].answer_text === "") { + max = max + 1; + } + } + } catch (e) { + console.log("PollNew281") + console.log(e) + } + } + if (newarr[indexo].question.question_title === "") { + this.props.showNotification(`题目不能为空`); + + return + } + if (max > 0) { + if (object.question.question_type === 1) { + this.props.showNotification(`选项内容不能为空`); + + return + } else if (object.question.question_type === 2) { + this.props.showNotification(`选项内容不能为空`); + + return + } + + } + if (maxtie < 2) { + if (object.question.question_type === 1) { + this.props.showNotification(`选项不能少于2个!`); + + return + } else if (object.question.question_type === 2) { + this.props.showNotification(`选项不能少于2个!`); + + return + } + + + } + + if (object.question.question_type === 2) { + if (object.question.max_choices > 0) { + if (object.question.min_choices < 2) { + this.props.showNotification(`可选最小不能少于2个`); + + return; + + } + } + + } + if (object.question.new === "new") { + // 根据数组里面的new 来确定是否是新增还是 修改 + //添加道数组上 + //不能共用数组 所以自己写个新数组 然后push 上面卷子中 + var question = {}; + if (object.question.question_type === 1) { + + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + ///////////////////////////daying + // 这个是装选项和其他的 + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + + + } + + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + // 插入单选题 + // var id + // try { + // id = newarrpoll[newarrpoll.length - 1].question.id + 1; + // } catch (e) { + // id = 1; + // } + questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": null, + "is_necessary": object.question.is_necessary, + "question_number": 1, + "question_title": object.question.question_title, + "question_type": 1, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + var insindex = null; + // if (poll_questionslength !== thiss.state.Insertposition) { + // insindex = newarrpoll[thiss.state.Insertposition].question.id; + // } + if (this.state.problemtopicbool === true) { + insindex = this.state.problemtopic; + } + this.createquestionsandanswers(object, 1, arrc, null, 0, 0, insindex); + // newarrpoll.push(question); + newarrpoll.splice(thiss.state.Insertposition, 0, question); + + } else if (object.question.question_type === 2) { + //插入多选题 + if (object.question.max_choices < object.question.min_choices) { + this.props.showNotification(`可选的最大限制不能小于最小限制`); + + return; + } + + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + // var id + // try { + // id = newarrpoll[newarrpoll.length - 1].question.id + 1; + // } catch (e) { + // id = 1; + // } + questiontwo = { + "id": null, + "is_necessary": object.question.is_necessary, + "question_number": 2, + "question_title": object.question.question_title, + "question_type": 2, + "max_choices": object.question.max_choices, + "min_choices": object.question.min_choices, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + var insindex = null; + if (this.state.problemtopicbool === true) { + insindex = this.state.problemtopic; + } + this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, insindex); + //插入多选题 + // if (object.question.max_choices > arrc.length) { + // // console.log("选择题的最大可选项不能大于选项数") + // this.props.showNotification(`选择题的最大可选项不能大于选项数`); + // + // return; + // } + // if (object.question.min_choices === 0) { + // // console.log("选择题的最大可选项不能小于2项目") + // this.props.showNotification(`选择题的最大可选项不能小于2项目`); + // + // return; + // + // } + // newarrpoll.push(question); + newarrpoll.splice(thiss.state.Insertposition, 0, question); + } else if (object.question.question_type === 3) { + //插入主观题 + var answers = []; + var questiontwo = {}; + var answerstwos = []; + var answerstwoss = []; + if (object.question.answers.length > 0) { + for (var y = 0; y < object.question.answers.length; y++) { + var answerstwo; + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + answerstwoss.push(datatwo); + } + } + } + + answers = answerstwoss.concat(answerstwos); + // var id + // try { + // id = newarrpoll[newarrpoll.length - 1].question.id + 1; + // } catch (e) { + // id = 1; + // } + questiontwo = { + "id": null, + "is_necessary": object.question.is_necessary, + "question_number": 3, + "question_title": object.question.question_title, + "question_type": 3, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + // var insindex = null; + // if (poll_questionslength !== thiss.state.Insertposition) { + // insindex = newarrpoll[thiss.state.Insertposition].question.id; + // } + //主观题不需要可选选项 + var insindex = null; + if (this.state.problemtopicbool === true) { + insindex = this.state.problemtopic; + } + this.createquestionsandanswers(object, 3, null, null, 0, 0, insindex); + // newarrpoll.push(question); + newarrpoll.splice(thiss.state.Insertposition, 0, question); + } + //////////////////////////////////////////////////////////////////////////////////////////////////// 上面是新增 + } else { + ///////////////////////////////////////////////////////////////////////////////////////////////////修改点了编辑 + console.log("点了编辑") + var uuk = -1 + //这个地方判断 点了编辑上面题目又把他删除了 保存的时候就只能是插入新增了 + for (var uk = 0; uk < newarrpoll.length; uk++) { + if (object.question.id === newarrpoll[uk].question.id) { + uuk = uk; + } + } + + + var question = {}; + if (object.question.question_type === 1) { + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + ///////////////////////////daying + //这个装选项和其他的 + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + + + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + // 插入单选题 + questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 1, + "question_title": object.question.question_title, + "question_type": 1, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + if (uuk !== -1) { + // console.log("修改") + this.edittotheserver(object, 1, arrc, null, 0, 0); + newarrpoll.splice(uuk, 1, question); + } else { + // console.log("他原来的删除掉了") + this.createquestionsandanswers(object, 1, arrc, null, 0, 0, object.question.id); + newarrpoll.push(question); + } + newarr[indexo].question.new = "new" + // console.log(newarrpoll) + } else if (object.question.question_type === 2) { + //插入多选题 + + if (object.question.max_choices < object.question.min_choices) { + this.props.showNotification('可选的最大限制不能小于最小限制!'); + + return; + } + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + questiontwo = { + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 2, + "question_title": object.question.question_title, + "question_type": 2, + "max_choices": object.question.max_choices, + "min_choices": object.question.min_choices, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + //插入多选题 + // if (object.question.max_choices > arrc.length) { + // // console.log("选择题的最大可选项不能大于答案数") + // this.props.showNotification('选择题的最大可选项不能大于选项数!'); + // + // return; + // } + // if (object.question.min_choices === 0) { + // // console.log("选择题的最大可选项不能小于2项目") + // this.props.showNotification('选择题的最大可选项不能小于2项目!'); + // + // return; + // + // } + if (uuk !== -1) { + console.log("修改") + this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices); + newarrpoll.splice(uuk, 1, question); + } else { + console.log("删除") + this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, object.question.id); + newarrpoll.push(question); + } + console.log(newarrpoll) + newarr[indexo].question.new = "new" + } else if (object.question.question_type === 3) { + //插入主观题 + var answers = []; + var questiontwo = {}; + + if (object.question.answers.length > 0) { + for (var y = 0; y < object.question.answers.length; y++) { + var answerstwo; + if (object.question.answers[y].answer_text === "其他") { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } else { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } + answers.push(answerstwo); + } + } + questiontwo = { + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 3, + "question_title": object.question.question_title, + "question_type": 3, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + + if (uuk !== -1) { + console.log("修改") + this.edittotheserver(object, 3, null, null, 0, 0); + newarrpoll.splice(uuk, 1, question); + } else { + console.log("删除") + this.createquestionsandanswers(object, 3, null, null, 0, 0, object.question.id); + newarrpoll.push(question); + } + console.log(newarrpoll) + newarr[indexo].question.new = "new" + } + + } + + + //添加到上面列表中 + //改变题目总数 + if (object.question.question_type === 1) { + //单选题 + this.state.mysingles = this.state.mysingles + 1; + } else if (object.question.question_type === 2) { + //多选题 + this.state.mydoubles = this.state.mydoubles + 1; + } else if (object.question.question_type === 3) { + //主观题 + this.state.mymainsint = this.state.mymainsint + 1; + + } + this.setState({ + // poll_questions: newarrpoll, + adddom: newarr, + problemtopic: null, + problemtopicbool: false, + // mysingles: this.state.mysingles, + // mydoubles: this.state.mydoubles, + // mymainsint: this.state.mymainsint + }) + + } + + + //保存 后期可以考虑和保存并继续 合并 + //保存,即完成新建并退出本题编辑 + // indexo 第几个数组 + //object 单个数组数据 + deleteadddomthree = (indexo, object) => { + // console.log("deleteadddom 349") + var thiss = this; + let arr = this.state.adddom; + let arrpoll = this.state.poll_questions; + let newarr = [...arr]; + let newarrpoll = [...arrpoll]; + var poll_questionslength = this.state.poll_questions.length; //获取单前问题最大长度 + //选项内容不能为空 + let max = 0; + let maxtie = newarr[indexo].question.answers.length; + //判断选项值是否不为空 + for (var k = 0; k < newarr[indexo].question.answers.length; k++) { + try { + if (newarr[indexo].question.answers[k].answer_text != undefined) { + if (newarr[indexo].question.answers[k].answer_text === "") { + max = max + 1; + } + } + } catch (e) { + // console.log("PollNew281") + // console.log(e) + } + } + if (newarr[indexo].question.question_title === "") { + this.props.showNotification('题目不能为空!'); + return + } + if (max > 0) { + if (object.question.question_type === 1) { + this.props.showNotification('选项内容不能为空!'); + return + } else if (object.question.question_type === 2) { + this.props.showNotification('选项内容不能为空!'); + return + } + + } + if (maxtie < 2) { + if (object.question.question_type === 1) { + this.props.showNotification('选项不能少于2个!'); + return + } else if (object.question.question_type === 2) { + this.props.showNotification('选项不能少于2个!'); + return + } + + + } + + if (object.question.question_type === 2) { + if (object.question.max_choices > 0) { + if (object.question.min_choices < 2) { + this.props.showNotification(`可选最小不能少于2个`); + return; + } + } + } + if (object.question.new === "new") { + ///////////////////////////////////////////////////////////////////新增模式 + // 根据数组里面的new 来确定是否是新增还是 修改 + //添加道数组上 + //不能共用数组 所以自己写个新数组 然后push 上面卷子中 + var question = {}; + if (object.question.question_type === 1) { + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + ///////////////////////////daying + // 这个是装选项和其他的 + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + // 插入单选题' + // var id; + // try { + // id = newarrpoll[newarrpoll.length - 1].question.id + 1 + // } catch (e) { + // id = 1; + // } + questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": null, + "is_necessary": object.question.is_necessary, + "question_number": 1, + "question_title": object.question.question_title, + "question_type": 1, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + //获取指定id 号 用来插入,如果不是就是在最后添加 + + //执行新增操作 + var insindex = null; + if (this.state.problemtopicbool === true) { + insindex = this.state.problemtopic; + } + this.createquestionsandanswers(object, 1, arrc, null, 0, 0, insindex); + newarrpoll.splice(thiss.state.Insertposition, 0, question); + } else if (object.question.question_type === 2) { + //插入多选题 + if (object.question.max_choices < object.question.min_choices) { + this.props.showNotification(`可选的最大限制不能小于最小限制`); + + return; + } + + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + + questiontwo = { + "id": null, + "is_necessary": object.question.is_necessary, + "question_number": 2, + "question_title": object.question.question_title, + "question_type": 2, + "max_choices": object.question.max_choices, + "min_choices": object.question.min_choices, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + + var insindex = null; + if (this.state.problemtopicbool === true) { + insindex = this.state.problemtopic; + } + this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, insindex); + //插入多选题 + // if (object.question.max_choices > arrc.length) { + + newarrpoll.splice(thiss.state.Insertposition, 0, question); + } else if (object.question.question_type === 3) { + //插入主观题 + var answers = []; + var questiontwo = {}; + var answerstwos = []; + var answerstwoss = []; + if (object.question.answers.length > 0) { + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + answerstwoss.push(datatwo); + } + } + } + answers = answerstwoss.concat(answerstwos); + + questiontwo = { + "id": null, + "is_necessary": object.question.is_necessary, + "question_number": 3, + "question_title": object.question.question_title, + "question_type": 3, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + //主观题不需要可选选项 + + var insindex = null; + if (this.state.problemtopicbool === true) { + insindex = this.state.problemtopic; + } + this.createquestionsandanswers(object, 3, null, null, 0, 0, insindex); + // newarrpoll.push(question); + newarrpoll.splice(thiss.state.Insertposition, 0, question); + } + ///////////////////////////////////////////////////////////////////新增模式 + } else { + //////////////////////////////////////////////////////////////////////////////修改模式 + //修改 + var uuk = -1 + for (var uk = 0; uk < newarrpoll.length; uk++) { + if (object.question.id === newarrpoll[uk].question.id) { + uuk = uk; + console.log("删除了数据=-09876543234567890-111111111111") + } + } + + + var question = {}; + if (object.question.question_type === 1) { + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + ///////////////////////////daying + //这个装选项和其他的 + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + // 插入单选题 + questiontwo = { + // "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length, + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 1, + "question_title": object.question.question_title, + "question_type": 1, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + if (uuk !== -1) { + console.log("修改") + this.edittotheserver(object, 1, arrc, null, 0, 0); + newarrpoll.splice(uuk, 1, question); + } else { + console.log("删除") + this.createquestionsandanswers(object, 1, arrc, null, 0, 0, object.question.id); + newarrpoll.push(question); + } + console.log(newarrpoll) + } else if (object.question.question_type === 2) { + //插入多选题 + if (object.question.max_choices < object.question.min_choices) { + this.props.showNotification(`可选的最大限制不能小于最小限制`); + + return; + } + var questiontwo = {}; + var other = []; + var option = []; + var answerstwos = []; + var answerstwoss = []; + for (var y = 0; y < object.question.answers.length; y++) { + if (object.question.answers[y].answer_text === "其他") { + var dataone = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + other.push(object.question.answers[y].answer_text); + answerstwos.push(dataone); + } else { + var datatwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + option.push(object.question.answers[y].answer_text) + answerstwoss.push(datatwo); + } + } + var arrc = option.concat(other); + var answers = answerstwoss.concat(answerstwos); + questiontwo = { + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 2, + "question_title": object.question.question_title, + "question_type": 2, + "max_choices": object.question.max_choices, + "min_choices": object.question.min_choices, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + //插入多选题 + if (uuk !== -1) { + console.log("修改") + this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices); + newarrpoll.splice(uuk, 1, question); + } else { + console.log("删除") + this.createquestionsandanswers(object, 2, arrc, null, object.question.max_choices, object.question.min_choices, object.question.id); + newarrpoll.push(question); + } + console.log(newarrpoll) + + } else if (object.question.question_type === 3) { + //插入主观题 + var answers = []; + var questiontwo = {}; + + if (object.question.answers.length > 0) { + for (var y = 0; y < object.question.answers.length; y++) { + var answerstwo; + if (object.question.answers[y].answer_text === "其他") { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } else { + answerstwo = { + "answer_id": object.question.answers[y].answer_id, + "answer_position": object.question.answers[y].answer_position, + "answer_text": object.question.answers[y].answer_text + } + } + answers.push(answerstwo); + } + } + questiontwo = { + "id": object.question.id, + "is_necessary": object.question.is_necessary, + "question_number": 3, + "question_title": object.question.question_title, + "question_type": 3, + "new": "", + "answers": answers + }; + question = {"question": questiontwo}; + if (uuk !== -1) { + console.log("修改") + this.edittotheserver(object, 3, null, null, 0, 0); + newarrpoll.splice(uuk, 1, question); + } else { + console.log("删除") + this.createquestionsandanswers(object, 3, null, null, 0, 0, object.question.id); + newarrpoll.push(question); + } + console.log(newarrpoll) + + } + + } + + + //添加到上面列表中 + //改变题目总数 + if (object.question.question_type === 1) { + //单选题 + this.state.mysingles = this.state.mysingles + 1; + } else if (object.question.question_type === 2) { + //多选题 + this.state.mydoubles = this.state.mydoubles + 1; + } else if (object.question.question_type === 3) { + //主观题 + this.state.mymainsint = this.state.mymainsint + 1; + + } + + //这里更新数据 + if (this.state.q_countst == 1) { + this.setState({ + q_countst: 0, + }) + } + this.deleteadddom(indexo); + // console.log(indexo) + } + + + ////新增到服务器中 + createquestionsandanswers = (object, number, option, other, max_choices, min_choices, insert_id) => { + var thiss = this; + var poll_id = this.state.pollid; + var urlly = `/polls/${poll_id}/poll_questions.json` + var max_choicess = null; + var min_choicess = null; + if (max_choices === 0 && min_choices === 0) { + max_choicess = null; + min_choicess = null; + } else { + max_choicess = max_choices; + min_choicess = min_choices; + } + axios.post(urlly, { + question_title: object.question.question_title, + question_type: number, + is_necessary: object.question.is_necessary, + max_choices: max_choicess, + min_choices: min_choicess, + question_answers: option, + question_other_answer: null, + insert_id: insert_id + }).then((result) => { + // try { + if (result !== undefined) { + if (result.data.status === 0) { + this.props.showNotification(`已完成`); + thiss.thisinitializationdatanew(); + // console.log("确认创建问题") + // console.log(result) + // try { + // if (result.data.status === 0) { + // console.log("确认创建问题") + // console.log(JSON.stringify(result.data)) + // } + // } catch (e) { + // + // } + } + } + // } catch (e) { + // + // } + + }) + + + } + ///编辑修改到服务器当中 + edittotheserver = (object, number, option, other, max_choices, min_choices) => { + console.log("调用了edittotheserver") + var url = `/poll_questions/${object.question.id}.json` + var thiss = this; + axios.put(url, { + // debug: true, + question_title: object.question.question_title, + question_type: number, + is_necessary: object.question.is_necessary, + max_choices: max_choices, + min_choices: min_choices, + question_answers: option, + question_other_answer: null, + }).then((result) => { + try { + if (result.data.status === 0) { + this.props.showNotification(`编辑题目成功`); + thiss.thisinitializationdatanew(); + } + } catch (e) { + // console.log("调用了edittotheserver") + console.log(e) + } + }) + } + + //删除到服务器当中 + eletetoserver = (pollid, newarr, type, index) => { + console.log("调用了eletetoserver") + var id = pollid; + var url = `/poll_questions/${id}.json` + let {mysingles, mydoubles, mymainsint} = this.state + var thiss = this; + + axios + .delete(url, {}) + .then(function (response) { + console.log(response) + if (response === undefined) { + return; + } + if (response.data.message === "删除成功") { + thiss.props.showNotification(`删除成功`); + + newarr.splice(index, 1); + if (type === 1) { + mysingles = mysingles - 1; + } else if (type === 2) { + mydoubles = mydoubles - 1; + + } else if (type === 3) { + mymainsint = mymainsint - 1; + + } + // thiss.setState({ + // poll_questions: newarr, + // mysingles: mysingles, + // mydoubles: mydoubles, + // mymainsint: mymainsint + // }); + thiss.thisinitializationdatanew(); + } + }) + } + + //上下移到服务器中 + Upanddownmovementof = (bool, poll_question_id) => { + // console.log("调用了Upanddownmovementofr") + // console.log(poll_question_id) + var thiss = this; + if (bool === true) { + var url = `/poll_questions/${poll_question_id}/up_down.json`; + axios.post(url, { + opr: "up", + }).then((result) => { + try { + if (result.data.status === 0) { + this.props.showNotification(`上移成功`); + thiss.thisinitializationdatanew(); + } + // console.log(JSON.stringify(result)) + } catch (e) { + console.log("上移题目成功 错误") + console.log(e) + } + + }) + } else { + var url = `/poll_questions/${poll_question_id}/up_down.json`; + axios.post(url, { + opr: "down", + }).then((result) => { + try { + if (result.data.status === 0) { + // message.success("下移题目成功", 1) + this.props.showNotification(`下移成功`); + thiss.thisinitializationdatanew(); + } + // console.log(JSON.stringify(result)) + } catch (e) { + console.log("下移题目成功 错误") + console.log(e) + } + }) + } + + } + + //删除编辑新增条目 + //id 条目的唯一id + //i 为要删除的子条目 + deleteentrys = (id, i, stirngname) => { + console.log(id) + console.log(stirngname); + var arrtwoy = this.state.adddom; + let newarrtwoy = [...arrtwoy]; + for (var k = 0; k < newarrtwoy.length; k++) { + if (newarrtwoy[k] != undefined) { + if (newarrtwoy[k].question.id === id) { + for (var c = 0; c < newarrtwoy[k].question.answers.length; c++) { + if (c === i) { + // console.log("删除了") + // console.log(c) + newarrtwoy[k].question.answers.splice(c, 1); + } + } + } + } + } + if (stirngname === true) { + console.log(stirngname); + this.setState({ + newoption: false, + adddom: newarrtwoy, + + }) + } else { + console.log(stirngname); + this.setState({ + adddom: newarrtwoy, + }); + } + + + } + + + // 新增选项 + ewoption = (id, object) => { + console.log("ewoption 440") + console.log("是否是新建题目还是编辑") + // console.log(object.question.new) + + + let arrtwo = this.state.adddom; + let newarrtwo = [...arrtwo]; + + + for (var k = 0; k < newarrtwo.length; k++) { + // console.log(arrtwo[k].question.id); + if (newarrtwo[k] != undefined) { + if (newarrtwo[k].question.id === id) { + var data = { + "answer_id": newarrtwo[k].question.answers.length + 1, + "answer_position": newarrtwo[k].question.answers.length + 1, + "answer_text": "" + }; + //向头部添加元素 + // newarrtwo[k].question.answers.unshift(data); + //如果有其他这一项就删除掉 + if (newarrtwo[k].question.answers.length > 0) { + for (var o = 0; o < newarrtwo[k].question.answers.length; o++) { + if (newarrtwo[k].question.answers[o].answer_text != undefined) { + if (newarrtwo[k].question.answers[o].answer_text === "其他") { + newarrtwo[k].question.answers.splice(o, 0, data); + this.setState({ + adddom: newarrtwo + }) + return + } else { + if (o === newarrtwo[k].question.answers.length - 1) { + newarrtwo[k].question.answers.push(data); + this.setState({ + adddom: newarrtwo + }) + return + } + } + } + } + } else { + newarrtwo[k].question.answers.push(data); + this.setState({ + adddom: newarrtwo + }) + } + + } + } + } + + } + + + swapArray = (arr, index1, index2) => { + arr[index1] = arr.splice(index2, 1, arr[index1])[0]; + return arr; + } + + //新增其他选项 + addanotheroption = (id) => { + console.log("addanotheroption 457") + let arrtwo = this.state.adddom; + let newarrtwo = [...arrtwo]; + console.log(newarrtwo) + for (var k = 0; k < newarrtwo.length; k++) { + if (newarrtwo[k] != undefined) { + if (newarrtwo[k].question.id === id) { + var data = { + "answer_id": newarrtwo[k].question.answers.length + 1, + "answer_position": newarrtwo[k].question.answers.length + 1, + "answer_text": "其他" + }; + newarrtwo[k].question.answers.push(data); + } + } + } + this.setState({ + adddom: newarrtwo, + newoption: true, + }) + } + + + //点击向上排序按钮事件 + handleClickBySortUp = (index, object) => { + console.log("handleClickBySortUp 521") + let arr = this.state.poll_questions; + let newarr = [...arr]; + console.log(newarr) + if (index != 0) { + this.Upanddownmovementof(true, object.question.id); + let temp = newarr[index - 1]; + newarr[index - 1] = newarr[index]; + newarr[index] = temp; + this.setState({ + poll_questions: newarr, + }); + } + } + + //点击向下排序按钮事件 + handleClickBySortDown = (index, object) => { + console.log("handleClickBySortDown 536") + let arr = this.state.poll_questions; + let newarr = [...arr]; + // + if (index != newarr.length - 1) { + this.Upanddownmovementof(false, object.question.id); + let temp = newarr[index + 1]; + newarr[index + 1] = newarr[index]; + newarr[index] = temp; + this.setState({ + poll_questions: newarr, + }); + } else { + console.log("2222index==arr.length"); + console.log(this.state.poll_questions); + } + } + + //点击删除按钮事件 + handleClickByDelete = (type, index, object) => { + console.log("handleClickByDelete 556") + console.log("object.question.id") + console.log(object.question.id) + let arr = this.state.poll_questions; + let newarr = [...arr]; + this.eletetoserver(object.question.id, newarr, type, index) + + } + + // 数字输入监听 + //e为获取组件对象 + //i外层数组 + //k为内层数组 + handleInputChanges = (e, i, k) => { + console.log("handleInputChanges 612") + + let value = e.target.value;//取到input的数据 + console.log("handleInputChanges value is :" + value); + console.log(k); + let arr = this.state.adddom; + let newarr = [...arr]; + + newarr[i].question.answers[k].answer_text = value + this.setState({ + adddom: newarr + }) + + } + + //标题输入监听 + handleInputTopic = (e, i) => { + console.log("handleInputTopic 633") + + let value = e.target.value;//取到input的数据 + console.log("handleInputTopic value is :" + value); + console.log(i); + let arr = this.state.adddom; + let newarr = [...arr]; + newarr[i].question.question_title = value + this.setState({ + adddom: newarr + }) + } + + //最小值 + handleGradationGroupChangee = (value, index, max, length) => { + + debugger + var minbool = false; + var maxbool = false; + let arr = this.state.adddom; + if (parseInt(value) === 0 || parseInt(value) === "0" || parseInt(value) === null || parseInt(value) === undefined || parseInt(value) < 1) { + minbool = true; + } + if (max === 0 || max === "0" || max === null || max === undefined) { + maxbool = true; + } + + if (minbool === true && maxbool === true) { + for (var i = 0; i < arr.length; i++) { + if (index === i) { + arr[i].question.min_choices = parseInt(value); + } + } + this.setState({ + adddom: arr + }) + } else { + for (var i = 0; i < arr.length; i++) { + if (index === i) { + arr[i].question.min_choices = parseInt(value); + arr[i].question.max_choices = length; + } + } + this.setState({ + adddom: arr + }) + } + + } + + //最大值 + handleGradationGroupChangeee = (value, index) => { + + let arr = this.state.adddom; + for (var i = 0; i < arr.length; i++) { + if (index === i) { + arr[i].question.max_choices = parseInt(value); + } + } + this.setState({ + adddom: arr + }) + // console.log(this.state.adddom); + } + + //提交题目//没有就创建新的题库,新建问题和保存题目不一样不能同时保存 这里只是新建 和编辑 标题和须知 + submitQuestionnaire = () => { + console.log("调用了submitQuestionnaire") + if (this.state.Newedit === true) { + + this.newword(); + + } else { + if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { + this.props.showNotification("请输入标题"); + return + } + + if (this.state.polls_descriptiontest.length > 100) { + + } + var pollid; + if (this.state.pollid === undefined) { + pollid = this.props.match.params.pollid; + } else { + pollid = this.state.pollid; + } + + + var url = `/polls/${pollid}.json`; + axios.put(url, { + polls_name: this.state.polls_nametest, + polls_description: this.state.polls_descriptiontest + }).then((result) => { + try { + // console.log(JSON.stringify(result)) + if (result.data.status === 0) { + // console.log("更新题目成功") + // this.props.showNotification("保存成功"); + this.props.history.push(`/courses/${this.props.match.params.coursesId}/polls/${pollid}/detail?tab=2`) + } + } catch (e) { + + } + }) + } + } + + cancelmodel = () => { + + this.setState({ + Modalstype: false, + Modalstopval: "", + ModalsBottomval: "", + }) + + } + savedelete = (question_type, index, item) => { + console.log("savedelete"); + this.handleClickByDelete(question_type, index, item); + this.setState({ + Modalstype: false, + Modalstopval: "", + ModalsBottomval: "", + }) + } + // 问题的类型,1单选题,2为多选题,3为主观题 + showDeleteConfirm = (question_type, index, item) => { + this.setState({ + Modalstype: true, + Modalstopval: "是否确认删除?", + ModalsBottomval: "", + ModalCancel: this.cancelmodel, + ModalSave: () => this.savedelete(question_type, index, item), + }) + + } + //必答选项 + onCheckAllChange = (e, index) => { + console.log("onCheckAllChange"); + console.log(e.target.checked); + // console.log(e.target.value); + let arr = this.state.adddom; + for (var i = 0; i < arr.length; i++) { + if (index === i) { + if (e.target.checked === true) { + arr[i].question.is_necessary = 1; + + } else { + arr[i].question.is_necessary = 0; + } + } + } + this.setState({ + adddom: arr + }) + } + + //重新编辑标题和须知 + adddomeditit = () => { + if (this.state.mysave === true) { + this.setState({ + mysave: false, + readOnlys: "readOnly", + storagedesc:this.state.polls_nametest, + storagedesctwo:this.state.polls_descriptiontest, + }) + } else if (this.state.mysave === false) { + this.setState({ + mysave: true, + readOnlys: "", + storagedesc:this.state.polls_nametest, + storagedesctwo:this.state.polls_descriptiontest, + }) + } + } + //取消保存 + onSaveExercisetwo = () => { + if (this.state.mysave === true) { + this.setState({ + mysave: false, + Newedit: false, + readOnlys: "readOnly", + polls_nametest:this.state.storagedesc, + polls_descriptiontest:this.state.storagedesctwo, + }) + } else { + this.setState({ + mysave: false, + Newedit: false, + readOnlys: "readOnly", + polls_nametest:this.state.storagedesc, + polls_descriptiontest:this.state.storagedesctwo, + }) + } + } + // 创建问卷 + onSaveExercise = () => { + if (this.state.Newedit === true) { + + if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { + this.props.showNotification(`请输入标题`); + return + } + let coursesId = this.props.match.params.coursesId; + const urlls = `/courses/${coursesId}/polls.json` + axios.post(urlls, { + polls_name: this.state.polls_nametest, + polls_description: this.state.polls_descriptiontest + }).then((result) => { + if (result === undefined) { + return; + } + this.state.Newedit === false; + this.props.showNotification(`问卷创建成功!`); + this.setState({ + pollid: result.data.data.id, + Newedit: false, + mysave: false, + readOnlys: "readOnly", + cancellation: false, + }) + + + }) + } else { + if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { + this.props.showNotification("请输入标题"); + return + } + + var pollid; + if (this.state.pollid === undefined) { + pollid = this.props.match.params.pollid; + } else { + pollid = this.state.pollid; + } + + + var url = `/polls/${pollid}.json`; + axios.put(url, { + polls_name: this.state.polls_nametest, + polls_description: this.state.polls_descriptiontest + }).then((result) => { + if (result !== undefined) { + this.props.showNotification(`问卷更新成功!`); + this.setState({ + mysave: false, + readOnlys: "readOnly", + }) + } + + }) + } + + } + + //试图 + render() { + let { + addonAfter, + user_permission, + polls_status, + Modalstype, + mysave, + readOnlys, + newoption, + cancellation, + } = this.state + //获取老师权限 + // console.log("[`${maps[polls_status && polls_status]}`]]"); + // console.log(polls_status); + // console.log([[`${maps[polls_status && polls_status]}`]] + ""); + + const IsAdmin = this.props.isAdmin(); + const {getFieldDecorator} = this.props.form; + const formItemLayout = { + labelCol: { + xs: {span: 24}, + // sm: { span: 8 }, + sm: {span: 24}, + }, + wrapperCol: { + xs: {span: 24}, + // sm: { span: 16 }, + sm: {span: 24}, + }, + }; + + const radioStyle = { + display: 'block', + height: '30px', + lineHeight: '30px', + }; + + // console.log(this.state.projects===undefined?"":this.state.projects.poll_questions) + var displaymysave = (mysave === true) ? "" : "display:none;"; + return ( +
    + {/*提示*/} + {Modalstype && Modalstype === true ? : ""} +
    +

    + {this.props.coursedata.name} + > + 问卷 + > + {this.props.match.params.news === undefined ? "新建" : this.props.match.params.news === "new" ? "新建" : "编辑"} +

    +
    +

    {this.props.match.params.news === undefined ? "新建问卷" : this.props.match.params.news === "new" ? "新建问卷" : "编辑问卷"}

    + 返回 +
    + + {/*
    */} +
    + +
    + + +
    问卷须知
    + + + { + this.state.Newedit === true || this.state.mysave === true ? +
    + + {cancellation === false ? + + : ""} + +
    + : "" + } + +
    + +
    +

    + + + { + this.state.mysingles + this.state.mydoubles + this.state.mymainsint === 0 ? "" : +

    + + {this.state.mysingles === 0 ? "" : 单选题{this.state.mysingles === undefined ? "" : this.state.mysingles} 题} + + {this.state.mydoubles === 0 ? "" : + 多选题{this.state.mydoubles === undefined ? "" : this.state.mydoubles}题} + {this.state.mymainsint === 0 ? "" : + + 主观题{this.state.mymainsint === undefined ? "" : this.state.mymainsint}题 + + } + + + 合计 {this.state.mysingles === undefined ? "" : this.state.mydoubles === undefined ? "" : this.state.mymainsint === undefined ? "" : this.state.mysingles + this.state.mydoubles + this.state.mymainsint} +
    + + } + +

    +
    + + {/*自动生成修改好的获取到的*/} + {/**************************************************************************/} + {this.state.poll_questions === undefined ? "" : this.state.poll_questions.map((item, index) => { + // console.log('打印this.state.poll_questions') + // console.log(item.question) + let resultDom; + resultDom =
    +

    + 第{index + 1}题: + {item.question.question_type === 1 ? "(单选题)" : item.question.question_type === 2 ? "(多选题)" : "(主观题)"} + {item.question.is_necessary === 1 ? "必答" : item.question.question_type === 2 ? "选答" : "选答"} + {(item.question.min_choices === undefined && item.question.max_choices === undefined ? "" : item.question.min_choices === null && item.question.max_choices === null ? "" : item.question.min_choices === 0 && item.question.max_choices === 0 ? "" : "可选" + item.question.min_choices + "-" + item.question.max_choices + "项")} + { + polls_status === undefined || polls_status === 1 ? + + this.showDeleteConfirm(item.question.question_type, index, item)}> + {index === 0 ? "" : + this.handleClickBySortUp(index, item)}>} + {index === this.state.poll_questions.length - 1 ? "" : + this.handleClickBySortDown(index, item)}>} + this.addMytopic(item.question.question_type, this.state.pollid, index + 1, true, item.question.id)}> + this.adddomedit(item)}> + : this.adddomedit(item)}> + } + +

    +

    {item.question.question_title}

    + {/*
    {item.question.question_title}
    */} + {item.question.question_type === 1 ? + ( + {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { + return ( +
    + + {/*
    {items.answer_text}
    */} + {/*
    {items.answer_text}
    */} + {items.answer_text} + +
    + ) + })} +
    ) + : item.question.question_type === 2 ? + ( + {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { + return ( +
    + + {items.answer_text} + + {/*{items.answer_text}*/} +
    + ) + })} +
    ) + : item.question.question_type === 3 ? (
    ) : (
    )} +
    + + return ( +
    + {resultDom} +
    + ) + })} + {/**************************************************************************/} + {/*编辑用的新增用的*/} + {/**************************************************************************/} + + {this.state.adddom === undefined ? "" : this.state.adddom.map((itemo, indexo) => { + // console.log('打印this.state.adddom') + // console.log(itemo.question) + let arrid = itemo.question.id; + let resultDomtwo; + resultDomtwo = +
    + {itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"} + this.onCheckAllChange(e, indexo)} + className="lineh-40" + style={{"marginLeft": "20px"}}>必答 + + + + + {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => { + return ( +
    + {itemt.answer_text === undefined ? ( +
    ) : itemt.answer_text === "其他" ? ( +

    + 其它 + + + {polls_status === undefined || polls_status === 1 ? + this.deleteentrys(arrid, indext, true)}> + : ""} +

    ) : (

    + 选项 + + + {polls_status === undefined || polls_status === 1 ? + this.deleteentrys(arrid, indext, false)}> + : ""} +

    )} +
    + ) + })} + +
    + {itemo.question.question_type === 1 ? ( +
    +
    + {polls_status === undefined || polls_status === 1 ? + this.ewoption(itemo.question.id, itemo)}>新增选项 + + : ""} + {polls_status === undefined || polls_status === 1 ? + + (newoption === false ? + this.addanotheroption(itemo.question.id)}>新增其他选项 + : "") + : ""} + + this.deleteadddom(indexo)}>取消 + this.deleteadddomthree(indexo, itemo)}>保存 + this.deleteadddomtwo(indexo, itemo)}>保存并继续 + +
    +
    + + + ) + + + : itemo.question.question_type === 2 ? ( + //////////////////////////////////////////// 可选 +
    +
    +
    + 可选 +
    + {/*可选最小*/} + + + ~ + {/*可选最大*/} + + + (学生答题时,系统对其选择的选项个数进行限制,--表示不限制) +
    + +
    +
    +
    + ) + + : (
    ) + + } +
    +
    + {itemo.question.question_type === 2 ? + ( + polls_status === undefined || polls_status === 1 ? +
    + +
    this.ewoption(itemo.question.id, itemo)}>新增选项 + + { + newoption === false ? this.addanotheroption(itemo.question.id)}>新增其他选项 : "" + } + +
    + + + + this.deleteadddom(indexo)}>取消 + this.deleteadddomthree(indexo, itemo)}>保存 + this.deleteadddomtwo(indexo, itemo)}>保存并继续 + +
    + + + : "" + ) + + : itemo.question.question_type === 3 ? +
    + + this.deleteadddom(indexo)}>取消 + this.deleteadddomthree(indexo, itemo)}>保存 + this.deleteadddomtwo(indexo, itemo)}>保存并继续 + +
    + : + ""} + + +
    +
    + + + return ( +
    + {resultDomtwo} +
    + ) + })} + {/**************************************************************************/} + + {polls_status === undefined || polls_status === 1 ? +
    + { + this.props.match.params.news === "new" ? + this.state.Newedit === false ? +
    +
    + +
    + this.addmysingles()}>单选题 + this.addmydoubles()}>多选题 + this.addmymainsint()}>主观题 +
    +
    + + : "" + : +
    +
    +
    + this.addmysingles()}>单选题 + this.addmydoubles()}>多选题 + this.addmymainsint()}>主观题 +
    +
    + } +
    + :
    } +
    + { + this.props.match.params.news === "new" ? + (this.state.Newedit === false ? + + + : "") + : + + } + + {/**/} +
    +
    +
    + ) + } + +} + +const WrappedPollNew = Form.create({name: 'taskPollNew'})(PollNew); +// RouteHOC() export default (WrappedPollNew); \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index 735e3f396..7d34eb9a1 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -52,7 +52,26 @@ class TraineetraininginformationModal extends Component { // this.seacthdata(); } + componentWillReceiveProps(nextProps) { + // console.log("46"); + // console.log(nextProps); + // console.log(this.props); + if (nextProps.boolgalist != this.props.boolgalist) { + // console.log("50"); + // console.log(nextProps.user); + if (nextProps.boolgalist !== undefined) { + // console.log("53"); + // console.log(nextProps.user); + this.setState({ + boolgalist: nextProps.boolgalist, + }) + } + + } + + + } LimitNumber=(txt)=> { var str = txt; if(str.length>25){ @@ -62,7 +81,7 @@ class TraineetraininginformationModal extends Component { } render() { var columns; - if(this.props.boolgalis&&this.props.boolgalist === true) { + if(this.state.boolgalist&&this.state.boolgalist === true) { columns = [ { title: '关卡', From f2e7ebb3768d97f5b95c5a1ab6e9691085d66508 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, 26 Jun 2019 17:43:18 +0800 Subject: [PATCH 206/964] =?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 --- public/react/public/index.html | 8 +- public/react/public/index.test.html | 2 +- public/react/src/common/UrlTool.js | 101 +- .../page/component/monaco/TPIMonaco.js | 1017 +++++++++-------- public/react/src/modules/page/main/Webssh.js | 149 +-- public/react/src/modules/tpm/TPMIndexHOC.js | 11 +- 6 files changed, 644 insertions(+), 644 deletions(-) diff --git a/public/react/public/index.html b/public/react/public/index.html index 028b1cb68..bafefaf47 100755 --- a/public/react/public/index.html +++ b/public/react/public/index.html @@ -55,7 +55,7 @@ - + @@ -148,12 +148,12 @@ (function() { // Scoping function to avoid globals var href = location.href; if (href.indexOf('/tasks/') != -1) { - document.write(' From 6fba0358159ce73a49f35d4e319a5dbe7579d854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 2 Jul 2019 18:08:30 +0800 Subject: [PATCH 359/964] =?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/common/UnitUtil.js | 10 +++++----- .../src/modules/courses/Resource/Fileslistitem.js | 2 +- public/react/src/modules/login/LoginDialog.js | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/public/react/src/common/UnitUtil.js b/public/react/src/common/UnitUtil.js index bb3267aa4..ea4fb9e96 100644 --- a/public/react/src/common/UnitUtil.js +++ b/public/react/src/common/UnitUtil.js @@ -1,6 +1,6 @@ -export function bytesToSize(bytes) { - var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; - if (bytes == 0) return '0 Byte'; - var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); - return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i]; +export function bytesToSize(bytes) { + var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; + if (bytes == 0) return '0 Byte'; + var i = Math.floor(Math.log(bytes) / Math.log(1024)); + return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i]; } \ No newline at end of file diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index c778e14c7..b52efd3c1 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -233,7 +233,7 @@ class Fileslistitem extends Component{
    :"" } - {discussMessage.is_publish===true?:""} + {discussMessage.is_publish===false?:""} */} -// {/*
    */} -// {/*
    */} -// {/*{data&&data.work_description}*/} -// {/*
    */} -// {/*
    */} -// {/*
    */} -// {/*
    */} -// -// {/*
    */} -// {/*
    */} -// {/*
    图形统计
    */} -// {/**/} -// {/*
    */} -// {/*
    */} -// -// {/*
    */} -// {/*
    */} -// {/*
    实训详情
    */} -// {/**/} -// {/*{*/} -// {/*data&&data.shixun_detail.map((item,key)=>{*/} -// {/*return(*/} -// {/*
    */} -// {/*
    */} -// {/*

    */} -// {/**/} -// {/**/} -// {/**/} -// {/**/} -// {/*第{item.position}关*/} -// {/**/} -// {/*{item.subject}*/} -// {/**/} -// {/**/} -// {/*

    */} -// {/**/} -// {/*
    */} -// -// {/*{item.st===0?
    */} -// {/*
    */} -// {/*

    */} -// {/*最近通过的代码*/} -// {/*{item.path}*/} -// {/*

    */} -// -// {/*
    */} -// {/*
  • */} -// {/**/} -// {/*
  • */} -// {/*
    */} -// {/*
    */} -// {/*
    :""}*/} -// {/*
    */} -// {/*)*/} -// {/*})*/} -// {/*}*/} -// {/*
    */} -// {/*
    */} -// {/*
    */} -// +import React, {Component} from "react"; +import {WordsBtn} from 'educoder'; +import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Spin} from "antd"; +import {Link,Switch,Route,Redirect} from 'react-router-dom'; +import axios from 'axios'; +import ShixunCustomsPass from "./Shixunworkdetails/ShixunCustomsPass"; +import '../css/members.css'; +import "../common/formCommon.css"; +import '../css/Courses.css'; +import './style.css'; + + + + +class ShixunWorkDetails extends Component { + + constructor(props) { + super(props); + this.state = { + data:undefined, + spinning:true + } + } + + componentDidMount() { + this.setState({ + spinning:true + }) + let homeworkid=this.props.match.params.homeworkid; + let userid=this.props.match.params.userid; + let url = "/homework_commons/"+homeworkid+"/code_review_detail.json"; + axios.get(url,{ + params: { + user_id:userid, + } + }).then((result) => { + if (result.status === 200) { + this.setState({ + data:result.data, + spinning:false + }) + } + }).catch((error) => { + console.log(error) + }) + + let query = this.props.location.pathname; + const type = query.split('/'); + this.setState({ + shixuntypes:type[3] + }) + } + + goback=()=>{ + window.history.go(-1) + } + render() { + + let{data}=this.state; + console.log(data) + return ( + + {data===undefined? "":
    +
    + +
    +

    + + + {data&&data.course_name} + + + > + + + 实训作业 + + + > + {data&&data.username} +

    +
    + +
    + {data&&data.homework_common_name} + 返回 +
    + +
    + 非编程类型任务,不参与查重 + + 被查作品: + {data&&data.username} + {data&&data.final_score}分 + +
    + +
    +
    + +
    +
    + + + +
    +
    } +
    + ) + } +} + +export default ShixunWorkDetails; + + + + +// {/*
    */} +// {/*
    */} +// +// {/*
    总体评价
    */} +// +// {/**/} +// +// {/*
    */} +// {/*
    */} +// +// {/*
    */} +// {/*
    */} +// +// {/*
    阶段成绩
    */} +// +// {/**/} +// +// {/*
    */} +// {/*
    */} +// +// {/*
    */} +// {/*
    */} +// {/*
    个人总结
    */} +// {/**/} +// {/*
    */} +// {/*
    */} +// {/*{data&&data.work_description}*/} +// {/*
    */} +// {/*
    */} +// {/*
    */} +// {/*
    */} +// +// {/*
    */} +// {/*
    */} +// {/*
    图形统计
    */} +// {/**/} +// {/*
    */} +// {/*
    */} +// +// {/*
    */} +// {/*
    */} +// {/*
    实训详情
    */} +// {/**/} +// {/*{*/} +// {/*data&&data.shixun_detail.map((item,key)=>{*/} +// {/*return(*/} +// {/*
    */} +// {/*
    */} +// {/*

    */} +// {/**/} +// {/**/} +// {/**/} +// {/**/} +// {/*第{item.position}关*/} +// {/**/} +// {/*{item.subject}*/} +// {/**/} +// {/**/} +// {/*

    */} +// {/**/} +// {/*
    */} +// +// {/*{item.st===0?
    */} +// {/*
    */} +// {/*

    */} +// {/*最近通过的代码*/} +// {/*{item.path}*/} +// {/*

    */} +// +// {/*
    */} +// {/*
  • */} +// {/**/} +// {/*
  • */} +// {/*
    */} +// {/*
    */} +// {/*
    :""}*/} +// {/*
    */} +// {/*)*/} +// {/*})*/} +// {/*}*/} +// {/*
    */} +// {/*
    */} +// {/*
    */} +// diff --git a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js index 8b7bbb544..056414904 100644 --- a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js +++ b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js @@ -87,7 +87,7 @@ class ShixunWorkModal extends Component{ let {page,limit,group_list}=this.state; let newpage=page+1; let newgroup_list=group_list; - + debugger let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json"; axios.get(url,{params:{ @@ -97,7 +97,7 @@ class ShixunWorkModal extends Component{ }).then((response) => { if(response!==null || response!==undefined){ if(response.data.group_list.length>0){ - console.log("84"); + response.data.group_list.map((item,key)=>{ newgroup_list.push(item); this.setState({ @@ -111,8 +111,7 @@ class ShixunWorkModal extends Component{ if(response.data.ungroup_list===undefined || response.data.ungroup_list === null) { }else { - console.log("95"); - console.log(response.data.ungroup_list); + newgroup_list.push(response.data.ungroup_list); this.setState({ course_groups:response.data, @@ -244,24 +243,23 @@ class ShixunWorkModal extends Component{ .fontlefts{text-align: left;} `}
      -
    • 分班名称
    • -
    • 有效作品数
    • +
    • 分班名称
    • +
    • 有效作品数
    • 上次查重时间
    {course_groups===undefined?"":
    - ) - } -} +import React, { Component } from 'react'; +import { SnackbarHOC } from 'educoder'; +import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; +import {Tooltip,Pagination,Spin} from 'antd'; +import axios from 'axios'; +import NoneData from '../../courses/coursesPublic/NoneData' +import {getImageUrl} from 'educoder'; +import "./usersInfo.css" +import Create from './publicCreatNew' + +class InfosProject extends Component{ + constructor(props){ + super(props); + this.state={ + category:undefined, + status:undefined, + page:1, + per_page:16, + + totalCount:undefined, + data:undefined, + isSpin:false + } + } + + componentDidMount=()=>{ + this.setState({ + isSpin:true + }) + let{category,status,page}=this.state; + this.getCourses(category,status,page); + } + + getCourses=(category,status,page)=>{ + let url=`/users/${this.props.match.params.username}/projects.json`; + axios.get((url),{params:{ + category, + status, + page, + per_page:this.props.is_current && category && page ==1?17:16 + }}).then((result)=>{ + if(result){ + this.setState({ + totalCount:result.data.count, + data:result.data, + isSpin:false + }) + } + }).catch((error)=>{ + console.log(error); + }) + } + + //切换种类 + changeCategory=(cate)=>{ + this.setState({ + category:cate, + page:1, + isSpin:true + }) + let{status}=this.state; + this.getCourses(cate,status,1); + } + //切换状态 + changeStatus=(status)=>{ + this.setState({ + status:status, + page:1, + isSpin:true + }) + let{category}=this.state; + this.getCourses(category,status,1); + } + //切换页数 + changePage=(page)=>{ + this.setState({ + page, + isSpin:true + }) + let{category,status}=this.state; + this.getCourses(category,status,page); + } + + // 进入项目 + turnToCourses=(url,flag)=>{ + if(flag){ + this.props.history.push(url); + } + } + + render(){ + let{ + category, + status, + page, + data, + totalCount, + isSpin + } = this.state; + let isStudent = this.props.isStudent(); + let is_current=this.props.is_current; + return( +
    + + + { + is_current && + + } +

    + 共参与{totalCount}个{category?category=="manage"?"发布":"学习":"项目"} + 时间最新 +

    +
    + { + !isStudent && page == 1 && !category && is_current && + + } + { + (!data || data.projects.length==0) && (isStudent || category) && + } + { + data && data.projects && data.projects.map((item,key)=>{ + return( +
    this.turnToCourses(`/projects/${item.id}`,item.can_visited)} style={{"cursor": "pointer"}}> + { + item.is_public==1 && + +
    + + 公开 +
    + } + { + item.can_visited ==false? +
    + +

    非成员不能访问

    +
    :"" + } +
    +

    + {item.name} +

    + 用户 +

    {item.owner.real_name}

    +

    {item.owner.school_name}

    +
    +
    +
    + { + item.members_count> 0 && + + {item.members_count} + } + { + item.issues_count> 0 && + + {item.issues_count} + } + { + item.changesets_count> 0 && + + {item.changesets_count} + } +
    +
    +
    + ) + }) + } +
    + { + totalCount > 15 && +
    + +
    + } +
    +
    + ) + } +} export default InfosProject; \ No newline at end of file From 7a73f04bf17e3cd315c339a8f2b260f7524129a8 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 14:30:57 +0800 Subject: [PATCH 852/964] Merge branch 'master' of https://bdgit.educoder.net/Hjqreturn/educoder # Conflicts: # public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js --- public/react/src/modules/tpm/NewHeader.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 0cb776245..2f1195644 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -702,7 +702,9 @@ submittojoinclass=(value)=>{ {/**/} -
    +
    console.log(value)} @@ -792,7 +794,7 @@ submittojoinclass=(value)=>{ {this.props.current_user&&this.props.current_user.user_identity==="学生"?"":
  • 新建课堂
  • }
  • 新建实训
  • 新建实践课程
  • -
  • 新建项目
  • +
  • 新建项目
    • From 881d777a846dc8ddb1c90eb0231ec0ff05bbfb7f Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 14:38:54 +0800 Subject: [PATCH 853/964] !! --- public/react/src/modules/page/main/CodeEvaluateView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/page/main/CodeEvaluateView.js b/public/react/src/modules/page/main/CodeEvaluateView.js index 16932b818..a121a53d5 100644 --- a/public/react/src/modules/page/main/CodeEvaluateView.js +++ b/public/react/src/modules/page/main/CodeEvaluateView.js @@ -184,9 +184,9 @@ class CodeEvaluateView extends Component { { headIconClass && } { _headLockIconClass && } - { item.ts_mem && 消耗内存{item.ts_mem}MB } - { item.ts_mem && item.ts_time && } - { item.ts_time && 代码执行时长:{item.ts_time}秒 } + { !!item.ts_mem && 消耗内存{item.ts_mem}MB } + { !!item.ts_mem && !!item.ts_time && } + { !!item.ts_time && 代码执行时长:{item.ts_time}秒 }

    From b6c33a7256de78f9519749025dc714b0b816b4af Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 14:39:04 +0800 Subject: [PATCH 854/964] 8 --- public/react/src/modules/page/taskList/TaskList.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/taskList/TaskList.css b/public/react/src/modules/page/taskList/TaskList.css index b8899ddc1..46dfd5076 100644 --- a/public/react/src/modules/page/taskList/TaskList.css +++ b/public/react/src/modules/page/taskList/TaskList.css @@ -26,7 +26,7 @@ height: 22px; width: 0px; position: absolute; - top: 13px; + top: 8px; } #all_task_index .grades { From 359333e8ab5cb83b1aaaf47dca5e0688655bc3df 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, 20 Jul 2019 14:49:59 +0800 Subject: [PATCH 855/964] =?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/App.js | 2 + public/react/src/AppConfig.js | 4 +- .../src/common/components/Notcompleted.js | 1 - .../src/common/components/SetAppModel.js | 8 +- .../src/modules/login/Trialapplicationysl.js | 722 ++++++++++++++++++ public/react/src/modules/tpm/NewHeader.js | 4 +- .../react/src/modules/user/Notcompletedysl.js | 70 ++ 7 files changed, 799 insertions(+), 12 deletions(-) create mode 100644 public/react/src/modules/login/Trialapplicationysl.js create mode 100644 public/react/src/modules/user/Notcompletedysl.js diff --git a/public/react/src/App.js b/public/react/src/App.js index b7658450a..28a7e977e 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -14,6 +14,7 @@ import '@icedesign/base/dist/ICEDesignBase.css'; import '@icedesign/base/index.scss'; import LoginDialog from './modules/login/LoginDialog' +import Notcompletedysl from './modules/user/Notcompletedysl' import Trialapplication from './modules/login/Trialapplication' import NotFoundPage from './NotFoundPage' @@ -264,6 +265,7 @@ class App extends Component { + {/*{*/} {/* isRender === true?*/} {/* : ""*/} diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 159694da8..b3cfd7cf9 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -111,7 +111,6 @@ export function initAxiosInterceptors(props) { if(response===undefined){ return } - // locationurl(402); const config = response.config if (response.data.status === -1) { // console.error('error:', response.data.message) @@ -155,10 +154,9 @@ export function initAxiosInterceptors(props) { } if (response.data.status === 402) { - debugger console.log(response.data.status); console.log(response.data); - locationurl(402); + // locationurl(402); } diff --git a/public/react/src/common/components/Notcompleted.js b/public/react/src/common/components/Notcompleted.js index e974003de..d7998ca27 100644 --- a/public/react/src/common/components/Notcompleted.js +++ b/public/react/src/common/components/Notcompleted.js @@ -1,5 +1,4 @@ import React, { Component } from 'react'; -import {getImageUrl} from 'public/react/src/common/educoder'; import { Modal} from 'antd'; import axios from 'axios'; import '../../modules/user/common.css'; diff --git a/public/react/src/common/components/SetAppModel.js b/public/react/src/common/components/SetAppModel.js index a504beb69..b71a408c6 100644 --- a/public/react/src/common/components/SetAppModel.js +++ b/public/react/src/common/components/SetAppModel.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { Modal } from 'antd'; -export function SetAppModel(options) { +export function SetAppModel(options={}) { return function wrap(WrappedComponent) { return class Wrapper extends Component { constructor(props) { @@ -9,9 +9,6 @@ export function SetAppModel(options) { this.state = { } - console.log("SetAppModel"); - console.log("13"); - console.log(options); } modalCancel=()=>{ window.location.href = "/"; @@ -26,7 +23,6 @@ export function SetAppModel(options) { render() { const { titlemessage, Modallisttype, Modallist, singleButton } = this.state; - console.log(this.state.Notcompleteds); return (
    diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js new file mode 100644 index 000000000..ec7bebcda --- /dev/null +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -0,0 +1,722 @@ +import React, {Component} from 'react'; +import {Redirect} from 'react-router'; +import Dialog, { + DialogActions, + DialogContent, + DialogContentText, + DialogTitle, +} from 'material-ui/Dialog'; +import axios from 'axios'; + +import {broadcastChannelPostMessage} from 'educoder' +import {Tabs, Input, Checkbox, Button, notification, Menu} from 'antd'; + + +//试用申请 +class Trialapplicationysl extends Component { + // isRender控制弹出窗口显示 + constructor(props) { + super(props) + this.state = { + props: props, + login: "", + Phonenumberisnotcocodes: undefined, + codes: "", + reason: "", + Phonenumberisnotcoreason: undefined, + isRenders: false, + seconds: 60, + getverificationcodes: true, + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: false, + readonlyInput: true, + user_phone_binded: props.user_phone_binded, + showTrial: false, + user: undefined, + borredss:"bor-reds", + borredssz:"bor-reds fl mr5", + } + //user_phone_binded 判断是否手机号验证 + // console.log("Trialapplication"); + // console.log(props); + } + + Cancel = () => { + this.props.Cancel() + } + + componentWillReceiveProps(nextProps) { + // console.log("46"); + // console.log(nextProps); + // console.log(this.props); + if (nextProps.user != this.props.user) { + // console.log("50"); + // console.log(nextProps.user); + if (nextProps.user !== undefined) { + // console.log("53"); + // console.log(nextProps.user); + this.setState({ + user_phone_binded: nextProps.user.user_phone_binded, + }) + } + + + } + + + } + + + //初始化数据 + componentDidMount() { + // console.log("53"); + // + // console.log(this.props.isRenders); + + if (this.props.isRenders != undefined) { + this.setState({ + isRenders: this.props.isRenders + }) + } + if (this.props.showTrial != undefined) { + // 判断是否返回主页的参数 + this.setState({ + showTrial: this.props.showTrial + }) + + } + axios.interceptors.response.use((response) => { + if (response != undefined) + if (response && response.data.status === 407) { + this.setState({ + isRenders: true + }) + } + return response; + }, (error) => { + //TODO 这里如果样式变了会出现css不加载的情况 + + }); + + } + + //获取登入 + loginInputonChange = (e) => { + // console.log(e.target.value); + this.setState({ + login: e.target.value, + }) + + + } + //获取申请理由 + loginInputonChanges = (e) => { + // console.log(e.target.value); + this.setState({ + reason: e.target.value, + Phonenumberisnotcoreason: undefined, + }) + + + } + //获取code + codesonChange = (e) => { + this.setState({ + codes: e.target.value, + Phonenumberisnotcocodes: undefined, + }) + } + + openNotification = (messge) => { + notification.open({ + message: "提示", + description: + messge, + onClick: () => { + console.log('Notification Clicked!'); + }, + }); + }; + //倒计时 + getverificationcode = () => { + if (this.state.Phonenumberisnotcobool === false) { + if (this.state.login.length === 0) { + this.setState({ + Phonenumberisnotco: "请输入正确的手机号或邮箱", + }) + return + } else { + this.setState({ + Phonenumberisnotco: "请输入正确的手机号或邮箱", + }) + } + return; + } + if (this.state.getverificationcodes === true) { + this.setState({ + getverificationcodes: undefined, + }) + let timer = setInterval(() => { + this.setState((preState) => ({ + seconds: preState.seconds - 1, + }), () => { + if (this.state.seconds == 0) { + clearInterval(timer); + this.setState({ + getverificationcodes: false, + seconds: 60, + }) + } + }); + }, 1000) + this.SMSverification(); + } else { + this.setState({ + getverificationcodes: undefined, + }) + let timer = setInterval(() => { + this.setState((preState) => ({ + seconds: preState.seconds - 1, + }), () => { + if (this.state.seconds == 0) { + clearInterval(timer); + this.setState({ + getverificationcodes: false, + seconds: 60, + + }) + } + }); + }, 1000) + this.SMSverification(); + } + } + + //短信验证 + SMSverification = () => { + var url = `/accounts/get_verification_code.json`; + axios.get((url), { + params: { + login: this.state.login, + type: 3, + } + }).then((result) => { + //验证有问题{"status":1,"message":"success"} + // console.log(result); + + + }).catch((error) => { + console.log(error); + + }) + } + + handleDialogClose() { + if (this.state.showTrial === false) { + this.setState({ + isRenders: false + }) + this.Cancel(); + window.location.href = "/"; + } else { + this.setState({ + isRenders: false + }) + this.Cancel(); + } + + } + + postregistered = () => { + //提交按钮 + if (this.state.user_phone_binded === false) { + + if (this.state.Phonenumberisnotcobool === false) { + var iphones = ""; + if (this.state.Phonenumberisnotco === undefined || this.state.Phonenumberisnotco === null || this.state.Phonenumberisnotco === "") { + iphones = "请输入手机号"; + } else { + iphones = this.state.Phonenumberisnotco; + } + + this.setState({ + Phonenumberisnotco: iphones, + }) + + return; + } + if (this.state.codes.length === 0) { + this.setState({ + Phonenumberisnotcocodes: "请输入验证码", + }) + return; + } + + } + + if (this.state.reason.length === 0) { + this.setState({ + Phonenumberisnotcoreason: "请输入推荐人信息或申请理由", + }) + return; + } + + var thiss = this; + var url = "/users/trial_apply.json"; + axios.post(url, { + phone: this.state.login, + code: this.state.codes, + reason: this.state.reason, + }).then((result) => { + // console.log(result); + // this.onTabChange("1"); + if(result !== undefined){ + this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); + // if (this.state.showTrial === false) { + window.location.href = "/"; + this.setState({ + isRenders: false + }) + this.Cancel(); + // } else { + // this.setState({ + // isRenders: false + // }) + // this.Cancel(); + // + // } + } + }).catch((error) => { + + }) + + + } + inputOnBlur = (e) => { + this.isCorrectname(e.target.value); + // this.Emailphonenumberverification(e.target.value, id); + } + isCorrectname = (value) => { + console.log(value.length); + if (value.length === 0) { + this.setState({ + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: false, + }) + return; + } + // var telephone = $("#telephoneAdd.tianjia_phone").val(); + var regph = /^[1][3,4,5,6,7,8][0-9]{9}$/; + // var email = $("#add_email.tianjia_email").val(); + var regemail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/; + + // [1]手机号开头必须是1 [3,4,5,6,7,8] 第二位是3-8中的一个 [0-9]{9} 后边9位可以是0-9的任意数字。 + var stringdata = undefined; + if (!regph.test(value)) { + stringdata = "手机号格式不正确"; + this.setState({ + Phonenumberisnotco: stringdata, + Phonenumberisnotcobool: false, + }) + } else { + this.setState({ + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: true, + }) + return + } + + if (!regemail.test(value)) { + if ((value.indexOf("@") != -1) === true) { + stringdata = "邮箱格式不正确"; + } else { + stringdata = "手机号格式不正确"; + + } + this.setState({ + Phonenumberisnotco: stringdata, + Phonenumberisnotcobool: false, + }) + + // this.Emailphonenumberverification(value) + return + } else { + this.setState({ + Phonenumberisnotco: undefined, + Phonenumberisnotcobool: true, + }) + return + } + } + //邮箱手机号验证 + Emailphonenumberverification = (value) => { + var url = `/accounts/valid_email_and_phone.json`; + axios.get((url), { + params: { + login: value, + type: 2, + } + }).then((result) => { + //验证有问题{"status":1,"message":"success"} + // console.log(result); + + + }).catch((error) => { + console.log(error); + // this.setState({ + // login:"", + // logins:"", + // }) + }) + } + + //执行view + render() { + let {login, codes, reason, isRenders, user_phone_binded,borredss,borredssz, Phonenumberisnotco, getverificationcodes, Phonenumberisnotcocodes, Phonenumberisnotcoreason, seconds} = this.state; + // console.log("Trialapplication22222222"); + // console.log(this.props); + + return ( +
    + { + isRenders === false ? "" : + +
    + + + + + +
    { + this.handleDialogClose() + }}> + +
    +
    + +
    +
      + 试用申请 +
    + +
    +
    + 您尚未获得访问权限,请如实填写下述信息 +
    +
    + 管理员审核批准后,即可继续访问网站 +
    + + { + user_phone_binded === true ? "" : +
    + this.inputOnBlur(e)} + style={{"height": "38px",}} + className={Phonenumberisnotco && Phonenumberisnotco !== ""?borredss:""} + name="myiphone" + > + { + Phonenumberisnotco && Phonenumberisnotco != "" ? +

    + {Phonenumberisnotco} +

    + :
    + } +
    + } + + + { + user_phone_binded === true ? "" : +
    + + + + + { + getverificationcodes === undefined ? + + : getverificationcodes === true ? + + : + + } +
    + } + + + { + Phonenumberisnotcocodes && Phonenumberisnotcocodes != "" ? +

    + {Phonenumberisnotcocodes} +

    + :
    + } +
    + + { + Phonenumberisnotcoreason && Phonenumberisnotcoreason !== "" ? +

    + {Phonenumberisnotcoreason} +

    + :
    + } +
    + + + + +
    + + +
    + +
    +
    + + } +
    + + + ) + + + } + + +} + +export default Trialapplicationysl; diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index c672caa84..a4790ea6d 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -18,7 +18,7 @@ import Addcourses from '../courses/coursesPublic/Addcourses'; import LoginDialog from '../login/LoginDialog'; -import Trialapplication from '../login/Trialapplication' +import Trialapplicationysl from '../login/Trialapplicationysl' import 'antd/lib/modal/style/index.css'; @@ -629,7 +629,7 @@ submittojoinclass=(value)=>{ {/* />*/} {/* :""*/} {/*}*/} - this.cancelModulationModels()} > + this.cancelModulationModels()} >
    {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} diff --git a/public/react/src/modules/user/Notcompletedysl.js b/public/react/src/modules/user/Notcompletedysl.js new file mode 100644 index 000000000..cc7a78e13 --- /dev/null +++ b/public/react/src/modules/user/Notcompletedysl.js @@ -0,0 +1,70 @@ +import React, { Component } from 'react'; +import { Modal} from 'antd'; +import axios from 'axios'; +import '../../modules/user/common.css'; +//完善个人资料 +class Notcompletedysl extends Component { + + constructor(props) { + super(props) + this.state ={ + modalsType:false, + } + + } + componentDidMount() { + // console.log("Notcompletedysl"); + // console.log("开发了402了"); + + axios.interceptors.response.use((response) => { + // console.log(response); + if (response != undefined) + if (response && response.data.status === 402) { + this.setState({ + modalsType: true + }) + } + return response; + }, (error) => { + //TODO 这里如果样式变了会出现css不加载的情况 + + }); + + } + + modalCancel=()=>{ + window.location.href = "/"; + } + + setDownload=()=>{ + window.location.href ='/account/profile'; + } + + + render() { + console.log(this.props) + return( + + + + ) + } +} + +export default Notcompletedysl; \ No newline at end of file From 85ac1dfdf07d9a01c86bdb9464642c4ff35560bd 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, 20 Jul 2019 14:54:38 +0800 Subject: [PATCH 856/964] =?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/modules/user/LoginRegisterComponent.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index efd04db70..6a1ef1288 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -128,14 +128,17 @@ class LoginRegisterComponent extends Component { console.log("11111111111111111111111111"); this.state = { tab:["0"], - pciphone:pcipns, + } } else if (this.props.match.url === "/register") { this.state = { tab:["1"], - pciphone:pcipns, + } } + this.setState({ + pciphone:pcipns, + }) } From fc8614a33ad1d0a90cbfc2e4c1457eb645a93f68 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, 20 Jul 2019 14:57:38 +0800 Subject: [PATCH 857/964] =?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/modules/user/ReadPassword.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/user/ReadPassword.js b/public/react/src/modules/user/ReadPassword.js index 68072657a..6beab8e62 100644 --- a/public/react/src/modules/user/ReadPassword.js +++ b/public/react/src/modules/user/ReadPassword.js @@ -14,7 +14,7 @@ class ReadPassword extends Component { setDownload=()=>{ //立即联系 - this.props.StudyMakeMoney() + window.location.href = "/login" } From 724da87ba2dc1690ffc15e75539018d9d802c3ba 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, 20 Jul 2019 15:10:12 +0800 Subject: [PATCH 858/964] =?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 | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 078c3132c..63c318f19 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -10,26 +10,25 @@ broadcastChannelOnmessage('refreshPage', () => { }) function locationurl(list){ - if (window.location.port === "3007") { + if (window.location.port === "3007") { - } else { + } else { - if(list===402){ - SetAppModel(402) - }else if(list===407){ + if(list===402){ + SetAppModel(402) + }else if(list===407){ - }else{ - window.location.replace(list) - } + }else{ + window.location.replace(list) + } - } + } } // TODO 开发期多个身份切换 -const debugType ="" -// window.location.search.indexOf('debug=t') != -1 ? 'teacher' : -// window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' -// window._debugType = debugType; +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) { 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 859/964] 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 c2962c961231478f1842d429b603b4e624a9a68f 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 15:31:37 +0800 Subject: [PATCH 860/964] =?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 --- public/react/src/AppConfig.js | 8 +++---- .../courses/coursesPublic/ShixunModal.js | 22 ++++++++++--------- .../src/modules/courses/new/CoursesNew.js | 8 ++++++- public/react/src/modules/home/shixunsHome.js | 16 +++++++------- public/react/src/modules/tpm/TPMBanner.js | 19 ++++++++++++---- 5 files changed, 46 insertions(+), 27 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 3f34ee7a6..b8e98fd8e 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -26,10 +26,9 @@ function locationurl(list){ } // TODO 开发期多个身份切换 -const debugType ="" -// window.location.search.indexOf('debug=t') != -1 ? 'teacher' : -// window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' -// window._debugType = debugType; +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) { @@ -44,6 +43,7 @@ export function initAxiosInterceptors(props) { proxy="http://47.96.87.25:48080" + // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; // 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制 const requestMap = {}; diff --git a/public/react/src/modules/courses/coursesPublic/ShixunModal.js b/public/react/src/modules/courses/coursesPublic/ShixunModal.js index f0caef87b..1fc218908 100644 --- a/public/react/src/modules/courses/coursesPublic/ShixunModal.js +++ b/public/react/src/modules/courses/coursesPublic/ShixunModal.js @@ -146,12 +146,22 @@ class ShixunModal extends Component{ } savecouseShixunModal=()=>{ + this.setState({ hometypepvisible:true }) let {coursesId,patheditarry,datas}=this.props; - let{category_id}=this.state; + if(patheditarry.length===0){ + this.setState({ + shixunmodelchke:true, + chekicmessage:"请先选择实训", + hometypepvisible:false + }) + + return + } + if (this.props.chooseShixun) { this.props.chooseShixun(patheditarry) this.setState({ @@ -159,15 +169,7 @@ class ShixunModal extends Component{ }) return; } - if(patheditarry.length===0){ - this.setState({ - shixunmodelchke:true, - chekicmessage:"请先选择实训", - hometypepvisible:false - }) - return - } let url="/courses/"+coursesId+"/homework_commons/create_shixun_homework.json"; axios.post(url, { category_id:this.props.category_id===null||this.props.category_id===undefined?undefined:parseInt(this.props.category_id), @@ -378,7 +380,7 @@ class ShixunModal extends Component{
    - {this.state.chekicmessage} + {this.state.chekicmessage}
    取消 确定 diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index e052ed1e3..eb1627e83 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -257,7 +257,13 @@ class CoursesNew extends Component { } goback = () => { - window.history.go(-1) + + if(this.props.match.params.coursesId===undefined){ + this.props.history.push("/courses"); + }else{ + this.props.history.push(`/courses/${this.props.match.params.coursesId}`); + } + // window.history.go(-1) } onCheckAllChange = (e) => { diff --git a/public/react/src/modules/home/shixunsHome.js b/public/react/src/modules/home/shixunsHome.js index 780691e6c..5400368ec 100644 --- a/public/react/src/modules/home/shixunsHome.js +++ b/public/react/src/modules/home/shixunsHome.js @@ -361,7 +361,7 @@ class ShixunsHome extends Component { - {item.name} + {item.username} ) @@ -375,7 +375,7 @@ class ShixunsHome extends Component { - {item.name} + {item.username} ) @@ -389,7 +389,7 @@ class ShixunsHome extends Component { - {item.name} + {item.username} ) @@ -405,7 +405,7 @@ class ShixunsHome extends Component {
  • - {item.name} + {item.username}
  • ) @@ -437,7 +437,7 @@ class ShixunsHome extends Component { - {item.name} + {item.username} ) @@ -451,7 +451,7 @@ class ShixunsHome extends Component { - {item.name} + {item.username} ) @@ -465,7 +465,7 @@ class ShixunsHome extends Component { - {item.name} + {item.username} ) @@ -481,7 +481,7 @@ class ShixunsHome extends Component {
  • - {item.name} + {item.username}
  • ) diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index c9404a792..68113f133 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -39,7 +39,7 @@ class TPMBanner extends Component { this.state={ Forkvisible: false, Senttothetype:false, - Senttothevcalue:1, + Senttothevcalue:undefined, courses_count:1, course_list:[], pagenum:1, @@ -62,6 +62,7 @@ class TPMBanner extends Component { isIE:false, Forkvisibletype: false, isSpin:false, + Senttothevcaluetype:false } } @@ -233,12 +234,21 @@ class TPMBanner extends Component { }); } sendeSenttothevcalue=()=>{ + let {Senttothevcalue}=this.state; + + if(Senttothevcalue===undefined){ + this.setState({ + Senttothevcaluetype:true + }) + return + } let id = this.props.match.params.shixunId; let url="/shixuns/" + id +"/send_to_course.json"; axios.post(url,{ course_id:Senttothevcalue }).then((response) => { + this.props.showSnackbar(response.data.message); this.setState({ Senttothetype:false, @@ -466,6 +476,7 @@ class TPMBanner extends Component { shixunsreplace, hidestartshixunsreplacevalue, Forkvisibletype, + Senttothevcaluetype, isIE} = this.state; let {shixunsDetails, shixunId, star_info, star_infos} = this.props; let challengeBtnTipText = ''; @@ -839,7 +850,7 @@ class TPMBanner extends Component { />
    -
    12?"cdefault mb20":"cdefault mb50"}> +
    12?"cdefault ":"cdefault "}>
      @@ -855,8 +866,8 @@ class TPMBanner extends Component {
    - -
    + {this.state.Senttothevcaluetype===true?
    请选择你要发送的课堂
    :""} +
    12 ? "block" : "none"}} showQuickJumper defaultCurrent={1} current={pages} pageSize={12} total={courses_count} onChange={this.onChangesendeSenttothe}/> From e76a2e6b79d6bc0cee1859a75061a8bc6eabb0aa 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, 20 Jul 2019 15:42:34 +0800 Subject: [PATCH 861/964] =?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/modules/tpm/NewHeader.js | 7 +++++++ public/react/src/search/SearchPage.js | 6 ++++-- public/react/src/search/searchc.css | 5 +++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index c404aa8d5..e251ecabe 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -562,7 +562,13 @@ submittojoinclass=(value)=>{ cancelModulationModels = () => { this.setState({isRenders: false}) } + inputjoinclassvalue=(e)=>{ + this.setState({ + tojoinclasstitle:e.target.value + }) + + } render() { const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。 const {match ,} = this.props; @@ -609,6 +615,7 @@ submittojoinclass=(value)=>{ // rolearr:["",""], // console.log("618"); // console.log(user_phone_binded); + return (
    diff --git a/public/react/src/search/SearchPage.js b/public/react/src/search/SearchPage.js index 990700983..2b5f3cbee 100644 --- a/public/react/src/search/SearchPage.js +++ b/public/react/src/search/SearchPage.js @@ -228,8 +228,10 @@ 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}
    diff --git a/public/react/src/search/searchc.css b/public/react/src/search/searchc.css index c73680ecb..4b31e7c5d 100644 --- a/public/react/src/search/searchc.css +++ b/public/react/src/search/searchc.css @@ -126,4 +126,9 @@ .ziticor{ color: #777777; font-size: 13px; +} +.foohter{ + margin-top: 20px; + display: flex; + flex-direction:row; } \ No newline at end of file From 2fe390a87542339ff132fcb8d23a16e515953454 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, 20 Jul 2019 16:01:10 +0800 Subject: [PATCH 862/964] =?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/Listofworksstudentone.js | 22 +++++++++++++++---- .../shixunHomework/ShixunHomeworkPage.js | 2 +- .../src/modules/user/FindPasswordComponent.js | 2 +- public/react/src/modules/user/common.css | 6 +++++ 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index a63db222c..bdd3a7de2 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -899,9 +899,23 @@ class Listofworksstudentone extends Component { }, ], } - // + console.log("902"); + console.log("902"); + console.log(this.props); + } + componentDidCatch(error, info){ + console.log("-----------------------------905错误信息"); + console.log(error); + console.log(info); + } + componentWillReceiveProps(nextProps) { + console.log("+++++++++913"); + console.log("+++++++++915"); + console.log("+++++++++916"); + console.log(nextProps); + } componentDidMount() { console.log("componentDidMount"); if(this.props.isAdmin() === true){ @@ -2337,7 +2351,7 @@ class Listofworksstudentone extends Component { (this.props.isNotMember()===false?
    计算成绩
    :""): - teacherdata&&teacherdata.homework_status[0]!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": + teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": (this.props.isNotMember()===false?
    计算成绩
    :"") @@ -2628,7 +2642,7 @@ class Listofworksstudentone extends Component {
    :"") : - (teacherdata&&teacherdata.homework_status[0]!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": + (teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": this.props.isNotMember()===false?
    计算成绩 @@ -2793,7 +2807,7 @@ class Listofworksstudentone extends Component { (this.props.isNotMember()===false?
    计算成绩
    :""): - teacherdata&&teacherdata.homework_status[0]!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": + teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": (this.props.isNotMember()===false?
    计算成绩
    :"") diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 03d69d61c..aa2e32c49 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -24,7 +24,7 @@ class ShixunHomeworkPage extends Component { super(props); // this.answerMdRef = React.createRef(); this.state = { - tab: ["0"], + tab: 0, jobsettingsdata: undefined, teacherdata: undefined, code_review: false, diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index d87bb6a4a..f1e36bbbe 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -537,7 +537,7 @@ class LoginRegisterComponent extends Component { `} -
    +
    找回密码
    diff --git a/public/react/src/modules/user/common.css b/public/react/src/modules/user/common.css index 5453647aa..f88bde127 100644 --- a/public/react/src/modules/user/common.css +++ b/public/react/src/modules/user/common.css @@ -32,6 +32,12 @@ align-items: center; flex-direction: column; } +.login_sectionysl{ + width: 100%; + display:flex; + align-items: center; + flex-direction: column; +} .loginInput { width: 100%; margin-bottom: 16px; From bb1f8dccaaa109978042fda577aa840a0217ba57 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:02:50 +0800 Subject: [PATCH 863/964] =?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 --- public/images/educoder/roundedRectangle.png | Bin 0 -> 720 bytes public/react/src/AppConfig.js | 31 +++++++------------- public/react/src/modules/tpm/NewHeader.js | 19 +++++++----- public/react/src/modules/tpm/TPMIndex.css | 6 ++++ 4 files changed, 28 insertions(+), 28 deletions(-) create mode 100755 public/images/educoder/roundedRectangle.png diff --git a/public/images/educoder/roundedRectangle.png b/public/images/educoder/roundedRectangle.png new file mode 100755 index 0000000000000000000000000000000000000000..0d2d0b0dcdb359def884705254f050d1fbdcb3fb GIT binary patch literal 720 zcmV;>0x$iEP)7i5*ItXH}O~epQUU@HhV58rh1Hvd($Uc{~fs`t{WtAox?*xd!!y}DOtA`$57 zLY|)^QYobCBD`;Yr82JGz!@)1cQ*z z!_W{i5J0S~ToGY^e4O2hiAqE@{{u?X1RqfE4-ODpTgdr&7#@aj7_q*NY;5GXwUtBQ z)G&Bv+iaUAztw#}LwrviVMS9fBDu5#jsq<%2+KkNMRPMOEFk;(5Xq#LCpS7u{q!_n z+Sa7-)NP@?@QOwQd_d*ESt3Dxb(Ok-0n!^A)P_QYdwMt+ z8{=?tQX5pj$F_~*0sU2^QcweFQGi+Ct@c34W?2xAmvR`1P_Qgc;&FaC4ld9%I7mZ# zJF-|Lv$Mm=+FGRw1Ca<1EsLXgT(?8HHi}*!O8BITCRi+uwpRke7flH{;0QPd&VX94 z+LUwUb4nTYu8gYXGp@gT|J(vBK7jYWaaXz^;VbamyT1m!5Rkpir19Uq4!94r0-u4` zq7+=!)^$KNiDG)P`&*_;$V)&8_kcG7rmJNCikZJnpcOq`ZNy>#0000 diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index c404aa8d5..6f3a7d4c2 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -676,9 +676,12 @@ submittojoinclass=(value)=>{ {/*
  • 教学案例
  • */} -
  • 在线竞赛
  • +
  • + 在线竞赛 + +
  • 教学案例
  • -
  • 众包社区
  • +
  • 众包创新
  • 交流问答
  • { // onSearch={value => console.log(value)} onPressEnter={this.onKeywordSearchKeyDown} - style={{ width: 295 }} + style={{ width: 300 }} />
  • @@ -736,11 +739,11 @@ submittojoinclass=(value)=>{ <%= link_to '注册', user_join_path, :className => "ml5" %> */} { user===undefined? - + this.educoderlogin()} className="mr5 color-white">登录 注册 - :user.login===""? + :user.login===""? this.educoderlogin()} className="mr5 color-white">登录 注册 @@ -773,7 +776,7 @@ submittojoinclass=(value)=>{
    } {/*href="https://www.educoder.net/login"*/} - { user===undefined?"":user.login===""?"": - } +
    diff --git a/public/react/src/modules/tpm/TPMIndex.css b/public/react/src/modules/tpm/TPMIndex.css index 655f58637..94d7cb0d7 100644 --- a/public/react/src/modules/tpm/TPMIndex.css +++ b/public/react/src/modules/tpm/TPMIndex.css @@ -191,4 +191,10 @@ body>.-task-title { .HeaderSearch .ant-input-search .ant-input-suffix{ background: transparent !important; +} + +.roundedRectangles{ + position: absolute; + top: 10px; + right: -22px; } \ No newline at end of file From c30810a19f572ca75e40608d974872e18c8b141c 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, 20 Jul 2019 16:06:43 +0800 Subject: [PATCH 864/964] =?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/modules/user/FindPasswordComponent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index f1e36bbbe..fef1e75ac 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -505,7 +505,7 @@ class LoginRegisterComponent extends Component { // height: 346px; return ( -
    +
    this.StudyMakeMoney()} @@ -538,7 +538,7 @@ class LoginRegisterComponent extends Component {
    -
    +
    找回密码
    From 1b02908dc3fc44520997d63935b35bef944e946c 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, 20 Jul 2019 16:14:25 +0800 Subject: [PATCH 865/964] =?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/modules/user/LoginRegisterComponent.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 6a1ef1288..cf93a781b 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -205,6 +205,9 @@ class LoginRegisterComponent extends Component { //是否验证通过 dragOkCallback = () => { console.log(this.state.logins); + this.setState({ + Phonenumberisnotcosytdhk:undefined, + }) this.Emailphonenumberverification(this.state.logins, 2) } From 2c7ffdedbd037634f02ca13f50cd0f2e5069f758 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:17:47 +0800 Subject: [PATCH 866/964] =?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 --- public/react/src/modules/tpm/NewHeader.js | 2 +- .../src/modules/tpm}/roundedRectangle.png | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename public/{images/educoder => react/src/modules/tpm}/roundedRectangle.png (100%) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index fccfb06d6..9c8fb3d26 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -685,7 +685,7 @@ submittojoinclass=(value)=>{ {/*
  • 教学案例
  • */}
  • 在线竞赛 - +
  • 教学案例
  • 众包创新
  • diff --git a/public/images/educoder/roundedRectangle.png b/public/react/src/modules/tpm/roundedRectangle.png similarity index 100% rename from public/images/educoder/roundedRectangle.png rename to public/react/src/modules/tpm/roundedRectangle.png From 5954570d57d2c217b0fccb58c8b9b986601565cf 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, 20 Jul 2019 16:25:02 +0800 Subject: [PATCH 867/964] =?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/App.js | 2 ++ public/react/src/modules/login/Trialapplicationysl.js | 2 +- public/react/src/modules/tpm/NewHeader.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/react/src/App.js b/public/react/src/App.js index 28a7e977e..110a46963 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -15,6 +15,7 @@ import '@icedesign/base/index.scss'; import LoginDialog from './modules/login/LoginDialog' import Notcompletedysl from './modules/user/Notcompletedysl' +import Trialapplicationysl from './modules/login/Trialapplicationysl' import Trialapplication from './modules/login/Trialapplication' import NotFoundPage from './NotFoundPage' @@ -266,6 +267,7 @@ class App extends Component { + {/*{*/} {/* isRender === true?*/} {/* : ""*/} diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index ec7bebcda..18875efa8 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -42,7 +42,7 @@ class Trialapplicationysl extends Component { } Cancel = () => { - this.props.Cancel() + // this.props.Cancel() } componentWillReceiveProps(nextProps) { diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index fccfb06d6..0692dd9b6 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -636,7 +636,7 @@ submittojoinclass=(value)=>{ {/* />*/} {/* :""*/} {/*}*/} - this.cancelModulationModels()} > + {/* this.cancelModulationModels()} >*/}
    {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} From bd5b4cdbf7e0a367b3abc3529bd7717cca023e7e 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:36:22 +0800 Subject: [PATCH 868/964] =?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 --- public/react/src/modules/tpm/NewHeader.js | 4 +++- public/react/src/modules/user/usersInfo/Infos.js | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 824a61071..125a96e85 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -685,7 +685,9 @@ submittojoinclass=(value)=>{ {/*
  • 教学案例
  • */}
  • 在线竞赛 - +
  • 教学案例
  • 众包创新
  • diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 2c9dd5bd3..1a321dc51 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -225,24 +225,32 @@ class Infos extends Component{
    {is_current ? "我":"TA"}的经验值 - {data && data.experience} + {data && data.experience}
    {is_current ? "我":"TA"}的金币 - {data && data.grade} + {data && data.grade}
    头像
    {is_current ? "我":"TA"}的粉丝 - {data && data.fan_count} + {data && data.fan_count}
    {is_current ? "我":"TA"}的关注 - {data && data.follow_count} + {data && data.follow_count}
    {data && data.name} From 15e810a2d597ab181a4e8272ad3585e417a8ebc5 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, 20 Jul 2019 16:39:41 +0800 Subject: [PATCH 869/964] =?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/shixunHomework/Challenges.css | 51 ++++++++++--------- .../shixunHomework/Listofworksstudentone.js | 20 ++++---- 2 files changed, 37 insertions(+), 34 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Challenges.css b/public/react/src/modules/courses/shixunHomework/Challenges.css index dc9ba1ec1..2183fd708 100644 --- a/public/react/src/modules/courses/shixunHomework/Challenges.css +++ b/public/react/src/modules/courses/shixunHomework/Challenges.css @@ -1,24 +1,29 @@ -.editormd-html-preview, .editormd-preview-container { - width: 95% !important; -} -.Finish_button{ - height: 30px; - line-height: 30px; - margin-top: -8px; -} -.startbtnModal .ant-modal-content{ - background: transparent; - box-shadow: 0 4px 12px transparent; -} - -.startbtnModal .ant-modal-content .ant-modal-body .ant-spin-spinning{ - margin-left: 45%; -} - -.color05101a{ - color:#05101a; -} - -.mtf3{ - margin-top: -3px; +.editormd-html-preview, .editormd-preview-container { + width: 95% !important; +} +.Finish_button{ + height: 30px; + line-height: 30px; + margin-top: -8px; +} +.startbtnModal .ant-modal-content{ + background: transparent; + box-shadow: 0 4px 12px transparent; +} + +.startbtnModal .ant-modal-content .ant-modal-body .ant-spin-spinning{ + margin-left: 45%; +} + +.color05101a{ + color:#05101a; +} + +.mtf3{ + margin-top: -3px; +} +.ysltable{ + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap } \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index bdd3a7de2..7f9ab561f 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -24,6 +24,7 @@ import moment from 'moment'; import '../css/members.css' import '../css/busyWork.css' import '../poll/pollStyle.css' +import './Challenges.css' import {getImageUrl} from 'educoder'; import TraineetraininginformationModal from "./TraineetraininginformationModal"; import DownloadMessageysl from '../../modals/DownloadMessageysl'; @@ -182,7 +183,7 @@ class Listofworksstudentone extends Component { className:'font-14', render: (text, record) => ( - {record.classroom === undefined ? "--" : record.classroom === "" ? "--" : record.classroom === null ? "--" : record.classroom} @@ -418,7 +419,7 @@ class Listofworksstudentone extends Component { align: 'center', className:'font-14', render: (text, record) => ( - {record.classroom} + {record.classroom} ) }, { @@ -680,7 +681,7 @@ class Listofworksstudentone extends Component { align: 'center', className:'font-14', render: (text, record) => ( - {record.classroom} + {record.classroom} ) }, { @@ -968,7 +969,6 @@ class Listofworksstudentone extends Component { // console.log("951"); // console.log(result); // debugger - if (result.status === 200) { this.setState({ teacherdata: result.data, task_status: result.data.task_status, @@ -990,7 +990,6 @@ class Listofworksstudentone extends Component { this.seacthdatas(result.data, result.data.student_works); } - } }).catch((error) => { console.log(error); }) @@ -1022,7 +1021,7 @@ class Listofworksstudentone extends Component { limit: limit, } axios.post(urll, data).then((result) => { - if (result.status === 200) { + if (result) { // console.log("学生未截至未公开的作品列表") // console.log(JSON.stringify(result)) this.setState({ @@ -1282,7 +1281,7 @@ class Listofworksstudentone extends Component { // console.log(JSON.stringify(this.props.user)) var url = `/student_works/${userids}/shixun_work.json`; axios.get(url).then((result) => { - if (result.status === 200) { + if (result) { // console.log("Listofworksstudentone.js") // console.log(JSON.stringify(result)) let datalist = []; @@ -1498,7 +1497,6 @@ class Listofworksstudentone extends Component { limit:20, } axios.post(urll, data).then((result) => { - debugger if (result) { // console.log(url) // console.log("作品列表6789077") @@ -1930,7 +1928,7 @@ class Listofworksstudentone extends Component { // console.log(JSON.stringify(this.props.user)) var url = `/student_works/${userids}/shixun_work.json`; axios.get(url).then((result) => { - if (result.status === 200) { + if (result) { // console.log("TraineetraininginformationModal.js") // console.log(JSON.stringify(result)) let datalist = []; @@ -2047,7 +2045,7 @@ class Listofworksstudentone extends Component { group_ids: course_groupslist, end_time:endtime, }).then((result) => { - if (result.status === 200) { + if (result) { if (result.data.status === 0) { notification.open({ message: "提示", @@ -2470,7 +2468,7 @@ class Listofworksstudentone extends Component {
    -

    没有数据可以显示!

    +

    没有数据可以显示.!

    From 86987a0422ddbfde1944b19d009038d5a0f1b9c2 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, 20 Jul 2019 16:48:21 +0800 Subject: [PATCH 870/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/login/Trialapplicationysl.js | 48 ++++++++++++------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index 18875efa8..f38804810 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -30,7 +30,7 @@ class Trialapplicationysl extends Component { Phonenumberisnotco: undefined, Phonenumberisnotcobool: false, readonlyInput: true, - user_phone_binded: props.user_phone_binded, + user_phone_binded: undefined, showTrial: false, user: undefined, borredss:"bor-reds", @@ -49,30 +49,44 @@ class Trialapplicationysl extends Component { // console.log("46"); // console.log(nextProps); // console.log(this.props); - if (nextProps.user != this.props.user) { - // console.log("50"); - // console.log(nextProps.user); - if (nextProps.user !== undefined) { - // console.log("53"); - // console.log(nextProps.user); - this.setState({ - user_phone_binded: nextProps.user.user_phone_binded, - }) - } - - - } + // if (nextProps.user != this.props.user) { + // // console.log("50"); + // // console.log(nextProps.user); + // if (nextProps.user !== undefined) { + // // console.log("53"); + // // console.log(nextProps.user); + // this.setState({ + // user_phone_binded: nextProps.user.user_phone_binded, + // }) + // } + // + // + // } } - + getipthon=()=>{ + // console.log("Trialapplicationysl"); + // console.log("70"); + let url = `/users/get_user_info.json` + axios.get(url).then((result)=> { + console.log(result); + if(result){ + this.setState({ + user_phone_binded:result.data.user_phone_binded, + }) + } + }).catch((error)=>{ + console.log(error) + }) + } //初始化数据 componentDidMount() { // console.log("53"); // // console.log(this.props.isRenders); - + this.getipthon(); if (this.props.isRenders != undefined) { this.setState({ isRenders: this.props.isRenders @@ -88,9 +102,11 @@ class Trialapplicationysl extends Component { axios.interceptors.response.use((response) => { if (response != undefined) if (response && response.data.status === 407) { + this.getipthon(); this.setState({ isRenders: true }) + } return response; }, (error) => { 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 871/964] 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 872/964] 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 873/964] 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 874/964] =?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 875/964] =?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)}>×
  • ) }) From 90b9a661d64b19cf92084285590e1ed5513eb0f0 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, 20 Jul 2019 18:08:54 +0800 Subject: [PATCH 876/964] =?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/Listofworksstudentone.js | 3 +-- .../shixunHomework/ShixunHomeworkPage.js | 22 ++++++++----------- .../shixunHomework/ShixunStudentWork.js | 7 ++++-- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 7f9ab561f..a83fec2ee 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1591,7 +1591,6 @@ class Listofworksstudentone extends Component { // 设置数据 seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => { - debugger let {page, limit} = this.state; let datalist = []; let columns = this.state.columns; @@ -2640,7 +2639,7 @@ class Listofworksstudentone extends Component {
    :"") : - (teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": + (teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "": this.props.isNotMember()===false?
    计算成绩 diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index aa2e32c49..9e731f105 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -24,7 +24,7 @@ class ShixunHomeworkPage extends Component { super(props); // this.answerMdRef = React.createRef(); this.state = { - tab: 0, + tab: ["0"], jobsettingsdata: undefined, teacherdata: undefined, code_review: false, @@ -141,9 +141,8 @@ class ShixunHomeworkPage extends Component { render() { let {tab, teacherdata, jobsettingsdata} = this.state; + const isAdmin = this.props.isAdmin(); - console.log(tab); - console.log("147147147147147147147"); return (
    @@ -188,8 +187,8 @@ class ShixunHomeworkPage extends Component { onClick={(e) => this.ChangeTab(2)}> 代码查重 : ""} {parseInt(tab) === 3? - + } :""} this.ChangeTab(3)} @@ -280,13 +279,10 @@ class ShixunHomeworkPage extends Component { /> - {parseInt(tab) === 0 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - - {parseInt(tab) === 1 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - - {parseInt(tab) === 2 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - - {parseInt(tab) === 3 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} + {parseInt(tab) === 0 ? this.Getdataback(jobsettingsdata, teacherdata)}> + :parseInt(tab) === 1 ? this.Getdataback(jobsettingsdata, teacherdata)}> + :parseInt(tab) === 2 ? this.Getdataback(jobsettingsdata, teacherdata)}> + :parseInt(tab) === 3 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""}
    diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 81b98a854..ed399af98 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -76,9 +76,12 @@ class ShixunStudentWork extends Component { console.log("ShixunStudentWork"); console.log("componentDidMount"); this.props.triggerRef(this); - this.getupdata(); - this.getTrainingjobsetting(); + this.getTrainingjobsettings(); } + getTrainingjobsettings=()=>{ + this.getupdata(); + this.getTrainingjobsetting(); +} // 获取数据地方 getTrainingjobsetting = () => { From 49de0206bd3496680d035b2c4ea97e95e71c0133 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 18:12:02 +0800 Subject: [PATCH 877/964] content_modified --- public/react/src/modules/page/MainContentContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/MainContentContainer.js b/public/react/src/modules/page/MainContentContainer.js index d24a5cefb..02bda180e 100644 --- a/public/react/src/modules/page/MainContentContainer.js +++ b/public/react/src/modules/page/MainContentContainer.js @@ -675,7 +675,7 @@ class MainContentContainer extends Component { const timeOut = time_limit; // http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo/game_build?first=1&resubmit=GDBEX741_1993 // const game_build_url = `${locationPath}/game_build?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}` - const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}&sec_key=${sec_key}` + const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${!!content_modified ? 1 : 0}&sec_key=${sec_key}` // var timeOut = parseInt(<%= @myshixun.main_mirror.try(:time_limit) %>); // 超时参数 From fb076159a995572e1e5982c469b23456d0ee98b5 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 18:12:51 +0800 Subject: [PATCH 878/964] reset_my_game --- public/react/src/modules/tpm/TPMBanner.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 68113f133..866ca3583 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -349,6 +349,7 @@ class TPMBanner extends Component { // }); // } + // reset_my_game hidestartshixunsreplace=(url)=>{ this.setState({ isSpin:true, @@ -358,7 +359,7 @@ class TPMBanner extends Component { // let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; // this.props.history.push(path); message.success('重置成功,正在进入实训!'); - this.startshixunCombat(response.data.shixun_identifier); + this.startshixunCombat(response.data.shixun_identifier, 1); this.setState({ shixunsreplace:false, isSpin:false, @@ -379,7 +380,7 @@ class TPMBanner extends Component { //开始实战按钮 - startshixunCombat=(id)=>{ + startshixunCombat=(id, reset)=>{ let {shixunsDetails} = this.props if( shixunsDetails.shixun_status>1){ this.setState({ @@ -393,7 +394,10 @@ class TPMBanner extends Component { } - let url="/shixuns/"+id+"/shixun_exec.json"; + let url="/shixuns/"+id+"/shixun_exec.json" ; + if (reset) { + url += '?reset=' + reset + } axios.get(url).then((response) => { if(response.status===200){ if(response.data.status===-2){ From db2779c1626fc30c8dc8a17e02b9cdb248a29221 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, 20 Jul 2019 18:13:03 +0800 Subject: [PATCH 879/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/user/FindPasswordComponent.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 18243ea4a..1617ae52d 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -213,10 +213,7 @@ class LoginRegisterComponent extends Component { }) return } - if (this.state.password !== this.state.passwords==="") { - this.openNotification(`两次输入的密码不一致`); - return - } + else if (this.state.password !==undefined&&this.state.password.length>0&&this.state.password.length<8){ this.setState({ Phonenumberisnotcosmmm:"密码不能少于8位", @@ -239,6 +236,13 @@ class LoginRegisterComponent extends Component { }) return } + if (this.state.password !== this.state.passwords) { + this.setState({ + Phonenumberisnotcosmmm:"两次输入的密码不一致", + Phonenumberisnotcosymmmm:"两次输入的密码不一致", + }) + return + } if (this.state.codes === undefined|| this.state.codes.length ===0 || this.state.codes === "") { this.setState({ Phonenumberisnotcosyzm:"验证码不能为空" From 4c535a23560a2066b509de580d6330e5be6890bd 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 18:14:10 +0800 Subject: [PATCH 880/964] Merge branch 'master' of https://bdgit.educoder.net/Hjqreturn/educoder # Conflicts: # public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js --- .../shixunHomework/TraineetraininginformationModal.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index 2d97e6c08..8b894db00 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -210,9 +210,9 @@ class TraineetraininginformationModal extends Component { footer={null} onCancel={this.Cancel} > -
    +
    -
    +
    {this.props.viewtrainingdata === undefined ? "" : this.LimitNumber(this.props.viewtrainingdata.shixun_name)} 经验值: {this.props.experience=== undefined?"0" :this.props.experience}/{this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score}
    @@ -224,7 +224,7 @@ class TraineetraininginformationModal extends Component {
    -
    + {/*
    */}
    From 91a37a465e68c0e1d0620afcb17019933ba632d6 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 18:18:16 +0800 Subject: [PATCH 881/964] content_modified --- public/react/src/modules/page/MainContentContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/MainContentContainer.js b/public/react/src/modules/page/MainContentContainer.js index 02bda180e..d24a5cefb 100644 --- a/public/react/src/modules/page/MainContentContainer.js +++ b/public/react/src/modules/page/MainContentContainer.js @@ -675,7 +675,7 @@ class MainContentContainer extends Component { const timeOut = time_limit; // http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo/game_build?first=1&resubmit=GDBEX741_1993 // const game_build_url = `${locationPath}/game_build?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}` - const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${!!content_modified ? 1 : 0}&sec_key=${sec_key}` + const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}&sec_key=${sec_key}` // var timeOut = parseInt(<%= @myshixun.main_mirror.try(:time_limit) %>); // 超时参数 From 75cfe55863cd9f3ea9e3e21fd29b8896044b6119 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 18:18:36 +0800 Subject: [PATCH 882/964] Merge branch 'master' of https://bdgit.educoder.net/Hjqreturn/educoder # Conflicts: # public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js --- .../shixunHomework/Listofworksstudentone.js | 583 +++++++++--------- 1 file changed, 296 insertions(+), 287 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 1823f43bb..1c9b22602 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -284,7 +284,7 @@ class Listofworksstudentone extends Component { { record.efficiencyscore&& record.efficiencyscore=== "--"?( - + -- ) @@ -963,32 +963,32 @@ class Listofworksstudentone extends Component { course_group: "", } axios.post(urll, data).then((result) => { - if(result === undefined){ - return - } + if(result === undefined){ + return + } // console.log("951"); // console.log(result); // debugger - this.setState({ - teacherdata: result.data, - task_status: result.data.task_status, - course_group_info: result.data.course_group_info, - student_works: result.data.student_works, - jobsettingsdata: result, - publish_immediately: result.data.publish_immediately, - end_immediately: result.data.end_immediately, - id: result.data.id, - work_efficiency: result.data.work_efficiency, - code_review: result.data.code_review, - challenges_count: result.data.challenges_count, - view_report: result.data.view_report, - }) - this.props.Getdataback(result,result.data); - if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { - this.seacthdata(result.data); - } else { - this.seacthdatas(result.data, result.data.student_works); - } + this.setState({ + teacherdata: result.data, + task_status: result.data.task_status, + course_group_info: result.data.course_group_info, + student_works: result.data.student_works, + jobsettingsdata: result, + publish_immediately: result.data.publish_immediately, + end_immediately: result.data.end_immediately, + id: result.data.id, + work_efficiency: result.data.work_efficiency, + code_review: result.data.code_review, + challenges_count: result.data.challenges_count, + view_report: result.data.view_report, + }) + this.props.Getdataback(result,result.data); + if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { + this.seacthdata(result.data); + } else { + this.seacthdatas(result.data, result.data.student_works); + } }).catch((error) => { console.log(error); @@ -1070,13 +1070,13 @@ class Listofworksstudentone extends Component { for(var i=0;i { console.log(error) @@ -1433,7 +1433,7 @@ class Listofworksstudentone extends Component { }) this.Getalistofworkstwo(this.state.order, "", "", "", pageNumber, this.state.limit); } - //计算成绩 + //计算成绩 setComputeTime=()=>{ let {teacherdata}=this.state; this.setState({ @@ -1497,26 +1497,26 @@ class Listofworksstudentone extends Component { limit:20, } axios.post(urll, data).then((result) => { - if (result) { - // console.log(url) - // console.log("作品列表6789077") - // console.log(JSON.stringify(result)) - this.setState({ - teacherdata: result.data, - task_status: result.data.task_status, - allow_late:result.data.allow_late, - course_group_info: result.data.course_group_info, - loadingstate: false, - jobsettingsdata: result, - publish_immediately: result.data.publish_immediately, - work_efficiency: result.data.work_efficiency, - end_immediately: result.data.end_immediately, - code_review: result.data.code_review, - challenges_count:result.data.challenges_count, - }) - this.props.Getdataback(result,result.data); - this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); - } + if (result) { + // console.log(url) + // console.log("作品列表6789077") + // console.log(JSON.stringify(result)) + this.setState({ + teacherdata: result.data, + task_status: result.data.task_status, + allow_late:result.data.allow_late, + course_group_info: result.data.course_group_info, + loadingstate: false, + jobsettingsdata: result, + publish_immediately: result.data.publish_immediately, + work_efficiency: result.data.work_efficiency, + end_immediately: result.data.end_immediately, + code_review: result.data.code_review, + challenges_count:result.data.challenges_count, + }) + this.props.Getdataback(result,result.data); + this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); + } }).catch((error) => { console.log(error) this.setState({ @@ -1559,22 +1559,22 @@ class Listofworksstudentone extends Component { // console.log(url) // console.log("作品列表______________________") // console.log(JSON.stringify(result)) - if (result !== undefined) { - this.setState({ - teacherdata: result.data, - task_status: result.data.task_status, - course_group_info: result.data.course_group_info, - loadingstate: false, - jobsettingsdata: result, - allow_late:result.data.allow_late, - publish_immediately: result.data.publish_immediately, - work_efficiency: result.data.work_efficiency, - end_immediately: result.data.end_immediately, - code_review: result.data.code_review, - challenges_count:result.data.challenges_count, - }) - this.props.Getdataback(result,result.data); - this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page); + if (result !== undefined) { + this.setState({ + teacherdata: result.data, + task_status: result.data.task_status, + course_group_info: result.data.course_group_info, + loadingstate: false, + jobsettingsdata: result, + allow_late:result.data.allow_late, + publish_immediately: result.data.publish_immediately, + work_efficiency: result.data.work_efficiency, + end_immediately: result.data.end_immediately, + code_review: result.data.code_review, + challenges_count:result.data.challenges_count, + }) + this.props.Getdataback(result,result.data); + this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page); // } } }).catch((error) => { @@ -1591,7 +1591,7 @@ class Listofworksstudentone extends Component { // 设置数据 seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => { - debugger + debugger let {page, limit} = this.state; let datalist = []; let columns = this.state.columns; @@ -2216,81 +2216,81 @@ class Listofworksstudentone extends Component { return ( this.props.isAdmin() === true ? -
    - {visible === true ? this.saveModulationModal(value, num)} - /> : ""} - - {this.state.showmodel === true ? this.hideshowmodel()} - updatas={() => this.isupdatas()} - /> : ""} - - - {visibles === true ? -
    - - this.cancelModulationModels()} - /> - -
    - : "" - } - - {/*立即发布*/} - this.getcourse_groupslist(id)} - starttimes={this.state.starttimes} - typs={this.state.typs} - /> -
    - - -
    + } + + this.cancelModulationModels()} + /> +
    + : "" + } - - {computeTimetype===false?
  • + + {computeTimetype===false?
  • 正在执行成绩计算,请稍后刷新页面查看结果 温馨提示:执行时间因作品数量而异 -
  • :""} - - {/*作品状态GraduationTaskssettinglist*/} -
    } + - + -
    +
    -
    +
    {teacherdata === undefined ? "" : teacherdata.student_works.length}个检索结果({teacherdata === undefined ? "" : teacherdata.all_member_count}学生) - - - - + } + + +
    - { - JSON.stringify(data) === "[]" ? -
    -
    -
    - -

    没有数据可以显示.!

    -
    -
    +
    + { + JSON.stringify(data) === "[]" ? +
    +
    +
    + +

    没有数据可以显示.!

    +
    - : -
    - -
    - {data === undefined ? "" :
    } - +
    + {data === undefined ? "" :
    } - } - - - - { - teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? -
    -
    - : "" } - + + + { + teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? +
    + +
    + : "" + } - : + + + :
    { teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ? @@ -2631,15 +2633,21 @@ class Listofworksstudentone extends Component { 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} {teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"": - - {teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "": - computeTimetype===true&&this.props.isNotMember()===false?
    - 计算成绩 -
    :
    - 计算成绩 -
    } -
    } - + {computeTimetype===true? + (this.props.isNotMember()===false? +
    + 计算成绩 +
    + :"") + : + (teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": + this.props.isNotMember()===false? +
    + 计算成绩 +
    + :"") + } + }
    @@ -2792,16 +2800,17 @@ 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]==="开启挑战"?"": - - {teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status===0?"": - this.props.isNotMember()===false&&computeTimetype===true?
    - 计算成绩 -
    :
    - 计算成绩 -
    } -
    - } + {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?
    + 计算成绩 +
    :"") + } +
    }
    {/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/} From 64c934ce7ad995017ac5f92d28d68492483b50ae 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, 20 Jul 2019 19:07:14 +0800 Subject: [PATCH 883/964] =?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/Listofworksstudentone.js | 2 +- .../react/src/modules/login/LoginDialog.css | 4 ++ .../src/modules/login/Trialapplication.js | 2 +- .../src/modules/login/Trialapplicationysl.js | 64 +++++++++---------- public/react/src/modules/tpm/NewHeader.js | 4 +- .../src/modules/user/FindPasswordComponent.js | 23 ++++--- public/react/src/modules/user/common.css | 8 +-- 7 files changed, 59 insertions(+), 48 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 1c9b22602..704e4995b 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1591,7 +1591,7 @@ class Listofworksstudentone extends Component { // 设置数据 seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => { - debugger + let {page, limit} = this.state; let datalist = []; let columns = this.state.columns; diff --git a/public/react/src/modules/login/LoginDialog.css b/public/react/src/modules/login/LoginDialog.css index b36533154..34a711154 100644 --- a/public/react/src/modules/login/LoginDialog.css +++ b/public/react/src/modules/login/LoginDialog.css @@ -122,4 +122,8 @@ border-radius: 4px; letter-spacing: 2px; cursor: pointer; +} +.myinput{ + display: flex; + justify-content: center; } \ No newline at end of file diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index 02116ce7d..3f375eb18 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -7,7 +7,7 @@ import Dialog, { DialogTitle, } from 'material-ui/Dialog'; import axios from 'axios'; - +import './LoginDialog.css' import {broadcastChannelPostMessage} from 'educoder' import {Tabs, Input, Checkbox, Button, notification, Menu} from 'antd'; diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index f38804810..c6458e16f 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -24,7 +24,7 @@ class Trialapplicationysl extends Component { codes: "", reason: "", Phonenumberisnotcoreason: undefined, - isRenders: false, + isRenders: true, seconds: 60, getverificationcodes: true, Phonenumberisnotco: undefined, @@ -44,37 +44,37 @@ class Trialapplicationysl extends Component { Cancel = () => { // this.props.Cancel() } - - componentWillReceiveProps(nextProps) { - // console.log("46"); - // console.log(nextProps); - // console.log(this.props); - // if (nextProps.user != this.props.user) { - // // console.log("50"); - // // console.log(nextProps.user); - // if (nextProps.user !== undefined) { - // // console.log("53"); - // // console.log(nextProps.user); - // this.setState({ - // user_phone_binded: nextProps.user.user_phone_binded, - // }) - // } - // - // - // } - - - } - getipthon=()=>{ + // + // componentWillReceiveProps(nextProps) { + // // console.log("46"); + // // console.log(nextProps); + // // console.log(this.props); + // // if (nextProps.user != this.props.user) { + // // // console.log("50"); + // // // console.log(nextProps.user); + // // if (nextProps.user !== undefined) { + // // // console.log("53"); + // // // console.log(nextProps.user); + // // this.setState({ + // // user_phone_binded: nextProps.user.user_phone_binded, + // // }) + // // } + // // + // // + // // } + // + // + // } + getipthon=()=>{ // console.log("Trialapplicationysl"); // console.log("70"); let url = `/users/get_user_info.json` axios.get(url).then((result)=> { console.log(result); if(result){ - this.setState({ - user_phone_binded:result.data.user_phone_binded, - }) + this.setState({ + user_phone_binded:result.data.user_phone_binded, + }) } }).catch((error)=>{ console.log(error) @@ -86,7 +86,7 @@ class Trialapplicationysl extends Component { // console.log("53"); // // console.log(this.props.isRenders); - this.getipthon(); + this.getipthon(); if (this.props.isRenders != undefined) { this.setState({ isRenders: this.props.isRenders @@ -289,11 +289,11 @@ class Trialapplicationysl extends Component { if(result !== undefined){ this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); // if (this.state.showTrial === false) { - window.location.href = "/"; - this.setState({ - isRenders: false - }) - this.Cancel(); + window.location.href = "/"; + this.setState({ + isRenders: false + }) + this.Cancel(); // } else { // this.setState({ // isRenders: false diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 125a96e85..4e61101e3 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -18,7 +18,7 @@ import Addcourses from '../courses/coursesPublic/Addcourses'; import LoginDialog from '../login/LoginDialog'; -import Trialapplicationysl from '../login/Trialapplicationysl' +import Trialapplication from '../login/Trialapplication' import 'antd/lib/modal/style/index.css'; @@ -636,7 +636,7 @@ submittojoinclass=(value)=>{ {/* />*/} {/* :""*/} {/*}*/} - {/* this.cancelModulationModels()} >*/} + {/* this.cancelModulationModels()} >*/}
    {/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index cba049041..7df2d82c5 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -43,6 +43,7 @@ class LoginRegisterComponent extends Component { Whethertoverify:false, modalsType:false, pciphone:true, + boolyzm:false, } } @@ -213,7 +214,10 @@ class LoginRegisterComponent extends Component { }) return } - + if (this.state.password !== this.state.passwords==="") { + this.openNotification(`两次输入的密码不一致`); + return + } else if (this.state.password !==undefined&&this.state.password.length>0&&this.state.password.length<8){ this.setState({ Phonenumberisnotcosmmm:"密码不能少于8位", @@ -236,13 +240,6 @@ class LoginRegisterComponent extends Component { }) return } - if (this.state.password !== this.state.passwords) { - this.setState({ - Phonenumberisnotcosmmm:"两次输入的密码不一致", - Phonenumberisnotcosymmmm:"两次输入的密码不一致", - }) - return - } if (this.state.codes === undefined|| this.state.codes.length ===0 || this.state.codes === "") { this.setState({ Phonenumberisnotcosyzm:"验证码不能为空" @@ -271,6 +268,12 @@ class LoginRegisterComponent extends Component { Phonenumberisnotcosyzm:"验证码不正确", }) + return; + }else if(result.data.message==="1小时内同一手机号发送次数超过限制"){ + this.setState({ + boolyzm:true, + }) + this.openNotification(result.data.message); return; }else { this.openNotification(result.data.message); @@ -311,6 +314,7 @@ class LoginRegisterComponent extends Component { login: stirngt, Phonenumberisnotco:undefined, dragOk:false, + boolyzm:false, Whethertoverify:this.state.Whethertoverify===true?false:true, }) } @@ -505,6 +509,7 @@ class LoginRegisterComponent extends Component { codes, Whethertoverify, pciphone, + boolyzm, } = this.state // height: 346px; return ( @@ -667,11 +672,13 @@ class LoginRegisterComponent extends Component { : } diff --git a/public/react/src/modules/user/common.css b/public/react/src/modules/user/common.css index f88bde127..4549fdfe9 100644 --- a/public/react/src/modules/user/common.css +++ b/public/react/src/modules/user/common.css @@ -1,7 +1,7 @@ -.login_register_content, .login_register_content .ant-tabs-tabpane { - display: flex; - justify-content: center; -} +/*.login_register_content, .login_register_content .ant-tabs-tabpane {*/ +/* display: flex;*/ +/* justify-content: center; */ +/*}*/ .login_register_content .ant-input { background:rgb(244,244,244); } From c151fa3e1b5820f5d03d941593497c9c7573a463 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, 20 Jul 2019 19:11:26 +0800 Subject: [PATCH 884/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/ShixunWorkReport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 945d5ede9..6dc407c5f 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -138,7 +138,7 @@ class ShixunWorkReport extends Component { {/*{this.props.isAdmin()?导出实训报告数据:""}*/} {this.props.isAdmin() ? this.confirmysl(`/zip/shixun_report?homework_common_id=${homeworkid}`)} + onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)} >导出实训报告数据 : ""}
    From fd7570f5718634388093ed17751a865a9e2259f6 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 19:16:35 +0800 Subject: [PATCH 885/964] sp --- public/react/src/search/SearchPage.js | 28 +++++++++++++++++---------- public/react/src/search/searchc.css | 2 +- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/public/react/src/search/SearchPage.js b/public/react/src/search/SearchPage.js index 59fee95e9..37a06e8d8 100644 --- a/public/react/src/search/SearchPage.js +++ b/public/react/src/search/SearchPage.js @@ -218,10 +218,15 @@ class SearchPage extends Component{
    {/*挑战名字*/} + + {item.content.challenge_names === undefined || item.content.challenge_names===0?"": item.content.challenge_names.map((item5, key5) => { return ( - + 关卡名称: + +
    ) }) } @@ -231,8 +236,11 @@ class SearchPage extends Component{ {/*挑战标签*/} {item.content.challenge_tag_names === undefined || item.content.challenge_tag_names===0?"": item.content.challenge_tag_names.map((item6, key6) => { return ( - 1?"markdown-body tzbq ":"markdown-body tzbqx"} - dangerouslySetInnerHTML={{__html:item6}} /> +
    + 关卡标签: + 1?" tzbq ":" tzbqx"} + dangerouslySetInnerHTML={{__html:item6}} /> +
    ) }) } @@ -260,44 +268,44 @@ class SearchPage extends Component{ {/* */} - {item.author_name} + {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} } diff --git a/public/react/src/search/searchc.css b/public/react/src/search/searchc.css index 4b31e7c5d..99f35738a 100644 --- a/public/react/src/search/searchc.css +++ b/public/react/src/search/searchc.css @@ -113,7 +113,7 @@ margin-left: 68px; } .tzbqx{ - margin-left: 24px; + /* margin-left: 24px; */ } .bjyss{ background: #F8F8F8; From 07919262cb7396e931f7bece18594d4bb1125ad2 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, 20 Jul 2019 19:18:28 +0800 Subject: [PATCH 886/964] =?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/modules/login/Trialapplicationysl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index c6458e16f..a666353aa 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -24,7 +24,7 @@ class Trialapplicationysl extends Component { codes: "", reason: "", Phonenumberisnotcoreason: undefined, - isRenders: true, + isRenders: false, seconds: 60, getverificationcodes: true, Phonenumberisnotco: undefined, From 0064fe607320cabfa7b5b72bd6ca015cf1097d56 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, 20 Jul 2019 19:33:46 +0800 Subject: [PATCH 887/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/login/Trialapplicationysl.js | 40 +++++++++---------- .../modules/user/LoginRegisterComponent.js | 13 +++++- public/react/src/modules/user/common.css | 4 +- 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index a666353aa..2b369ef7f 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -45,26 +45,26 @@ class Trialapplicationysl extends Component { // this.props.Cancel() } // - // componentWillReceiveProps(nextProps) { - // // console.log("46"); - // // console.log(nextProps); - // // console.log(this.props); - // // if (nextProps.user != this.props.user) { - // // // console.log("50"); - // // // console.log(nextProps.user); - // // if (nextProps.user !== undefined) { - // // // console.log("53"); - // // // console.log(nextProps.user); - // // this.setState({ - // // user_phone_binded: nextProps.user.user_phone_binded, - // // }) - // // } - // // - // // - // // } - // - // - // } + componentWillReceiveProps(nextProps) { + // console.log("46"); + // console.log(nextProps); + // console.log(this.props); + if (nextProps.user != this.props.user) { + // console.log("50"); + // console.log(nextProps.user); + if (nextProps.user !== undefined) { + // console.log("53"); + // console.log(nextProps.user); + this.setState({ + user_phone_binded: nextProps.user.user_phone_binded, + }) + } + + + } + + + } getipthon=()=>{ // console.log("Trialapplicationysl"); // console.log("70"); diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index cf93a781b..9281d228c 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -718,8 +718,17 @@ class LoginRegisterComponent extends Component { console.log(classpass); return ( -
    - +
    +
    diff --git a/public/react/src/modules/user/common.css b/public/react/src/modules/user/common.css index 4549fdfe9..0e00b623d 100644 --- a/public/react/src/modules/user/common.css +++ b/public/react/src/modules/user/common.css @@ -1,6 +1,6 @@ /*.login_register_content, .login_register_content .ant-tabs-tabpane {*/ -/* display: flex;*/ -/* justify-content: center; */ +/* !*display: flex;*!*/ +/* justify-content: center;*/ /*}*/ .login_register_content .ant-input { background:rgb(244,244,244); From 7615aca84886a33f05c3cf8662074b696763376b Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 19:45:19 +0800 Subject: [PATCH 888/964] comm --- public/react/src/modules/courses/coursesHome/coursesHome.js | 4 ++-- public/react/src/modules/tpm/shixuns/ShixunCardList.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/coursesHome/coursesHome.js b/public/react/src/modules/courses/coursesHome/coursesHome.js index a0b724460..8f139c9bd 100644 --- a/public/react/src/modules/courses/coursesHome/coursesHome.js +++ b/public/react/src/modules/courses/coursesHome/coursesHome.js @@ -114,14 +114,14 @@ class coursesHome extends Component{ onClick={ () => this.changeStatus("course_members_count")}>最热
    - + > */}
    diff --git a/public/react/src/modules/tpm/shixuns/ShixunCardList.js b/public/react/src/modules/tpm/shixuns/ShixunCardList.js index 7d98c2208..2125eecea 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunCardList.js +++ b/public/react/src/modules/tpm/shixuns/ShixunCardList.js @@ -214,7 +214,7 @@ class ShixunCardList extends Component { {/*enterButton*/} {/*/>*/} - this.Input_search(value)} autoComplete="off" - > + > */}
    { From 9064c9f7fab0f91abe71694361797a0b5dddc590 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 19:57:46 +0800 Subject: [PATCH 889/964] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/Trialapplication.js | 4 ++-- public/react/src/modules/login/Trialapplicationysl.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index 3f375eb18..bed10c38b 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -278,13 +278,13 @@ class Trialapplication extends Component { isRenders: false }) this.Cancel(); - + this.handleDialogClose() } else { this.setState({ isRenders: false }) this.Cancel(); - + this.handleDialogClose() } } }).catch((error) => { diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index 2b369ef7f..4ccb655b6 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -294,6 +294,7 @@ class Trialapplicationysl extends Component { isRenders: false }) this.Cancel(); + this.handleDialogClose() // } else { // this.setState({ // isRenders: false From 5b4da3d94d4d657c7412a0d41653ac2b67706272 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 20:04:14 +0800 Subject: [PATCH 890/964] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/Trialapplication.js | 6 ++---- public/react/src/modules/login/Trialapplicationysl.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index bed10c38b..c40f14bdc 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -216,13 +216,13 @@ class Trialapplication extends Component { this.setState({ isRenders: false }) - this.Cancel(); + this.handleDialogClose() window.location.href = "/"; } else { this.setState({ isRenders: false }) - this.Cancel(); + this.handleDialogClose() } } @@ -277,13 +277,11 @@ class Trialapplication extends Component { this.setState({ isRenders: false }) - this.Cancel(); this.handleDialogClose() } else { this.setState({ isRenders: false }) - this.Cancel(); this.handleDialogClose() } } diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index 4ccb655b6..02e7dc81b 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -293,7 +293,7 @@ class Trialapplicationysl extends Component { this.setState({ isRenders: false }) - this.Cancel(); + // this.Cancel(); this.handleDialogClose() // } else { // this.setState({ From 24133693e31262ed56e454f0812c2d09001cad58 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 20:27:11 +0800 Subject: [PATCH 891/964] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 46 +++++++++++++++++++ .../shixunHomework/ShixunHomeworkPage.js | 44 +++--------------- 2 files changed, 52 insertions(+), 38 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 704e4995b..67afa0414 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -2201,8 +2201,48 @@ class Listofworksstudentone extends Component { // // } + daochushixunbaogao=()=>{ + } + + + + confirmysl(url){ + axios.get(url).then((response) => { + if(response.data.status&&response.data.status===-1){ + + }else if(response.data.status&&response.data.status===-2){ + if(response.data.messages === "100"){ + // 已超出文件导出的上限数量(100 ),建议: + + this.setState({ + DownloadType:true, + DownloadMessageval:100 + }) + }else { + //因附件资料超过500M + this.setState({ + DownloadType:true, + DownloadMessageval:500 + }) + } + }else { + this.props.showNotification(`正在下载中`); + window.open("/api"+url, '_blank'); + } + }).catch((error) => { + console.log(error) + }); + } + + + Downloadcal=()=>{ + this.setState({ + DownloadType:false, + DownloadMessageval:undefined + }) + } render() { let {columns,course_groupysls,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state; @@ -2232,7 +2272,13 @@ class Listofworksstudentone extends Component { updatas={() => this.isupdatas()} /> : ""} + {visibles === true ?
    - {datalist === undefined ? "" :
    +
    + +

    暂无数据哦~

    +
    + :
    { - datalist === undefined ? "":datalist.length<11? + datalist === undefined ? "":datalist.length===0?"":datalist.length<11?
    ; From ff40ae2b7740badfbea7d7a9a8d0d4e75f1692b5 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 21:49:21 +0800 Subject: [PATCH 903/964] =?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 --- .../src/modules/courses/shixunHomework/ShixunHomeworkPage.js | 2 -- .../src/modules/courses/shixunHomework/ShixunStudentWork.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 112193d2e..60f84b0da 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -115,8 +115,6 @@ class ShixunHomeworkPage extends Component { const isAdmin = this.props.isAdmin(); - console.log(this.props) - console.log(this.state) return (
    diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 08cc0c1c3..d4e1855ed 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -815,7 +815,7 @@ class ShixunStudentWork extends Component { top: 72%;} } `} - + {datalist === undefined ? "" : datalist.length===0?
    From 3b43f494eadeaf4abcb3944928aca333dcbfb7ef Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 21:51:34 +0800 Subject: [PATCH 904/964] - --- public/react/src/modules/paths/ShixunPathSearch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/paths/ShixunPathSearch.js b/public/react/src/modules/paths/ShixunPathSearch.js index 4ff7c6d97..c37754d62 100644 --- a/public/react/src/modules/paths/ShixunPathSearch.js +++ b/public/react/src/modules/paths/ShixunPathSearch.js @@ -117,14 +117,14 @@ class ShixunPathSearch extends Component{ this.changeStatus("updated_at")}>最新 this.changeStatus("myshixun_count")}>最热
    - + > */}
    From 5d8f27e1248e73ed9372cdf8ec89979e0117f5e4 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 20 Jul 2019 21:52:09 +0800 Subject: [PATCH 905/964] =?UTF-8?q?=E5=BB=B6=E6=97=B6=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/exercise/Exercisestatisticalresulttabel.js | 3 ++- .../react/src/modules/courses/exercise/Exercisetablesmubu.js | 3 ++- .../shixunHomework/Shixunworkdetails/ShixunCustomsPass.js | 3 ++- .../shixunHomework/shixunreport/OfficialAcademicTranscript.js | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Exercisestatisticalresulttabel.js b/public/react/src/modules/courses/exercise/Exercisestatisticalresulttabel.js index 2a04e1978..7f221ee55 100644 --- a/public/react/src/modules/courses/exercise/Exercisestatisticalresulttabel.js +++ b/public/react/src/modules/courses/exercise/Exercisestatisticalresulttabel.js @@ -141,7 +141,8 @@ class OfficialAcademicTranscript extends Component { border-radius: 12px; color: rgba(221,23,23,1); display: inline-block; - line-height: 24px; + line-height: 24px; + text-align: center; } .tasknameboxs{ diff --git a/public/react/src/modules/courses/exercise/Exercisetablesmubu.js b/public/react/src/modules/courses/exercise/Exercisetablesmubu.js index 2a7bc3f13..6a62db36c 100644 --- a/public/react/src/modules/courses/exercise/Exercisetablesmubu.js +++ b/public/react/src/modules/courses/exercise/Exercisetablesmubu.js @@ -100,7 +100,8 @@ class Exercisetablesmubus extends Component { border-radius: 12px; color: rgba(221,23,23,1); display: inline-block; - line-height: 24px; + line-height: 24px; + text-align: center; } .tasknameboxs{ diff --git a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js index 8d3fcabb6..10ec2e40f 100644 --- a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js +++ b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunCustomsPass.js @@ -153,7 +153,8 @@ class ShixunCustomsPass extends Component { border-radius: 12px; color: rgba(221,23,23,1); display: inline-block; - line-height: 24px; + line-height: 24px; + text-align: center; } .ant-table-tbody > tr > td{ font-size:14px; diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js index f0a7ff941..c7c3b67e4 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js +++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js @@ -142,7 +142,8 @@ class OfficialAcademicTranscript extends Component { border-radius: 12px; color: rgba(221,23,23,1); display: inline-block; - line-height: 24px; + line-height: 24px; + text-align: center; } .tasknameboxs{ From fea89bedad3d5ce666586639fc306dbb65794ca7 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, 20 Jul 2019 22:02:47 +0800 Subject: [PATCH 906/964] =?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/Listofworksstudentone.js | 25 +++++++++++++++---- .../shixunHomework/ShixunHomeworkPage.js | 1 + .../shixunHomework/ShixunStudentWork.js | 18 +++++++++++++ .../shixunHomework/Trainingjobsetting.js | 17 +++++++++++++ .../shixunHomework/Workquestionandanswer.js | 18 +++++++++++++ 5 files changed, 74 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 0b3c1b338..4ddc71bd0 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -899,6 +899,7 @@ class Listofworksstudentone extends Component { ) }, ], + yslpros:false, } // console.log("902"); // console.log("902"); @@ -912,15 +913,26 @@ class Listofworksstudentone extends Component { } componentWillReceiveProps(nextProps) { - console.log("+++++++++913"); - console.log("+++++++++915"); - console.log("+++++++++916"); - console.log(nextProps); - console.log(this.props) + // console.log("+++++++++916"); + // console.log(nextProps); + // console.log(this.props) + // console.log(this.props.isAdmin()); + if (nextProps.code_review != this.props.code_review) { + if (nextProps.code_review !== undefined) { + console.log("diaoyonglwangluo1"); + if(this.props.isAdmin() === true){ + this.tearchar(); + }else{ + this.student(); + } + } + } } componentDidMount() { console.log("componentDidMount"); + + console.log(this.props.isAdmin()); if(this.props.isAdmin() === true){ this.tearchar(); // console.log("909"); @@ -2217,6 +2229,9 @@ class Listofworksstudentone extends Component { confirmysl(url){ axios.get(url).then((response) => { + if(response === undefined){ + return + } if(response.data.status&&response.data.status===-1){ }else if(response.data.status&&response.data.status===-2){ diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index bc20bb254..2996c794d 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -32,6 +32,7 @@ class ShixunHomeworkPage extends Component { visible: false, showmodel:false, child:undefined, + yslpros:false, } } diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index ad71fc6a4..fb0c44adf 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -81,6 +81,21 @@ class ShixunStudentWork extends Component { this.props.triggerRef(this); this.getTrainingjobsettings(); } + componentWillReceiveProps(nextProps) { + // console.log("+++++++++916"); + // console.log(nextProps); + // console.log(this.props) + // console.log(this.props.isAdmin()); + if (nextProps.code_review != this.props.code_review) { + if (nextProps.code_review !== undefined) { + console.log("diaoyonglwangluo1"); + this.getTrainingjobsettings(); + } + } + + } + + getTrainingjobsettings=()=>{ this.getupdata(); this.getTrainingjobsetting(); @@ -523,6 +538,9 @@ class ShixunStudentWork extends Component { confirmysl(url){ axios.get(url).then((response) => { + if(response === undefined){ + return + } if(response.data.status&&response.data.status===-1){ }else if(response.data.status&&response.data.status===-2){ diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 16d5e2a04..3809940e2 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -141,6 +141,20 @@ class Trainingjobsetting extends Component { + } + componentWillReceiveProps(nextProps) { + // console.log("+++++++++916"); + // console.log(nextProps); + // console.log(this.props) + // console.log(this.props.isAdmin()); + if (nextProps.code_review != this.props.code_review) { + if (nextProps.code_review !== undefined) { + console.log("diaoyonglwangluo4"); + this.getTrainingjobsetting() + + } + } + } // 获取数据地方 @@ -1744,6 +1758,9 @@ class Trainingjobsetting extends Component { confirmysl(url){ axios.get(url).then((response) => { + if(response === undefined){ + return + } if(response.data.status&&response.data.status===-1){ }else if(response.data.status&&response.data.status===-2){ diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index a65346770..46f4835de 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -94,6 +94,21 @@ class Workquestionandanswer extends Component { shixuntypes: type[3] }) } + componentWillReceiveProps(nextProps) { + // console.log("+++++++++916"); + // console.log(nextProps); + // console.log(this.props) + // console.log(this.props.isAdmin()); + if (nextProps.code_review != this.props.code_review) { + if (nextProps.code_review !== undefined) { + console.log("diaoyonglwangluo2"); + var homeworkid = this.props.match.params.homeworkid; + // console.log(homeworkid) + this.Gettitleinformation(homeworkid) + } + } + + } isupdatas = () => { var homeworkid = this.props.match.params.homeworkid; @@ -333,6 +348,9 @@ class Workquestionandanswer extends Component { confirmysl(url){ axios.get(url).then((response) => { + if(response === undefined){ + return + } if(response.data.status&&response.data.status===-1){ }else if(response.data.status&&response.data.status===-2){ From 15545fab0f64aa7ea78398d1cc6767d6a1942eef Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 20 Jul 2019 22:09:15 +0800 Subject: [PATCH 907/964] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/css/Courses.css | 4 ++-- .../src/modules/user/account/AccountCertification.js | 8 +++++--- .../src/modules/user/modal/RealNameCertificationModal.js | 6 +----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index 5766c571c..8b768aa88 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -801,10 +801,10 @@ a.white-btn.use_scope-btn:hover{ position: absolute; } -.ant-input{ +.ant-input,.ant-input .ant-input-suffix{ background-color: #fafafa!important; } -.ant-input:focus{ +.ant-input:focus,.ant-input:focus .ant-input-suffix{ background-color:#ffffff!important; } diff --git a/public/react/src/modules/user/account/AccountCertification.js b/public/react/src/modules/user/account/AccountCertification.js index bd5c0ce10..c72778ced 100644 --- a/public/react/src/modules/user/account/AccountCertification.js +++ b/public/react/src/modules/user/account/AccountCertification.js @@ -16,7 +16,7 @@ class AccountCertification extends Component { showRealNameCertificationModal = (index) => { this.setState({ - certification:index + certification:index, }) this.realNameCertificationModal.setVisible(true) } @@ -25,9 +25,11 @@ class AccountCertification extends Component { let {basicInfo} = this.props; return (
    - this.realNameCertificationModal = form} certification={certification} - > + >: this.realNameCertificationModal = form} certification={certification} + >}
    -
    认证信息
    -
    -
    -
    实名认证
    -
    有些课程需要实名认证才能加入哟,还能获得500金币的奖励~
    -
    - { - basicInfo && basicInfo.authentication =="uncertified" ? - this.showRealNameCertificationModal(1)} >立即认证: - basicInfo && basicInfo.authentication =="applying" ? 待审核: - 已认证 - } -
    -
    - -
    -
    职业认证
    -
    教师认证完毕之后,可创建课堂、发布实训、免金币查看所有实训答案..
    -
    - { - basicInfo && basicInfo.professional_certification =="uncertified" ? - this.showRealNameCertificationModal(2)} >立即认证: - basicInfo && basicInfo.professional_certification =="applying" ? 待审核: - 已认证 - } -
    -
    -
    -
    -
    * 我们确保你所提供的信息均处于严格保密状态,不会泄露
    -
    - ); - } -} - -export default AccountCertification; +import React, { Component } from 'react'; +// import { Button } from 'antd' +import { WordsBtn, getImageUrl } from 'educoder'; +import RealNameCertificationModal from '../modal/RealNameCertificationModal' +import '../../courses/css/Courses.css' +import {CNotificationHOC} from '../../courses/common/CNotificationHOC' + + +class AccountCertification extends Component { + constructor(props){ + super(props); + this.state={ + certification:1 + } + } + + showRealNameCertificationModal = (index) => { + this.setState({ + certification:index, + }) + this.realNameCertificationModal.setVisible(true) + } + render() { + let {certification}=this.state + let {basicInfo} = this.props; + return ( +
    + {this.state.certification===1? this.realNameCertificationModal = form} certification={certification} + >:""} + + {this.state.certification===2? this.realNameCertificationModal = form} certification={certification} + >:""} +
    + +
    认证信息
    +
    +
    +
    实名认证
    +
    有些课程需要实名认证才能加入哟,还能获得500金币的奖励~
    +
    + { + basicInfo && basicInfo.authentication =="uncertified" ? + this.showRealNameCertificationModal(1)} >立即认证: + basicInfo && basicInfo.authentication =="applying" ? 待审核: + 已认证 + } +
    +
    + +
    +
    职业认证
    +
    教师认证完毕之后,可创建课堂、发布实训、免金币查看所有实训答案..
    +
    + { + basicInfo && basicInfo.professional_certification =="uncertified" ? + this.showRealNameCertificationModal(2)} >立即认证: + basicInfo && basicInfo.professional_certification =="applying" ? 待审核: + 已认证 + } +
    +
    +
    +
    +
    * 我们确保你所提供的信息均处于严格保密状态,不会泄露
    +
    + ); + } +} + +export default AccountCertification; From 98c45b524a9087a938ca2aea0d1657fc3ab124a1 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 22:27:06 +0800 Subject: [PATCH 910/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/Listofworksstudentone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 4ddc71bd0..82aa2eb7a 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -2536,7 +2536,7 @@ class Listofworksstudentone extends Component {
    -

    没有数据可以显示.!

    +

    没有数据可以显示!

    From 8d8ee7351010a8c47aac641ae4ecf9631047ab3f 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, 20 Jul 2019 22:28:10 +0800 Subject: [PATCH 911/964] =?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/shixunHomework/Listofworksstudentone.js | 6 +++--- .../courses/shixunHomework/ShixunHomeworkPage.js | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 4ddc71bd0..c23b9b674 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -932,7 +932,7 @@ class Listofworksstudentone extends Component { componentDidMount() { console.log("componentDidMount"); - console.log(this.props.isAdmin()); + // console.log(this.props.isAdmin()); if(this.props.isAdmin() === true){ this.tearchar(); // console.log("909"); @@ -1109,7 +1109,7 @@ class Listofworksstudentone extends Component { }) } else { - console.log(teacherdata) + // console.log(teacherdata) if (teacherdata.id !== undefined || teacherdata.id !== null || teacherdata.id !== "") { // console.log("seacthdata设置数据1") // console.log(this.state.teacherdata ) @@ -1611,7 +1611,7 @@ class Listofworksstudentone extends Component { let columns = this.state.columns; var columns2=[]; if (teacherdata !== undefined) { - console.log("1588"); + // console.log("1588"); for (var i = 0; i < student_works.length; i++) { var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm'); datalist.push({ diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index fc8fba188..1dd814856 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -54,9 +54,9 @@ class ShixunHomeworkPage extends Component { } Getdataback = (jobsettingsdata, teacherdata) => { - console.log("56"); - console.log(jobsettingsdata); - console.log(teacherdata); + // console.log("56"); + // console.log(jobsettingsdata); + // console.log(teacherdata); this.setState({ jobsettingsdata: jobsettingsdata, @@ -72,13 +72,13 @@ class ShixunHomeworkPage extends Component { // let sum = [] // sum.push(type[1]) // console.log("componentDidMountcomponentDidMount"); - console.log(type); + // console.log(type); this.setState({ tab: type[1], }) let querys = this.props.location.pathname; const types = querys.split('/'); - console.log(types); + // console.log(types); this.setState({ shixuntypes: types[3] }) From e51192ed5f41f206ffdec4f469467970ec91808c 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 22:38:19 +0800 Subject: [PATCH 912/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/user/usersInfo/InfosCourse.js | 406 +++++++++--------- 1 file changed, 204 insertions(+), 202 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/InfosCourse.js b/public/react/src/modules/user/usersInfo/InfosCourse.js index 109a4d7b9..e27513963 100644 --- a/public/react/src/modules/user/usersInfo/InfosCourse.js +++ b/public/react/src/modules/user/usersInfo/InfosCourse.js @@ -1,203 +1,205 @@ -import React, { Component } from 'react'; -import { SnackbarHOC } from 'educoder'; -import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; -import {Tooltip,Menu,Pagination,Spin} from 'antd'; -import Loadable from 'react-loadable'; -import Loading from '../../../Loading'; -import axios from 'axios'; -import NoneData from '../../courses/coursesPublic/NoneData' -import {getImageUrl} from 'educoder'; -import { TPMIndexHOC } from '../../tpm/TPMIndexHOC'; -import { CNotificationHOC } from '../../courses/common/CNotificationHOC' -import "./usersInfo.css" -import Create from './publicCreatNew' - -class InfosCourse extends Component{ - constructor(props){ - super(props); - this.state={ - category:undefined, - status:undefined, - page:1, - per_page:16, - - totalCount:undefined, - data:undefined, - isSpin:false - } - } - - componentDidMount=()=>{ - this.setState({ - isSpin:true - }) - let{category,status,page}=this.state; - this.getCourses(category,status,page); - } - - getCourses=(category,status,page)=>{ - let url=`/users/${this.props.match.params.username}/courses.json`; - axios.get((url),{params:{ - category, - status, - page, - per_page: this.props.is_current && category && page ==1?17:16 - }}).then((result)=>{ - if(result){ - this.setState({ - totalCount:result.data.count, - data:result.data, - isSpin:false - }) - } - }).catch((error)=>{ - console.log(error); - }) - } - - //切换种类 - changeCategory=(cate)=>{ - this.setState({ - category:cate, - page:1, - isSpin:true - }) - let{status}=this.state; - this.getCourses(cate,status,1); - } - //切换状态 - changeStatus=(status)=>{ - this.setState({ - status:status, - page:1, - isSpin:true - }) - let{category}=this.state; - this.getCourses(category,status,1); - } - //切换页数 - changePage=(page)=>{ - this.setState({ - page, - isSpin:true - }) - let{category,status}=this.state; - this.getCourses(category,status,page); - } - - // 进入课堂 - turnToCourses=(url,flag)=>{ - if(flag){ - this.props.history.push(url); - } - } - - render(){ - let{ - category, - status, - page, - data, - totalCount, - isSpin - } = this.state; - let isStudent = this.props.isStudent(); - let is_current=this.props.is_current; - return( -
    - - - { - is_current && - - } -

    - 共参与{totalCount}个{category?category=="manage"?"发布":"学习":"课堂"} - 时间最新 -

    -
    - { - !isStudent && page == 1 && !category && is_current && - - } - { - (!data || data.courses.length==0) && (isStudent || category) && - } - { - data && data.courses && data.courses.map((item,key)=>{ - return( -
    this.turnToCourses(`${item.first_category_url}`,item.can_visited)} style={{"cursor": "pointer"}}> - { - item.is_public == 1 && - -
    - - 公开 -
    - } - { - item.can_visited ==false? -
    - -

    非成员不能访问

    -
    :"" - } - -
    -

    - {item.name} -

    - 用户 -

    {item.teacher && item.teacher.real_name}

    -

    {item.teacher && item.teacher.school_name}

    -
    -
    -
    - { - item.members_count > 0 && - - - {item.members_count} - - } - { - item.homework_commons_count > 0 && - - - {item.homework_commons_count} - - } - { - item.attachments_count > 0 && - - - {item.attachments_count} - - } -
    -
    -
    - ) - }) - } -
    - { - totalCount > 15 && -
    - -
    - } -
    -
    - ) - } -} +import React, { Component } from 'react'; +import { SnackbarHOC } from 'educoder'; +import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; +import {Tooltip,Menu,Pagination,Spin} from 'antd'; +import Loadable from 'react-loadable'; +import Loading from '../../../Loading'; +import axios from 'axios'; +import NoneData from '../../courses/coursesPublic/NoneData' +import {getImageUrl} from 'educoder'; +import { TPMIndexHOC } from '../../tpm/TPMIndexHOC'; +import { CNotificationHOC } from '../../courses/common/CNotificationHOC' +import "./usersInfo.css" +import Create from './publicCreatNew' + +class InfosCourse extends Component{ + constructor(props){ + super(props); + this.state={ + category:undefined, + status:undefined, + page:1, + per_page:16, + + totalCount:undefined, + data:undefined, + isSpin:false + } + } + + componentDidMount=()=>{ + this.setState({ + isSpin:true + }) + let{category,status,page}=this.state; + this.getCourses(category,status,page); + } + + getCourses=(category,status,page)=>{ + let url=`/users/${this.props.match.params.username}/courses.json`; + axios.get((url),{params:{ + category, + status, + page, + per_page: this.props.is_current && category && page ==1?17:16 + }}).then((result)=>{ + if(result){ + this.setState({ + totalCount:result.data.count, + data:result.data, + isSpin:false + }) + } + }).catch((error)=>{ + console.log(error); + }) + } + + //切换种类 + changeCategory=(cate)=>{ + this.setState({ + category:cate, + page:1, + isSpin:true + }) + let{status}=this.state; + this.getCourses(cate,status,1); + } + //切换状态 + changeStatus=(status)=>{ + this.setState({ + status:status, + page:1, + isSpin:true + }) + let{category}=this.state; + this.getCourses(category,status,1); + } + //切换页数 + changePage=(page)=>{ + this.setState({ + page, + isSpin:true + }) + let{category,status}=this.state; + this.getCourses(category,status,page); + } + + // 进入课堂 + turnToCourses=(url,flag)=>{ + if(flag){ + this.props.history.push(url); + } + } + + render(){ + let{ + category, + status, + page, + data, + totalCount, + isSpin + } = this.state; + let isStudent = this.props.isStudent(); + let is_current=this.props.is_current; + + console.log(this.props.current_user&&this.props.current_user.user_identity==="学生") + return( +
    + + + { + is_current && + + } +

    + 共参与{totalCount}个{category?category=="manage"?"发布":"学习":"课堂"} + 时间最新 +

    +
    + { + !isStudent && page == 1 && !category && is_current && + this.props.current_user&&this.props.current_user.user_identity==="学生"?"": + } + { + (!data || data.courses.length==0) && (isStudent || category) && + } + { + data && data.courses && data.courses.map((item,key)=>{ + return( +
    this.turnToCourses(`${item.first_category_url}`,item.can_visited)} style={{"cursor": "pointer"}}> + { + item.is_public == 1 && + +
    + + 公开 +
    + } + { + item.can_visited ==false? +
    + +

    非成员不能访问

    +
    :"" + } + +
    +

    + {item.name} +

    + 用户 +

    {item.teacher && item.teacher.real_name}

    +

    {item.teacher && item.teacher.school_name}

    +
    +
    +
    + { + item.members_count > 0 && + + + {item.members_count} + + } + { + item.homework_commons_count > 0 && + + + {item.homework_commons_count} + + } + { + item.attachments_count > 0 && + + + {item.attachments_count} + + } +
    +
    +
    + ) + }) + } +
    + { + totalCount > 15 && +
    + +
    + } +
    +
    + ) + } +} export default InfosCourse; \ No newline at end of file From 70a65eec18c4e7dff33fde151c684687c28cf776 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 22:39:52 +0800 Subject: [PATCH 913/964] =?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/modules/user/usersInfo/InfosCourse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/user/usersInfo/InfosCourse.js b/public/react/src/modules/user/usersInfo/InfosCourse.js index e27513963..d4c82ad2f 100644 --- a/public/react/src/modules/user/usersInfo/InfosCourse.js +++ b/public/react/src/modules/user/usersInfo/InfosCourse.js @@ -104,7 +104,7 @@ class InfosCourse extends Component{ let isStudent = this.props.isStudent(); let is_current=this.props.is_current; - console.log(this.props.current_user&&this.props.current_user.user_identity==="学生") + // console.log(this.props.current_user&&this.props.current_user.user_identity==="学生") return(
    From 9d02a4b189f26ff5fd934cde53013a605af7b422 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 22:58:05 +0800 Subject: [PATCH 914/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/ShixunhomeWorkItem.js | 2 +- public/react/src/modules/user/usersInfo/InfosCourse.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index e026ad622..e87af8ec4 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -373,7 +373,7 @@ class ShixunhomeWorkItem extends Component{ width:192px !important; } .homepagePostSettingbox{ - width:121px !important; + width:139px !important; } ` } diff --git a/public/react/src/modules/user/usersInfo/InfosCourse.js b/public/react/src/modules/user/usersInfo/InfosCourse.js index d4c82ad2f..146316111 100644 --- a/public/react/src/modules/user/usersInfo/InfosCourse.js +++ b/public/react/src/modules/user/usersInfo/InfosCourse.js @@ -104,7 +104,7 @@ class InfosCourse extends Component{ let isStudent = this.props.isStudent(); let is_current=this.props.is_current; - // console.log(this.props.current_user&&this.props.current_user.user_identity==="学生") + console.log(this.props.current_user&&this.props.current_user.user_identity==="学生") return(
    From 3d2213815e3e8633311ef0f06946dfcadefd35e3 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 22:59:31 +0800 Subject: [PATCH 915/964] 54 --- .../src/modules/comment/CommentItemMDEditor.css | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/public/react/src/modules/comment/CommentItemMDEditor.css b/public/react/src/modules/comment/CommentItemMDEditor.css index 4a714f09b..8b0eb4ab6 100644 --- a/public/react/src/modules/comment/CommentItemMDEditor.css +++ b/public/react/src/modules/comment/CommentItemMDEditor.css @@ -24,6 +24,22 @@ .panel-comment_item .editor__resize { transform: translateX(-2%); + + position: absolute; + width: 120px; + height: 4px; + left: 54%; + transform: translateX(-50%); + margin-top: 2px; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; + cursor: row-resize; + text-indent: 110%; + white-space: nowrap; + overflow: hidden; + text-transform: capitalize; + + box-sizing: border-box; } /*帖子回復按鈕*/ From 9b005da451c8860176fc306d5a53272f040222d6 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, 20 Jul 2019 23:03:23 +0800 Subject: [PATCH 916/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Listofworksstudentone.js | 6 +++--- .../modules/courses/shixunHomework/ShixunhomeWorkItem.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index a774d6684..2af9d6f33 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -913,9 +913,9 @@ class Listofworksstudentone extends Component { } componentWillReceiveProps(nextProps) { - // console.log("+++++++++916"); - // console.log(nextProps); - // console.log(this.props) + console.log("+++++++++916"); + console.log(nextProps); + console.log(this.props) // console.log(this.props.isAdmin()); if (nextProps.code_review != this.props.code_review) { if (nextProps.code_review !== undefined) { diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index e026ad622..9ebd5cb9e 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -381,7 +381,8 @@ class ShixunhomeWorkItem extends Component{ {this.props.isAdmin?:""} From 20036d9947ffc88ac8ec2aa6a6db9717c89955cb Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 23:06:10 +0800 Subject: [PATCH 917/964] right --- public/react/src/modules/comment/CommentItemMDEditor.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/react/src/modules/comment/CommentItemMDEditor.css b/public/react/src/modules/comment/CommentItemMDEditor.css index 8b0eb4ab6..0f9c31231 100644 --- a/public/react/src/modules/comment/CommentItemMDEditor.css +++ b/public/react/src/modules/comment/CommentItemMDEditor.css @@ -47,6 +47,11 @@ a.commentsbtn.task-btn-blue { background: #4CACFF !important; } +.commentTab a.commentsbtn.task-btn-blue { + margin-right: 22px; + margin-top: 6px; +} + .editormd-grid-table-row a.editormd-emoji-btn.selected { border-bottom: 2px solid #4CACFF!important; From 49cf04286a3fc818bf6096613f667ec41b5eea77 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 23:09:00 +0800 Subject: [PATCH 918/964] commentTab --- public/react/src/modules/page/main/LeftView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/main/LeftView.js b/public/react/src/modules/page/main/LeftView.js index 428d898cb..b00319502 100644 --- a/public/react/src/modules/page/main/LeftView.js +++ b/public/react/src/modules/page/main/LeftView.js @@ -336,7 +336,7 @@ class LeftView extends Component {
    -
    +
    { loadingComments ? : From a641062931b928c14232bc20e1833f61db4a75e8 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 23:09:57 +0800 Subject: [PATCH 919/964] u --- public/react/src/modules/courses/members/teacherList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 92b0e0d4b..fc6b56313 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -65,7 +65,7 @@ function buildColumns(that) { sorter: showSorter, sortOrder: sortedInfo.columnKey === 'name' && sortedInfo.order, render: (name, record) => { - return 4 ? name : ''}`}>{name} } }, { From 73c391796e2ddb456a1df3d7cf8643e8a71d0c44 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 20 Jul 2019 23:14:09 +0800 Subject: [PATCH 920/964] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83-?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/usersInfo/InfosCourse.js | 7 +++---- public/react/src/modules/user/usersInfo/InfosPath.js | 6 +++--- public/react/src/modules/user/usersInfo/InfosProject.js | 6 +++--- public/react/src/modules/user/usersInfo/InfosShixun.js | 6 +++--- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/InfosCourse.js b/public/react/src/modules/user/usersInfo/InfosCourse.js index d4c82ad2f..ce708a8f8 100644 --- a/public/react/src/modules/user/usersInfo/InfosCourse.js +++ b/public/react/src/modules/user/usersInfo/InfosCourse.js @@ -101,7 +101,6 @@ class InfosCourse extends Component{ totalCount, isSpin } = this.state; - let isStudent = this.props.isStudent(); let is_current=this.props.is_current; // console.log(this.props.current_user&&this.props.current_user.user_identity==="学生") @@ -127,11 +126,11 @@ class InfosCourse extends Component{

    { - !isStudent && page == 1 && !category && is_current && - this.props.current_user&&this.props.current_user.user_identity==="学生"?"": + page == 1 && is_current && + this.props.current_user && this.props.current_user.user_identity != "学生" ? : "" } { - (!data || data.courses.length==0) && (isStudent || category) && + (!data || data.courses.length==0) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && } { data && data.courses && data.courses.map((item,key)=>{ diff --git a/public/react/src/modules/user/usersInfo/InfosPath.js b/public/react/src/modules/user/usersInfo/InfosPath.js index 6e5fa247d..a7b0b95f6 100644 --- a/public/react/src/modules/user/usersInfo/InfosPath.js +++ b/public/react/src/modules/user/usersInfo/InfosPath.js @@ -148,11 +148,11 @@ class InfosPath extends Component{
    { - !isStudent && page == 1 && !category && is_current && - + page == 1 && is_current && + this.props.current_user && this.props.current_user.user_identity != "学生" ? :"" } { - (!data || data.subjects.length==0) && (isStudent || category) && + (!data || data.subjects.length==0) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && } { data && data.subjects && data.subjects.map((item,key)=>{ diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js index 06076a3cd..d308e0fd3 100644 --- a/public/react/src/modules/user/usersInfo/InfosProject.js +++ b/public/react/src/modules/user/usersInfo/InfosProject.js @@ -121,11 +121,11 @@ class InfosProject extends Component{

    { - !isStudent && page == 1 && !category && is_current && - + page == 1 && is_current && this.props.current_user && this.props.current_user.user_identity != "学生" ? + :"" } { - (!data || data.projects.length==0) && (isStudent || category) && + (!data || data.projects.length==0) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && } { data && data.projects && data.projects.map((item,key)=>{ diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js index 2ccb8744c..7e911202e 100644 --- a/public/react/src/modules/user/usersInfo/InfosShixun.js +++ b/public/react/src/modules/user/usersInfo/InfosShixun.js @@ -157,11 +157,11 @@ class InfosShixun extends Component{
    { - !isStudent && page == 1 && !category && is_current && - + page == 1 && is_current && this.props.current_user && this.props.current_user.user_identity != "学生" ? + :"" } { - (!data || data.shixuns.length==0) && (isStudent || category) && + (!data || data.shixuns.length==0) && (this.props.current_user && this.props.current_user.user_identity === "学生" || category) && } { data && data.shixuns && data.shixuns.map((item,key)=>{ From 28511ff80c4e90d12f12996d284c1c7c44d100dc 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 23:18:57 +0800 Subject: [PATCH 921/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/busyWork/CommonWorkPost.js | 2 +- .../src/modules/courses/busyWork/UseBank.js | 2 +- .../modules/courses/coursesPublic/ShixunModal.js | 16 ++++++++++------ .../courses/exercise/Ecerciseallbackagain.js | 1 + .../exercise/Exercisestatisticalresult.js | 1 + .../exercise/Studentshavecompletedthelist.js | 4 ++++ .../graduation/tasks/GraduationTasksSubmitnew.js | 2 +- .../tasks/GraduationTaskssettinglist.js | 10 +++++----- public/react/src/modules/courses/poll/PollNew.js | 2 +- .../courses/shixunHomework/Listofworks.js | 2 ++ .../shixunHomework/Listofworksstudentone.js | 2 ++ .../courses/shixunHomework/ShixunStudentWork.js | 2 +- .../src/modules/paths/PathDetail/sendPanel.js | 2 +- 13 files changed, 31 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkPost.js b/public/react/src/modules/courses/busyWork/CommonWorkPost.js index ae51d04a0..4c5578d2c 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkPost.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkPost.js @@ -650,7 +650,7 @@ render(){ width: '375px', height: '30px' }}> -
    {item.user_name}
    diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index 4cd1b424e..671a09fff 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -278,7 +278,7 @@ class UseBank extends Component{ */ return (

    - + diff --git a/public/react/src/modules/courses/coursesPublic/ShixunModal.js b/public/react/src/modules/courses/coursesPublic/ShixunModal.js index 1fc218908..afba47723 100644 --- a/public/react/src/modules/courses/coursesPublic/ShixunModal.js +++ b/public/react/src/modules/courses/coursesPublic/ShixunModal.js @@ -80,7 +80,7 @@ class ShixunModal extends Component{ //勾选实训 shixunhomeworkedit=(list)=>{ - +debugger let newpatheditarry=[]; if (this.props.singleChoose == true) { if (list.length > 0) { @@ -99,6 +99,7 @@ class ShixunModal extends Component{ } contentViewScrolledit=(e)=>{ + //滑动到底判断 if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ let {Searchvalue,type,page}=this.state; @@ -122,9 +123,9 @@ class ShixunModal extends Component{ this.setState({ page:1, }) - + this.props.funpatheditarry([]) this.setupdatalist(value,type,true,1) - this.props.funpatheditarry([]) + } //tag @@ -135,9 +136,9 @@ class ShixunModal extends Component{ page:1, newshixunmodallist:undefined }) - + this.props.funpatheditarry([]) this.setupdatalist(Searchvalue,types,true,1) - this.props.funpatheditarry([]) + } @@ -353,11 +354,14 @@ class ShixunModal extends Component{ { newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{ + console.log(item) return(

  • diff --git a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js index b5e7ab820..f6389613b 100644 --- a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js +++ b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js @@ -122,6 +122,7 @@ class Exercisestatisticalresult extends Component { return ( {item.exercise_group_name} ({item.exercise_group_students}) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index 5cd59f704..6f4cec877 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -2404,6 +2404,7 @@ class Studentshavecompletedthelist extends Component { course_groupyslstwodata.map((item, key) => { return ( {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users}) ) }) @@ -2435,6 +2436,7 @@ class Studentshavecompletedthelist extends Component { course_groupyslstwodatas.map((item, key) => { return ( {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unreview_counts : Teacherliststudentlist.exercise_types.review_counts}) ) }) @@ -2464,6 +2466,7 @@ class Studentshavecompletedthelist extends Component { course_groupyslstwodata.map((item, key) => { return ( {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users}) ) }) @@ -2492,6 +2495,7 @@ class Studentshavecompletedthelist extends Component { course_groups.map((item, key) => { return ( {item.exercise_group_name}({item.exercise_group_students}) ) }) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index ee0e98f16..355a514a4 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -737,7 +737,7 @@ render(){ width: '375px', height: '30px' }}> - { return parseInt(task_status[key])===item.user_id?true:false }) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index a5b6ccaa6..4aa01d44e 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1188,7 +1188,7 @@ class GraduationTaskssettinglist extends Component{ {taskslistdata.search_assistants&&taskslistdata.search_assistants.task_status.map((item,key)=>{ return( - {item.name} + {item.name} ({item.count}) @@ -1211,7 +1211,7 @@ class GraduationTaskssettinglist extends Component{ {taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.map((item,key)=>{ return( - {item.group_group_name} + {item.group_group_name} ({item.count}) @@ -1423,7 +1423,7 @@ class GraduationTaskssettinglist extends Component{ {taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ return( - {item.name} + {item.name} ({item.count}) @@ -1456,7 +1456,7 @@ class GraduationTaskssettinglist extends Component{ {taskslistdata.search_assistants&&taskslistdata.search_assistants.task_status.map((item,key)=>{ return( - {item.name} + {item.name} ({item.count}) @@ -1479,7 +1479,7 @@ class GraduationTaskssettinglist extends Component{ {taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.map((item,key)=>{ return( - {item.group_group_name} + {item.group_group_name} ({item.count}) diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index e6dc94515..675e355f3 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -2596,7 +2596,7 @@ class PollNew extends Component { {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { return (
    - + {items.answer_text}
    ) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 070aee271..e289918e1 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -810,6 +810,7 @@ class Listofworks extends Component { return ( {item.name} ({item.count}) @@ -841,6 +842,7 @@ class Listofworks extends Component { return ( {item.group_group_name} ({item.count}) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index a774d6684..51af9e57e 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -2451,6 +2451,7 @@ class Listofworksstudentone extends Component { return ( {item.name} ({item.count}) @@ -2482,6 +2483,7 @@ class Listofworksstudentone extends Component { return ( {item.group_group_name} ({item.count}) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index cf9374f08..fa549d403 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -780,7 +780,7 @@ class ShixunStudentWork extends Component { {data&&data.group_info === undefined ? "" : data&&data.group_info.map((item, key) => { return ( - + {item.name}({item.members_count}) diff --git a/public/react/src/modules/paths/PathDetail/sendPanel.js b/public/react/src/modules/paths/PathDetail/sendPanel.js index edbe083b1..8aedc2770 100644 --- a/public/react/src/modules/paths/PathDetail/sendPanel.js +++ b/public/react/src/modules/paths/PathDetail/sendPanel.js @@ -181,7 +181,7 @@ class sendPanel extends Component{ item.shixuns.map((items,keys)=>{ return(
    - {items.shixun_name} + {items.shixun_name}
    ) }) From 0087d407ecbd75f5cd7c10717a3c9a68508716eb 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, 20 Jul 2019 23:31:16 +0800 Subject: [PATCH 922/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/exercise/Testpapersettinghomepage.js | 4 ++-- .../modules/courses/shixunHomework/ShixunHomeworkPage.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index f5b8750d4..fd2a56253 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -334,8 +334,8 @@ class Testpapersettinghomepage extends Component{ 导出
  • :""}
    diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 1dd814856..7aa763f4e 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -203,9 +203,9 @@ class ShixunHomeworkPage extends Component {
  • 导出
      -
    • this.confirmysl(this.child,1)}>实训报告 -
    • + {/*
    • this.confirmysl(this.child,1)}>实训报告*/} + {/*
    • */}
    • this.confirmysl(this.child,2)}>学生成绩
    • From 005235a1661bbe0a152ef47f13ab374bc9d7ce58 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 23:35:01 +0800 Subject: [PATCH 923/964] =?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/App.js | 4 ++-- .../modules/courses/shixunHomework/ShixunWorkReport.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/react/src/App.js b/public/react/src/App.js index 8743aff8f..d7aa0a540 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -333,8 +333,8 @@ class App extends Component { */} - - + {/**/} + {/**/} {/*实训课程(原实训路径)*/} diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 2f32283bc..afdd5ce37 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -136,10 +136,10 @@ class ShixunWorkReport extends Component {

      {data&&data.shixun_name}

      {/*{this.props.isAdmin()?导出实训报告数据:""}*/} - {this.props.isAdmin() ? this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)} - >导出实训报告数据 : ""} + {/*{this.props.isAdmin() ? this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}*/} + {/*>导出实训报告数据 : ""}*/}
      From d9a9ceeb3786d226e0e137824c9848a723e6fca5 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 23:49:37 +0800 Subject: [PATCH 924/964] =?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/modules/login/Trialapplication.js | 4 ++-- public/react/src/modules/login/Trialapplicationysl.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index c40f14bdc..fdf710a21 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -270,7 +270,7 @@ class Trialapplication extends Component { }).then((result) => { // console.log(result); // this.onTabChange("1"); - if(result !== undefined){ + this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); if (this.state.showTrial === false) { window.location.href = "/"; @@ -284,7 +284,7 @@ class Trialapplication extends Component { }) this.handleDialogClose() } - } + this.handleDialogClose() }).catch((error) => { }) diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index b65725cef..f9dc28b69 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -286,7 +286,7 @@ class Trialapplicationysl extends Component { }).then((result) => { // console.log(result); // this.onTabChange("1"); - if(result !== undefined){ + this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); // if (this.state.showTrial === false) { window.location.href = "/"; @@ -302,7 +302,7 @@ class Trialapplicationysl extends Component { // this.Cancel(); // // } - } + }).catch((error) => { }) From 75425d8532678a59fbf74cf718a9a412a5dda447 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, 20 Jul 2019 23:58:59 +0800 Subject: [PATCH 925/964] =?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/modules/login/Trialapplication.js | 2 +- public/react/src/modules/login/Trialapplicationysl.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index c40f14bdc..ebb4b98c2 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -271,7 +271,7 @@ class Trialapplication extends Component { // console.log(result); // this.onTabChange("1"); if(result !== undefined){ - this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); + // this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); if (this.state.showTrial === false) { window.location.href = "/"; this.setState({ diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index b65725cef..e2afac010 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -287,7 +287,7 @@ class Trialapplicationysl extends Component { // console.log(result); // this.onTabChange("1"); if(result !== undefined){ - this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); + // this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); // if (this.state.showTrial === false) { window.location.href = "/"; this.setState({ From 14302ee37f3d7d1212dda65e683b673fa38a878f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sun, 21 Jul 2019 00:01:11 +0800 Subject: [PATCH 926/964] b --- public/react/src/modules/login/Trialapplication.js | 4 ++-- public/react/src/modules/login/Trialapplicationysl.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index fdf710a21..864a2efb8 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -271,9 +271,9 @@ class Trialapplication extends Component { // console.log(result); // this.onTabChange("1"); - this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); + // this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); if (this.state.showTrial === false) { - window.location.href = "/"; + // window.location.href = "/"; this.setState({ isRenders: false }) diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index f9dc28b69..65537645f 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -287,9 +287,9 @@ class Trialapplicationysl extends Component { // console.log(result); // this.onTabChange("1"); - this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); + // this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); // if (this.state.showTrial === false) { - window.location.href = "/"; + // window.location.href = "/"; this.setState({ isRenders: false }) From 3cf11cdfc80a43ff7e9f5183fb7c0d02465c0b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sun, 21 Jul 2019 00:59:54 +0800 Subject: [PATCH 927/964] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/login/Trialapplication.js | 2 +- .../src/modules/login/Trialapplicationysl.js | 29 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index 02116ce7d..1730b17a4 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -271,7 +271,7 @@ class Trialapplication extends Component { // console.log(result); // this.onTabChange("1"); if(result !== undefined){ - this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); + // this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); if (this.state.showTrial === false) { window.location.href = "/"; this.setState({ diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index f38804810..ad61b460f 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -44,24 +44,23 @@ class Trialapplicationysl extends Component { Cancel = () => { // this.props.Cancel() } - componentWillReceiveProps(nextProps) { // console.log("46"); // console.log(nextProps); // console.log(this.props); - // if (nextProps.user != this.props.user) { - // // console.log("50"); - // // console.log(nextProps.user); - // if (nextProps.user !== undefined) { - // // console.log("53"); - // // console.log(nextProps.user); - // this.setState({ - // user_phone_binded: nextProps.user.user_phone_binded, - // }) - // } - // - // - // } + if (nextProps.user != this.props.user) { + // console.log("50"); + // console.log(nextProps.user); + if (nextProps.user !== undefined) { + // console.log("53"); + // console.log(nextProps.user); + this.setState({ + user_phone_binded: nextProps.user.user_phone_binded, + }) + } + + + } } @@ -287,7 +286,7 @@ class Trialapplicationysl extends Component { // console.log(result); // this.onTabChange("1"); if(result !== undefined){ - this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); + // this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); // if (this.state.showTrial === false) { window.location.href = "/"; this.setState({ From 8c242888b301767f5047329364bb4876de636126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sun, 21 Jul 2019 15:37:53 +0800 Subject: [PATCH 928/964] =?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/Listofworksstudentone.js | 47 +++++++++---------- .../shixunHomework/ShixunHomeworkPage.js | 8 ++-- .../shixunHomework/ShixunStudentWork.js | 26 +++++----- .../shixunHomework/Trainingjobsetting.js | 28 +++++------ .../shixunHomework/Workquestionandanswer.js | 30 ++++++------ 5 files changed, 69 insertions(+), 70 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 98401beca..c38c0aeff 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -912,23 +912,23 @@ class Listofworksstudentone extends Component { console.log(info); } - componentWillReceiveProps(nextProps) { - console.log("+++++++++916"); - console.log(nextProps); - console.log(this.props) - // console.log(this.props.isAdmin()); - if (nextProps.code_review != this.props.code_review) { - if (nextProps.code_review !== undefined) { - console.log("diaoyonglwangluo1"); - if(this.props.isAdmin() === true){ - this.tearchar(); - }else{ - this.student(); - } - } - } - - } + // componentWillReceiveProps(nextProps) { + // console.log("+++++++++916"); + // console.log(nextProps); + // console.log(this.props) + // // console.log(this.props.isAdmin()); + // if (nextProps.code_review != this.props.code_review) { + // if (nextProps.code_review !== undefined) { + // console.log("diaoyonglwangluo1"); + // if(this.props.isAdmin() === true){ + // this.tearchar(); + // }else{ + // this.student(); + // } + // } + // } + // + // } componentDidMount() { console.log("componentDidMount"); @@ -1528,8 +1528,8 @@ class Listofworksstudentone extends Component { code_review: result.data.code_review, challenges_count:result.data.challenges_count, }) - this.props.Getdataback(result,result.data); this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); + this.props.Getdataback(result,result.data); } }).catch((error) => { console.log(error) @@ -1587,8 +1587,8 @@ class Listofworksstudentone extends Component { code_review: result.data.code_review, challenges_count:result.data.challenges_count, }) - this.props.Getdataback(result,result.data); this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page); + this.props.Getdataback(result,result.data); // } } }).catch((error) => { @@ -1928,9 +1928,8 @@ class Listofworksstudentone extends Component { .then((response) => { if (response.data.status == '0') { this.setState({visible: false}); - this.props.showNotification(`调分成功`); - this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); + this.props.showNotification(`调分成功`); } }) .catch(function (error) { @@ -1991,8 +1990,6 @@ class Listofworksstudentone extends Component { axios.get(url).then((response) => { if (response.status === 200) { - let starttime = this.props.getNowFormatDates(1); - let endtime = this.props.getNowFormatDates(2); this.setState({ modalname: "立即发布", modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, @@ -2010,6 +2007,8 @@ class Listofworksstudentone extends Component { Saves: this.homeworkstartend, course_groups: response.data.course_groups, }) + let starttime = this.props.getNowFormatDates(1); + let endtime = this.props.getNowFormatDates(2); } }).catch((error) => { console.log(error) @@ -2183,11 +2182,11 @@ class Listofworksstudentone extends Component { let url = "/homework_commons/"+homeworkid+"/update_score.json"; axios.get(url).then((response) => { - this.props.showNotification(`${response.data.message}`); this.setState({ loadingstate: true }) this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit); + this.props.showNotification(`${response.data.message}`); }).catch((error) => { console.log(error) }); diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 7aa763f4e..6b3d0e991 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -252,10 +252,10 @@ class ShixunHomeworkPage extends Component { {/*/>*/} - {parseInt(tab) === 0 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - {parseInt(tab) === 1 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - {parseInt(tab) === 2 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - {parseInt(tab) === 3 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} + {parseInt(tab) === 0 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} + {parseInt(tab) === 1 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} + {parseInt(tab) === 2 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} + {parseInt(tab) === 3 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""}
  • diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index fa549d403..40af640db 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -81,19 +81,19 @@ class ShixunStudentWork extends Component { this.props.triggerRef(this); this.getTrainingjobsettings(); } - componentWillReceiveProps(nextProps) { - // console.log("+++++++++916"); - // console.log(nextProps); - // console.log(this.props) - // console.log(this.props.isAdmin()); - if (nextProps.code_review != this.props.code_review) { - if (nextProps.code_review !== undefined) { - console.log("diaoyonglwangluo1"); - this.getTrainingjobsettings(); - } - } - - } + // componentWillReceiveProps(nextProps) { + // // console.log("+++++++++916"); + // // console.log(nextProps); + // // console.log(this.props) + // // console.log(this.props.isAdmin()); + // if (nextProps.code_review != this.props.code_review) { + // if (nextProps.code_review !== undefined) { + // console.log("diaoyonglwangluo1"); + // this.getTrainingjobsettings(); + // } + // } + // + // } getTrainingjobsettings=()=>{ diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 3809940e2..1d530bfd1 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -142,20 +142,20 @@ class Trainingjobsetting extends Component { } - componentWillReceiveProps(nextProps) { - // console.log("+++++++++916"); - // console.log(nextProps); - // console.log(this.props) - // console.log(this.props.isAdmin()); - if (nextProps.code_review != this.props.code_review) { - if (nextProps.code_review !== undefined) { - console.log("diaoyonglwangluo4"); - this.getTrainingjobsetting() - - } - } - - } + // componentWillReceiveProps(nextProps) { + // // console.log("+++++++++916"); + // // console.log(nextProps); + // // console.log(this.props) + // // console.log(this.props.isAdmin()); + // if (nextProps.code_review != this.props.code_review) { + // if (nextProps.code_review !== undefined) { + // console.log("diaoyonglwangluo4"); + // this.getTrainingjobsetting() + // + // } + // } + // + // } // 获取数据地方 getTrainingjobsetting = () => { diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 46f4835de..385c2d4b8 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -94,21 +94,21 @@ class Workquestionandanswer extends Component { shixuntypes: type[3] }) } - componentWillReceiveProps(nextProps) { - // console.log("+++++++++916"); - // console.log(nextProps); - // console.log(this.props) - // console.log(this.props.isAdmin()); - if (nextProps.code_review != this.props.code_review) { - if (nextProps.code_review !== undefined) { - console.log("diaoyonglwangluo2"); - var homeworkid = this.props.match.params.homeworkid; - // console.log(homeworkid) - this.Gettitleinformation(homeworkid) - } - } - - } + // componentWillReceiveProps(nextProps) { + // // console.log("+++++++++916"); + // // console.log(nextProps); + // // console.log(this.props) + // // console.log(this.props.isAdmin()); + // if (nextProps.code_review != this.props.code_review) { + // if (nextProps.code_review !== undefined) { + // console.log("diaoyonglwangluo2"); + // var homeworkid = this.props.match.params.homeworkid; + // // console.log(homeworkid) + // this.Gettitleinformation(homeworkid) + // } + // } + // + // } isupdatas = () => { var homeworkid = this.props.match.params.homeworkid; From d28c6e85b725d2cdf0f26f12ff6d94527a063fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sun, 21 Jul 2019 19:15:44 +0800 Subject: [PATCH 929/964] =?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/modules/courses/Index.js | 9 - .../courses/shixunHomework/Listofworks.js | 1038 ----------------- .../shixunHomework/Listofworksstudentone.js | 217 ++-- .../shixunHomework/ShixunHomeworkPage.js | 51 +- .../shixunHomework/ShixunStudentWork.js | 3 +- .../shixunHomework/ShixunhomeWorkItem.js | 2 +- .../shixunHomework/Trainingjobsetting.js | 8 +- .../shixunHomework/Workquestionandanswer.js | 3 +- 8 files changed, 122 insertions(+), 1209 deletions(-) delete mode 100644 public/react/src/modules/courses/shixunHomework/Listofworks.js diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index f5e62a134..27424821f 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -89,10 +89,6 @@ const Trainingjobsetting= Loadable({ loading: Loading, }) //实训作业列表教师 -const Listofworks= Loadable({ - loader: () => import('./shixunHomework/Listofworks'), - loading: Loading, -}) // //实训作业列表学生未完成的 // const Studentnotcompleted= Loadable({ @@ -773,11 +769,6 @@ class CoursesIndex extends Component{ } > {/*/!*实训作品列表教师*!/*/} - {/* ()*/} - {/* }*/} - {/*>*/} {/*提交总结*/} ( - {record.number} - - ) - }, - { - title: '姓名', - dataIndex: 'name', - key: 'name', - align: 'center', - className:'font-14', - width:'120px', - render: (text, record) => ( - {record.name} - ) - }, - { - title: '学号', - dataIndex: 'stduynumber', - key: 'stduynumber', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber} - - ), - }, - { - title: '分班', - key: 'classroom', - dataIndex: 'classroom', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.classroom} - ) - }, - { - title: '提交状态', - dataIndex: 'submitstate', - key: 'submitstate', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.submitstate} - - ) - - }, - { - title: '实战耗时', - dataIndex: 'cost_time', - key: 'cost_time', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time } - - ) - - }, - { - title: '更新时间', - dataIndex: 'updatetime', - key: 'updatetime', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.updatetime} - ), - }, - { - title: '完成情况', - dataIndex: 'completion', - key: 'completion', - align: 'center', - className:'font-14', - render: (text, record) => ( - - - -
    已通过{record.completion}关,共{this.state.challenges_count}关
    -
    }> - {record.completion+"/"+this.state.challenges_count} - - - - ) - }, - { - title: '关卡得分', - dataIndex: 'levelscore', - key: 'levelscore', - align: 'center', - className:'font-14', - render: (text, record) => ( - - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.levelscore} - - ) - }, - { - title: '效率分', - dataIndex: 'efficiencyscore', - key: 'efficiencyscore', - align: 'center', - className:'font-14', - render: (text, record) => ( - - { - record.efficiencyscore&& record.efficiencyscore=== "--"?( - this.state.allow_late&&this.state.allow_late===false? - -
    作业截止时,系统根据学生在课堂成员中的效率表现自动评分
    -
    }> - - -- - - - : - this.state.allow_late&&this.state.allow_late===true? - -
    补交结束时,系统根据学生在课堂成员中的效率表现自动评分
    -
    }> - - -- - - - : - - -- - - ) - : - = 90 ? { - "color": '#DD1717', - "text-align": "center" - } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore} - } - - - ) - }, - { - title: '最终成绩', - dataIndex: 'finalscore', - key: 'finalscore', - align: 'center', - className:'font-14', - render: (text, record) => ( - - { - record.ultimate_score=== true? - -
    {record.user_name}{record.user_login}
    -
    {record.finalscore === "--"?最终调整成绩:0分 :最终调整成绩:{record.finalscore}分}
    -
    }> - { - record.finalscore&&record.finalscore==="--"? - {record.finalscore} - : - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.finalscore} - } - - : - -
    {record.user_name}{record.user_login}
    -
    {record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
    -
    {record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
    -
    {record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
    -
    {record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
    -
    }> - { - record.finalscore&&record.finalscore==="--"? - {record.finalscore} - : - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.finalscore} - } - - - } - - ) - }, - { - title: '操作', - dataIndex: 'operating', - key: 'operating', - display: 'block', - align: 'center', - className:'font-14', - render: (text, record) => ( - record.submitstate === "未提交" ? -- : - - this.Viewstudenttraininginformationt(record)}>{record.operating} - - ) - }, - ], - columnss: [ - { - title: '序号', - dataIndex: 'number', - key: 'number', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.number} - - ) - }, - { - title: '姓名', - dataIndex: 'name', - key: 'name', - align: 'center', - className:'font-14', - width:'120px', - render: (text, record) => ( - {record.name} - ) - }, - { - title: '学号', - dataIndex: 'stduynumber', - key: 'stduynumber', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber} - - ), - }, - { - title: '分班', - key: 'classroom', - dataIndex: 'classroom', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.classroom} - ) - }, - { - title: '提交状态', - dataIndex: 'submitstate', - key: 'submitstate', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.submitstate} - - ) - - }, - { - title: '更新时间', - dataIndex: 'updatetime', - key: 'updatetime', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.updatetime} - ), - }, - { - title: '实战耗时', - dataIndex: 'cost_time', - key: 'cost_time', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time } - - ) - - }, - { - title: '完成情况', - dataIndex: 'completion', - key: 'completion', - align: 'center', - className:'font-14', - render: (text, record) => ( - - - -
    已通过{record.completion}关,共{this.state.challenges_count}关
    -
    }> - {record.completion+"/"+this.state.challenges_count} - - - - ) - }, - { - title: '关卡得分', - dataIndex: 'levelscore', - key: 'levelscore', - align: 'center', - className:'font-14', - render: (text, record) => ( - - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.levelscore} - - ) - }, - { - title: '效率分', - dataIndex: 'efficiencyscore', - key: 'efficiencyscore', - align: 'center', - className:'font-14', - render: (text, record) => ( - - { - record.efficiencyscore&& record.efficiencyscore=== "--"?( - this.state.allow_late&&this.state.allow_late===false? - -
    作业截止时,系统根据学生在课堂成员中的效率表现自动评分
    - }> - - -- - -
    - : - this.state.allow_late&&this.state.allow_late===true? - -
    补交结束时,系统根据学生在课堂成员中的效率表现自动评分
    - }> - - -- - -
    - : - - -- - - ) - : - = 90 ? { - "color": '#DD1717', - "text-align": "center" - } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore} - } - -
    - ) - }, - { - title: '最终成绩', - dataIndex: 'finalscore', - key: 'finalscore', - align: 'center', - className:'font-14', - render: (text, record) => ( - - { - record.ultimate_score=== true? - -
    {record.user_name}{record.user_login}
    -
    {record.finalscore === "--"?最终调整成绩:0分 :最终调整成绩:{record.finalscore}分}
    - }> - { - record.finalscore&&record.finalscore==="--"? - {record.finalscore} - : - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.finalscore} - } -
    - : - -
    {record.user_name}{record.user_login}
    -
    {record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
    -
    {record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
    -
    {record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
    -
    {record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
    - }> - { - record.finalscore&&record.finalscore==="--"? - {record.finalscore} - : - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.finalscore} - } -
    - - } -
    - ) - }, - { - title: '操作', - dataIndex: 'operating', - key: 'operating', - display: 'block', - align: 'center', - className:'font-14', - render: (text, record) => ( - record.submitstate === "未提交" ? -- : - - this.Viewstudenttraininginformationt(record)}>{record.operating} - - ) - }, - ], - - - } - - } - - componentDidMount() { - console.log("Listofworks"); - console.log("componentDidMount"); - this.tearchar(); - - } - - - render() { - // console.log("Listofworks.js000") - - let {columns,computeTimetype, page, boolgalist,limit,experience,course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, orders, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state; - // - // console.log(teacherdata&&teacherdata.shixun_identifier) - // console.log(this.props.teacherdata&&this.props.teacherdata.publish_immediately) - // console.log(JSON.stringify(this.props)); - return ( -
    - {visible === true ? this.saveModulationModal(value, num)} - /> : ""} - - {this.state.showmodel === true ? this.hideshowmodel()} - updatas={() => this.isupdatas()} - /> : ""} - - - {visibles === true ? -
    - - this.cancelModulationModels()} - /> - -
    - : "" - } - - {/*立即发布*/} - this.getcourse_groupslist(id)} - starttimes={this.state.starttimes} - typs={this.state.typs} - /> -
    - - -
    - - - - {computeTimetype===false?
  • - - 正在执行成绩计算,请稍后刷新页面查看结果 - 温馨提示:执行时间因作品数量而异 - -
  • :""} - - {/*作品状态GraduationTaskssettinglist*/} -
      -
    • - 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} - - {teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?
      - 计算成绩 -
      : -
      - {teacherdata&&teacherdata.homework_status[0]=== "未发布"? "": -
      - 计算成绩 -
      - } -
      } -
      - -
      - this.onSearchKeywordKeyUpt(e)} - onInput={this.inputSearchValuest} - onSearch={this.searchValuest} - > -
      -
    • - -
    • - - 作品状态: - this.notlimiteds()}>不限 - this.funtaskstatust(e, task_status && task_status)} - style={{paddingTop: '4px'}}> - - {task_status === undefined ? "" : task_status.map((item, key) => { - return ( - - {item.name} - ({item.count}) - - - - ) - })} - - {/*请输入姓名或学号搜索*/} - - -
    • - - - {/*分班情况*/} - -
    • - {JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" : -
      - 分班情况: - this.notlimitedst()}>不限 - this.funtaskstatustwot(e, course_group_info && course_group_info)} - style={{paddingTop: '4px',width:'1017px'}}> - {course_group_info === undefined ? "" : - course_group_info.map((item, key) => { - return ( - - {item.group_group_name} - ({item.count}) - - - ) - }) - } - -
      } -
    • - -
    - - - - { - JSON.stringify(data) === "[]" ? - -
    -
    -
    - -

    没有数据可以显示!

    -
    -
    - -
    - : - -
    - -
    - {data === undefined ? "" :
    } - - - } - - - - { - teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? -
    - -
    - : "" - } - - - - - ) - } -} - -export default Listofworks; - -{/*
    */} -{/*

    */} -{/* {jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}*/} -{/* >*/} -{/* {jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}*/} -{/* >*/} -{/* 作业详情*/} -{/*

    */} -{/*
    */} -{/*
    */} -{/*

    */} -{/*{teacherdata === undefined ? "" : teacherdata.homework_name}*/} -{/*

    */} -{/**/} -{/*返回*/} -{/*实训详情*/} - - -{/*
    */} -//
    -//
    -// this.ChangeTab(0)}>作品列表 -// this.ChangeTab(1)}>作业问答 -// {this.props.isAdmin() ? -// this.state.code_review === true ||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"? "" : this.ChangeTab(2)}> -// 代码查重 : ""} -// this.ChangeTab(3)} -// >设置 -// {/*{this.props.isAdmin() ? 导出 : ""}*/} -// -// {this.props.isAdmin()?
  • -// 导出 -// -//
  • :""} -// {this.props.isAdmin() ? -// teacherdata && teacherdata.end_immediately === true ? -// 立即截止 -// : "" -// : ""} -// {this.props.isAdmin() ? -// teacherdata && teacherdata.publish_immediately === true ? -// 立即发布 -// : "" -// : ""} -// {this.props.isAdmin() ? -// teacherdata && teacherdata.code_review === true ? -// 代码查重 -// : "": ""} -{/*
    */} -{/*
    */} diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index c38c0aeff..3c031367f 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -66,7 +66,7 @@ class Listofworksstudentone extends Component { pages: 1, limit: 20, loadingstate: true, - order: "updated_at", + order: "update_time", search: null, day: 0, hour: 0, @@ -96,23 +96,23 @@ class Listofworksstudentone extends Component { {record.number === undefined ? -- : record.number === "" ? -- : record.number === "--" ? -- : {record.number} } @@ -900,6 +900,8 @@ class Listofworksstudentone extends Component { }, ], yslpros:false, + datajs:[], + } // console.log("902"); // console.log("902"); @@ -930,22 +932,34 @@ class Listofworksstudentone extends Component { // // } componentDidMount() { - console.log("componentDidMount"); - - // console.log(this.props.isAdmin()); - if(this.props.isAdmin() === true){ - this.tearchar(); - // console.log("909"); - }else{ - this.student(); - // console.log("911"); - - } + // console.log("componentDidMount "); + // console.log("调用子组件 "); + // console.log(this.props); + // console.log(this.props.isAdmin()) + this.student(); } + isupdatas = () => { + var homeworkid = this.props.match.params.homeworkid; + // this.Gettitleinformation(homeworkid); + this.Getalistofworks(homeworkid); + } + /////////老师操作 + // tearchar=()=>{ + // var homeworkid = this.props.match.params.homeworkid; + // // console.log(homeworkid) + // // this.Gettitleinformation(homeworkid); + // this.Getalistofworkst(homeworkid); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes: type[3] + // }) + // this.props.triggerRef(this) + // } student=()=>{ // console.log("914"); // debugger - this.props.triggerRef(this); + var homeworkid = this.props.match.params.homeworkid; this.Getalistofworks(homeworkid); let query = this.props.location.pathname; @@ -953,6 +967,7 @@ class Listofworksstudentone extends Component { this.setState({ shixuntypes: type[3] }) + this.props.triggerRef(this); } @@ -977,12 +992,11 @@ class Listofworksstudentone extends Component { course_group: "", } axios.post(urll, data).then((result) => { + console.log("980000000____________________"); + if(result === undefined){ return } - // console.log("951"); - // console.log(result); - // debugger this.setState({ teacherdata: result.data, task_status: result.data.task_status, @@ -996,13 +1010,17 @@ class Listofworksstudentone extends Component { code_review: result.data.code_review, challenges_count: result.data.challenges_count, view_report: result.data.view_report, + allow_late:result.data.allow_late, + loadingstate: false, }) - this.props.Getdataback(result,result.data); + 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) === "[]") { this.seacthdata(result.data); } else { this.seacthdatas(result.data, result.data.student_works); } + this.props.Getdataback(result,result.data); }).catch((error) => { console.log(error); @@ -1052,12 +1070,12 @@ class Listofworksstudentone extends Component { challenges_count:result.data.challenges_count, view_report:result.data.view_report, }) - this.props.Getdataback(result,result.data); if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { this.seacthdata(result.data); } else { this.seacthdatas(result.data,result.data.student_works); } + this.props.Getdataback(result,result.data); } }).catch((error) => { @@ -1152,7 +1170,8 @@ class Listofworksstudentone extends Component { if (student_works !== undefined) { for (var i = 0; i { console.log(error) @@ -1468,77 +1487,6 @@ class Listofworksstudentone extends Component { } - /////////老师操作 - tearchar=()=>{ - this.props.triggerRef(this) - var homeworkid = this.props.match.params.homeworkid; - // console.log(homeworkid) - // this.Gettitleinformation(homeworkid); - this.Getalistofworkst(homeworkid); - let query = this.props.location.pathname; - const type = query.split('/'); - this.setState({ - shixuntypes: type[3] - }) - } - - isupdatas = () => { - var homeworkid = this.props.match.params.homeworkid; - // this.Gettitleinformation(homeworkid); - this.Getalistofworkst(homeworkid); - } - - // 获取作品列表 - Getalistofworkst = (homeworkid) => { - // console.log("获取作品列表");7009 - // debugger - - let urll = `/homework_commons/${homeworkid}/works_list.json`; - // console.log(homeworkid); - - // search:搜索关键字 - // order:排序方式:更新时间:update_time,最终成绩:work_score,学号:student_id - // b_order:desc:倒序 , asc:顺序 - // work_status:0:未提交, 1:按时提交, 2:延时提交,“”不限 - // course_group:分班情况 [232, 231], []:不限(空数组) - var data = { - search: "", - order: this.state.orders, - b_order: "desc", - work_status: "", - course_group: "", - page:1, - limit:20, - } - axios.post(urll, data).then((result) => { - if (result) { - // console.log(url) - // console.log("作品列表6789077") - // console.log(JSON.stringify(result)) - this.setState({ - teacherdata: result.data, - task_status: result.data.task_status, - allow_late:result.data.allow_late, - course_group_info: result.data.course_group_info, - loadingstate: false, - jobsettingsdata: result, - publish_immediately: result.data.publish_immediately, - work_efficiency: result.data.work_efficiency, - end_immediately: result.data.end_immediately, - code_review: result.data.code_review, - challenges_count:result.data.challenges_count, - }) - this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); - this.props.Getdataback(result,result.data); - } - }).catch((error) => { - console.log(error) - this.setState({ - loadingstate: false, - }) - }) - } - //开始排序操作 Startsortingt = (ordervlue, checkedValuesine, checkedValuesineinfo, searchtext, page, limit) => { //要提交的作品状态checkedValuesine @@ -1607,14 +1555,19 @@ class Listofworksstudentone extends Component { seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => { let {page, limit} = this.state; - let datalist = []; + let datalistjs = []; let columns = this.state.columns; - var columns2=[]; - if (teacherdata !== undefined) { + var columns2js=[]; + // console.log("1614++++++++++++++++++++++="); + // console.log(student_works); + // console.log(teacherdata); + if (student_works !== undefined) { + // console.log("1618____________________"); + // console.log(student_works); // console.log("1588"); for (var i = 0; i < student_works.length; i++) { var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm'); - datalist.push({ + datalistjs.push({ myid: student_works[i].id, number: (parseInt(page) - 1) * parseInt(limit) + (i + 1), name: student_works[i].user_name, @@ -1635,8 +1588,6 @@ class Listofworksstudentone extends Component { user_name: student_works[i].user_name, user_login: student_works[i].user_login, }) - // console.log(datalist); - // console.log("1612"); } @@ -1659,7 +1610,7 @@ class Listofworksstudentone extends Component { else if(this.props.isNotMember()===true&&item.title==="学号") { }else{ - columns2.push(item); + columns2js.push(item); } } @@ -1677,7 +1628,7 @@ class Listofworksstudentone extends Component { else if(this.props.isNotMember()===true&&item.title==="学号") { }else{ - columns2.push(item); + columns2js.push(item); } } @@ -1691,7 +1642,7 @@ class Listofworksstudentone extends Component { else if(this.props.isNotMember()===true&&item.title==="学号") { }else{ - columns2.push(item); + columns2js.push(item); } } } @@ -1707,7 +1658,7 @@ class Listofworksstudentone extends Component { else if(this.props.isNotMember()===true&&item.title==="学号") { }else{ - columns2.push(item); + columns2js.push(item); } } @@ -1723,11 +1674,11 @@ class Listofworksstudentone extends Component { else if(this.props.isNotMember()===true&&item.title==="学号") { }else{ - columns2.push(item); + columns2js.push(item); } } } - columns2=this.state.columnss; + columns2js=this.state.columnss; } } @@ -1737,8 +1688,8 @@ class Listofworksstudentone extends Component { // console.log(datalist); // console.log("1712"); this.setState({ - data: datalist, - columns: columns2, + datajs: datalistjs, + columns: columns2js, loadingstate: false, }) } @@ -2265,18 +2216,19 @@ class Listofworksstudentone extends Component { }) } render() { - let {columns,course_groupysls,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state; + let {columns,course_groupysls,datajs,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state; - // console.log(this.state.data); + // console.log(this.state.student_works); // console.log("841"); // console.log(this.state.columns); - // console.log(data); + // console.log(datajs); // console.log("2202"); // console.log(this.props.isAdmin()); return ( this.props.isAdmin() === true ? + ( { - JSON.stringify(data) === "[]" ? + JSON.stringify(datajs) === "[]" ?
    -

    没有数据可以显示!

    +

    没有数据可以显示.!

    @@ -2558,8 +2510,8 @@ class Listofworksstudentone extends Component { } `}
    - {data === undefined ? "" :
    + ) : + (
    { teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ? @@ -2679,8 +2633,8 @@ class Listofworksstudentone extends Component {
    @@ -2694,7 +2648,7 @@ class Listofworksstudentone extends Component { } {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : {teacherdata.left_time.time} + style={{color: '#FF6800'}}>{teacherdata.left_time.time} } @@ -2747,7 +2701,7 @@ class Listofworksstudentone extends Component {
    -

    没有数据可以显示!

    +

    没有数据可以显示,,!

    @@ -2808,8 +2762,8 @@ class Listofworksstudentone extends Component { {JSON.stringify(datas) !== "[]" ?
    @@ -2821,7 +2775,7 @@ class Listofworksstudentone extends Component { {teacherdata.left_time.status}} {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : {teacherdata.left_time.time}} + style={{color: '#FF6800'}}>{teacherdata.left_time.time}}
    - {/*/courses/1309/9373/listofworks*/} + {/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/} { this.props.isAdmin?自定义分值 {testscripttiptype===true? -
    +

    diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 385c2d4b8..1dc6a10fd 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -84,7 +84,6 @@ class Workquestionandanswer extends Component { componentDidMount() { console.log("Workquestionandanswer"); console.log("componentDidMount"); - this.props.triggerRef(this); var homeworkid = this.props.match.params.homeworkid; // console.log(homeworkid) this.Gettitleinformation(homeworkid) @@ -93,6 +92,8 @@ class Workquestionandanswer extends Component { this.setState({ shixuntypes: type[3] }) + this.props.triggerRef(this); + } // componentWillReceiveProps(nextProps) { // // console.log("+++++++++916"); From 72c1417c7b8fb2fa5015b6b92e66a95a119dff5f Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 22 Jul 2019 09:08:27 +0800 Subject: [PATCH 930/964] ant-input-affix-wrapper .ant-input-prefix --- public/react/src/modules/courses/css/Courses.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index 8b768aa88..c69b147fa 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -1224,6 +1224,9 @@ samp { .ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled){ border:1px solid #d9d9d9!important; } + .ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix { + background: #fafafa!important; + } .ant-input:hover{ border:1px solid #d9d9d9!important; } From 385422819a80c3c70e78a726d8e7105e59b3e172 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, 22 Jul 2019 09:08:31 +0800 Subject: [PATCH 931/964] =?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 | 1 - public/react/src/modules/tpm/NewHeader.js | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 528ec6b94..0cc9fd687 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -21,7 +21,6 @@ function locationurl(list){ 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) { // TODO 避免重复的请求 https://github.com/axios/axios#cancellation diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 4e61101e3..d09e3ab4c 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -392,6 +392,15 @@ class NewHeader extends Component { // return false; // } } + onSearchhref = (value) => { + window.location.href ="/search?value="+value; + // let code = e.keyCode; + + // if(code == 13) { + // header_search(this); + // return false; + // } + } hideAddcoursestypes=()=>{ @@ -719,7 +728,7 @@ submittojoinclass=(value)=>{ > console.log(value)} + onSearch={this.onSearchhref} onPressEnter={this.onKeywordSearchKeyDown} style={{ width: 300 }} From be5893f43db1441eb9534d0ccec0b2b6a0e638f4 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, 22 Jul 2019 09:12:07 +0800 Subject: [PATCH 932/964] =?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/modules/tpm/NewHeader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index d09e3ab4c..d698ebf95 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -728,7 +728,7 @@ submittojoinclass=(value)=>{ > this.onSearchhref(value)} onPressEnter={this.onKeywordSearchKeyDown} style={{ width: 300 }} From 26e2a8d2ec7022727df302c2fad45fd2aa19cfdb Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 22 Jul 2019 09:16:09 +0800 Subject: [PATCH 933/964] #4CACFF --- public/react/src/modules/page/main/LeftView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/page/main/LeftView.js b/public/react/src/modules/page/main/LeftView.js index b00319502..2f311690f 100644 --- a/public/react/src/modules/page/main/LeftView.js +++ b/public/react/src/modules/page/main/LeftView.js @@ -101,7 +101,8 @@ class LeftView extends Component {

    {`已经过职业认证的教师可以免金币查看答案哟~`}

    {`将扣除${challenge.score}点金币,是否确认查看答案`}

    -

    this.goToCertification()} style={{textDecoration: 'underline'}}>立即认证

    +

    this.goToCertification()} + style={{textDecoration: 'underline', color: '#4CACFF'}}>立即认证

    : From 56a4397eb6e5a107a67062713145864ee038e4ff 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, 22 Jul 2019 09:23:47 +0800 Subject: [PATCH 934/964] =?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/modules/tpm/NewHeader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index d698ebf95..d6d076f93 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -393,6 +393,7 @@ class NewHeader extends Component { // } } onSearchhref = (value) => { + console.log(value); window.location.href ="/search?value="+value; // let code = e.keyCode; @@ -728,8 +729,7 @@ submittojoinclass=(value)=>{ > this.onSearchhref(value)} - + onSearch={value =>this.onSearchhref(value)} onPressEnter={this.onKeywordSearchKeyDown} style={{ width: 300 }} /> From b1a4b2633c3538c09cd34cfac045f48e0babf9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 22 Jul 2019 09:28:10 +0800 Subject: [PATCH 935/964] . --- public/react/src/modules/tpm/NewHeader.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index d698ebf95..506e70f99 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -393,6 +393,7 @@ class NewHeader extends Component { // } } onSearchhref = (value) => { + debugger window.location.href ="/search?value="+value; // let code = e.keyCode; @@ -727,10 +728,10 @@ submittojoinclass=(value)=>{ style={{display: 'none'}} > this.onSearchhref(value)} - - onPressEnter={this.onKeywordSearchKeyDown} + placeholder="实践课程/翻转课堂/开发社区/交流问答" + // onSearch={(value)=>this.onSearchhref(value)} + onSearch={value => console.log(value)} + onPressEnter={this.onKeywordSearchKeyDown} style={{ width: 300 }} />
    From 0c78ce1d5368e6fb8ca0d4a55208f515fa28556a Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 22 Jul 2019 09:38:23 +0800 Subject: [PATCH 936/964] min-width: 300px; --- public/react/src/modules/page/layers/TaskResultLayer.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/react/src/modules/page/layers/TaskResultLayer.css b/public/react/src/modules/page/layers/TaskResultLayer.css index 7bc0b6f46..25f570a56 100644 --- a/public/react/src/modules/page/layers/TaskResultLayer.css +++ b/public/react/src/modules/page/layers/TaskResultLayer.css @@ -46,6 +46,8 @@ .passImg{ max-width: 86%; max-height: 100%; + user-select: none; + min-width: 300px; } /* ImageLayer ----------------- End */ From f44cf53cb9fbcef67ecd2768666d796e069800b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 22 Jul 2019 09:58:42 +0800 Subject: [PATCH 937/964] =?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 --- public/react/src/modules/tpm/NewHeader.js | 18 ++++++++++-------- public/react/src/search/SearchPage.js | 20 +++++++++++--------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 506e70f99..9202dfbf4 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -36,7 +36,7 @@ const $ = window.$ // TODO 这部分脚本从公共脚本中直接调用 const RadioGroup = Radio.Group; -const Search = Input.Search; +const { Search } = Input; let old_url; function loadHeader(){ //头部导航条的----------显示搜索框 @@ -384,7 +384,9 @@ class NewHeader extends Component { } onKeywordSearchKeyDown = (e) => { - window.location.href ="/search?value="+e.target.value; + let url="/search?value="+e.target.value; + + this.props.history.push(url) // let code = e.keyCode; // if(code == 13) { @@ -392,9 +394,10 @@ class NewHeader extends Component { // return false; // } } - onSearchhref = (value) => { - debugger - window.location.href ="/search?value="+value; + onSearchhref = (e) => { + let url="/search?value="+e.target.value; + + this.props.history.push(url) // let code = e.keyCode; // if(code == 13) { @@ -729,10 +732,9 @@ submittojoinclass=(value)=>{ > this.onSearchhref(value)} - onSearch={value => console.log(value)} + onChange={(e)=>this.onSearchhref(e)} onPressEnter={this.onKeywordSearchKeyDown} - style={{ width: 300 }} + style={{ width: 300 }} />
    diff --git a/public/react/src/search/SearchPage.js b/public/react/src/search/SearchPage.js index 37a06e8d8..32d88b392 100644 --- a/public/react/src/search/SearchPage.js +++ b/public/react/src/search/SearchPage.js @@ -52,15 +52,6 @@ class SearchPage extends Component{ } componentDidMount(){ - // const query =this.props.location.search; - // const type = query.split('?tab='); - // let sum = [] - // sum.push(type[1]) - // // console.log("componentDidMountcomponentDidMount"); - // // console.log(sum); - // this.setState({ - // tab:sum, - // }) let courstype=decodeURI(decodeURI(this.props.location.search)); courstype = courstype.split('?value='); @@ -70,6 +61,17 @@ class SearchPage extends Component{ this.getdata(this.state.page,this.state.type,courstype[1]); } + componentDidUpdate(prevProps) { + if(prevProps.location.search!=this.props.location.search){ + let courstype=decodeURI(decodeURI(this.props.location.search)); + courstype = courstype.split('?value='); + + this.setState({ + keywords:courstype[1] + }) + this.getdata(this.state.page,this.state.type,courstype[1]); + } + } setdatafunsval=(e)=>{ this.setState({ From 23853f45a01b3a8ce7c5c138b9c211feadc4fefc 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, 22 Jul 2019 10:07:05 +0800 Subject: [PATCH 938/964] =?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/modules/tpm/NewHeader.js | 363 +++++++++++----------- 1 file changed, 183 insertions(+), 180 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index d6d076f93..719e70a52 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -36,7 +36,7 @@ const $ = window.$ // TODO 这部分脚本从公共脚本中直接调用 const RadioGroup = Radio.Group; -const Search = Input.Search; +const { Search } = Input; let old_url; function loadHeader(){ //头部导航条的----------显示搜索框 @@ -129,7 +129,7 @@ function header_search(reactHeaderComponnet){ // // { search: keyword, // // index: index}); // window.location.href = old_url+"/users/search_shixuns_or_courses" + "?search=" + keyword + "&index=" + index; - //e.stopPropagation();//阻止冒泡 + //e.stopPropagation();//阻止冒泡 // } else { // window.__headSearchKeyword = keyword // reactHeaderComponnet.props.history.push(`/shixuns`) @@ -251,7 +251,7 @@ class NewHeader extends Component { const url = `/accounts/logout.json` this.delCookie("autologin_trustie") axios.get(url, { - }) + }) .then((response) => { if(response.data.status===1){ this.setState({ @@ -384,17 +384,20 @@ class NewHeader extends Component { } onKeywordSearchKeyDown = (e) => { - window.location.href ="/search?value="+e.target.value; + let url="/search?value="+e.target.value; + + this.props.history.push(url) // let code = e.keyCode; - + // if(code == 13) { // header_search(this); // return false; // } } - onSearchhref = (value) => { - console.log(value); - window.location.href ="/search?value="+value; + onSearchhref = (e) => { + let url="/search?value="+e.target.value; + + this.props.history.push(url) // let code = e.keyCode; // if(code == 13) { @@ -429,136 +432,136 @@ class NewHeader extends Component { }) } -submittojoinclass=(value)=>{ - let {tojoinclasstitle,rolearr,RadioGroupvalue}=this.state; + submittojoinclass=(value)=>{ + let {tojoinclasstitle,rolearr,RadioGroupvalue}=this.state; - if(tojoinclasstitle===undefined){ - this.setState({ - code_notice:true - }) - return - } - let newrolearr=rolearr; - if(value===1){ - if(tojoinclasstitle.length<6){ + if(tojoinclasstitle===undefined){ this.setState({ code_notice:true }) return } - }else if(value===0){ - if(tojoinclasstitle.length<5){ + let newrolearr=rolearr; + if(value===1){ + if(tojoinclasstitle.length<6){ + this.setState({ + code_notice:true + }) + return + } + }else if(value===0){ + if(tojoinclasstitle.length<5){ + this.setState({ + code_notice:true + }) + return + } + } + if(tojoinclasstitle===""||tojoinclasstitle===undefined){ this.setState({ code_notice:true }) return + }else{ + this.setState({ + code_notice:false + }) } - } - if(tojoinclasstitle===""||tojoinclasstitle===undefined){ - this.setState({ - code_notice:true - }) - return - }else{ - this.setState({ - code_notice:false - }) - } - let pamst=[]; - let num=0; - for(var i = 0 ; i { - if( response.data.state===0){ - this.submitstatevalue(0,"加入成功",response.data.course_id) - }else if( response.data.state===1){ - }else if( response.data.state===2){ - this.submitstatevalue( 0,"课堂已过期! 请联系课堂管理员重启课堂。(在配置课堂处)") - }else if( response.data.state===3){ - this.submitstatevalue( 0,"您已是课堂成员)",response.data.course_id) - }else if( response.data.state===4){ - this.submitstatevalue( 0,"您输入的邀请码错误)") - }else if( response.data.state===5){ - this.submitstatevalue( 0,"您还未登录") - }else if( response.data.state===6){ - this.submitstatevalue( 0,"申请已提交,请等待审核") - }else if( response.data.state===7){ - this.submitstatevalue( 0," 您已经发送过申请了,请耐心等待") - }else if( response.data.state===8){ - this.submitstatevalue( 0,"您已经是该课堂的教师了",response.data.course_id) - }else if( response.data.state==9){ - this.submitstatevalue( 0,"您已经是该课堂的教辅了",response.data.course_id) - }else if( response.data.state==10){ - this.submitstatevalue(0,"您已经是该课堂的管理员了",response.data.course_id) - }else if( response.data.state==11){ - this.submitstatevalue(0," 该课堂已归档,请联系老师") - }else if( response.data.state==12){ - this.submitstatevalue(0,"您已经发送过申请了,请耐心等待师") - }else if( response.data.state==13){ - this.submitstatevalue(0,"您申请已提交,请等待审核") - }else if( response.data.state==14){ - this.submitstatevalue("此邀请码已停用,请与老师联系") - }else if( response.data.state==15){ - this.submitstatevalue(0,"您已是课堂成员! 加入分班请在课堂具体分班页面进行") - }else { - this.submitstatevalue(0," 未知错误,请稍后再试") - } - }) + if(value===0){ + let url="/courses/join_course_multi_role.json" + const form = new FormData(); + form.append('invite_code', tojoinclasstitle); + form.append('role', pamst); + form.append('type', 1); + axios.post(url,form,[true] + ).then((response) => { + if( response.data.state===0){ + this.submitstatevalue(0,"加入成功",response.data.course_id) + }else if( response.data.state===1){ + }else if( response.data.state===2){ + this.submitstatevalue( 0,"课堂已过期! 请联系课堂管理员重启课堂。(在配置课堂处)") + }else if( response.data.state===3){ + this.submitstatevalue( 0,"您已是课堂成员)",response.data.course_id) + }else if( response.data.state===4){ + this.submitstatevalue( 0,"您输入的邀请码错误)") + }else if( response.data.state===5){ + this.submitstatevalue( 0,"您还未登录") + }else if( response.data.state===6){ + this.submitstatevalue( 0,"申请已提交,请等待审核") + }else if( response.data.state===7){ + this.submitstatevalue( 0," 您已经发送过申请了,请耐心等待") + }else if( response.data.state===8){ + this.submitstatevalue( 0,"您已经是该课堂的教师了",response.data.course_id) + }else if( response.data.state==9){ + this.submitstatevalue( 0,"您已经是该课堂的教辅了",response.data.course_id) + }else if( response.data.state==10){ + this.submitstatevalue(0,"您已经是该课堂的管理员了",response.data.course_id) + }else if( response.data.state==11){ + this.submitstatevalue(0," 该课堂已归档,请联系老师") + }else if( response.data.state==12){ + this.submitstatevalue(0,"您已经发送过申请了,请耐心等待师") + }else if( response.data.state==13){ + this.submitstatevalue(0,"您申请已提交,请等待审核") + }else if( response.data.state==14){ + this.submitstatevalue("此邀请码已停用,请与老师联系") + }else if( response.data.state==15){ + this.submitstatevalue(0,"您已是课堂成员! 加入分班请在课堂具体分班页面进行") + }else { + this.submitstatevalue(0," 未知错误,请稍后再试") + } + }) - } + } - if(value===1){ - let url="/applied_project/applied_project_info.json" - const form = new FormData(); - form.append('invite_code', tojoinclasstitle); - form.append('member', RadioGroupvalue); - form.append('type', 1); - axios.post(url,form,[true] - ).then((response) => { - if( response.data.status===1){ - this.submitstatevalue(1,"您输入的邀请码错误") - }else if( response.data.status===2){ - this.submitstatevalue( 1,"您已经是该项目成员",response.data.project) - }else if( response.data.status===3){ - this.submitstatevalue( 1,"请选择一个角色") - }else if( response.data.status===4){ - this.submitstatevalue( 1,"您的申请已提交,请等待项目管理员审批") - }else if( response.data.status===5){ - this.submitstatevalue( 1,"您已经申请加入该项目了,请耐心等待") - }else if( response.data.status===6){ - this.submitstatevalue( 1,"您已成功加入项目",response.data.project) - } - }) + if(value===1){ + let url="/applied_project/applied_project_info.json" + const form = new FormData(); + form.append('invite_code', tojoinclasstitle); + form.append('member', RadioGroupvalue); + form.append('type', 1); + axios.post(url,form,[true] + ).then((response) => { + if( response.data.status===1){ + this.submitstatevalue(1,"您输入的邀请码错误") + }else if( response.data.status===2){ + this.submitstatevalue( 1,"您已经是该项目成员",response.data.project) + }else if( response.data.status===3){ + this.submitstatevalue( 1,"请选择一个角色") + }else if( response.data.status===4){ + this.submitstatevalue( 1,"您的申请已提交,请等待项目管理员审批") + }else if( response.data.status===5){ + this.submitstatevalue( 1,"您已经申请加入该项目了,请耐心等待") + }else if( response.data.status===6){ + this.submitstatevalue( 1,"您已成功加入项目",response.data.project) + } + }) + } } -} // trialapplications =()=>{ // console.log("点击了") @@ -631,10 +634,10 @@ submittojoinclass=(value)=>{
    {/*{*/} {/* isRender&& isRender === true?*/} - + {/* :""*/} {/*}*/} @@ -692,15 +695,15 @@ submittojoinclass=(value)=>{
    - {/*
  • 教学案例
  • */} + {/*
  • 教学案例
  • */}
  • - 在线竞赛 - + 在线竞赛 +
  • -
  • 教学案例
  • -
  • 众包创新
  • +
  • 教学案例
  • +
  • 众包创新
  • 交流问答
  • { -