- {orders === "update_time" ? "时间" : orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序
+ {orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序
@@ -3035,6 +3092,7 @@ class Listofworksstudentone extends Component {
:
// 学生能查看别人的
+ {/*双层*/}
-
+
{/* {discussMessage.author.name} */}
{ discussMessage.author && {discussMessage.author} }
{discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交}
@@ -357,6 +357,15 @@ class ShixunhomeWorkItem extends Component{
:
{discussMessage.status_time}
}
+ {
+ discussMessage && discussMessage.upper_category_name &&
+ 22 }>
+ { {discussMessage.upper_category_name}}
+
+ }
+
+
+
{/* { discussMessage.replies_count != 0 && {discussMessage.replies_count} 回复 }
{ discussMessage.praise_num != 0 && {discussMessage.praise_num} 点赞 }
@@ -378,7 +387,7 @@ class ShixunhomeWorkItem extends Component{
`
}
- {this.props.isAdmin?this.stopPro(event)} className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"44px","display":"block"}}>
+ {this.props.isAdmin?
this.stopPro(event)} className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"46px","display":"block"}}>
实训详情
{this.props.isAdminOrCreator()?
this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue ml20 font-16"}>重命名:""}
{/*
设置*/}
diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
index bd90db42f..bee373bd9 100644
--- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
+++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
@@ -862,19 +862,19 @@ class Trainingjobsetting extends Component {
var exams = parseFloat(Proportion.toFixed(1));
var intk = srorelength*exams;
intkk=oushution - intk;
- console.log("奇数");
- console.log(srorelength);//3
- console.log(oushution);//79
- console.log(exams);//26.3
- console.log(intk);//78.9
- console.log(intkk);
+ // console.log("奇数");
+ // console.log(srorelength);//3
+ // console.log(oushution);//79
+ // console.log(exams);//26.3
+ // console.log(intk);//78.9
+ // console.log(intkk);
}else {
// 偶数
var examsy =parseFloat(Proportion.toFixed(1));
intkks=oushution - (examsy*srorelength);
- console.log("偶数");
- console.log(oushution);
- console.log((examsy*srorelength));
+ // console.log("偶数");
+ // console.log(oushution);
+ // console.log((examsy*srorelength));
}
var mact=0;
diff --git a/public/react/src/modules/courses/shixunHomework/style.css b/public/react/src/modules/courses/shixunHomework/style.css
index f2b0c39ed..c2affa32c 100644
--- a/public/react/src/modules/courses/shixunHomework/style.css
+++ b/public/react/src/modules/courses/shixunHomework/style.css
@@ -38,14 +38,14 @@
.TopicDetailTable .bottomBody li:last-child{border-bottom: none;}
.maxnamewidth100{
- max-width: 100px;
+ max-width: 145px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.maxnamewidth110{
- max-width: 110px;
+ max-width: 145px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
diff --git a/public/react/src/modules/help/AboutUs.js b/public/react/src/modules/help/AboutUs.js
new file mode 100644
index 000000000..06198418c
--- /dev/null
+++ b/public/react/src/modules/help/AboutUs.js
@@ -0,0 +1,54 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { Card } from "antd";
+import axios from 'axios';
+
+import { MarkdownToHtml } from 'educoder';
+
+class AboutUs extends React.Component {
+ constructor (props) {
+ super(props);
+
+ this.state = {
+ loading: true,
+ content: null
+ }
+ }
+
+ componentDidMount(){
+ window.document.title = "关于我们";
+ this.getContent();
+ }
+
+ getContent(){
+ axios.get("/helps/about.json").then((result) => {
+ if(result){
+ this.setState({
+ content: result.data.content,
+ loading: false
+ })
+ }
+ }).catch((error) => {
+ console.log(error);
+ this.setState({ loading: false });
+ })
+ }
+
+ render() {
+ let { loading, content } = this.state;
+
+ return (
+
+
+
+
+ { content && }
+
+
+
+
+ )
+ }
+}
+
+export default AboutUs;
\ No newline at end of file
diff --git a/public/react/src/modules/help/Agreement.js b/public/react/src/modules/help/Agreement.js
new file mode 100644
index 000000000..4e483b719
--- /dev/null
+++ b/public/react/src/modules/help/Agreement.js
@@ -0,0 +1,54 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { Card } from "antd";
+import axios from 'axios';
+
+import { MarkdownToHtml } from 'educoder';
+
+class Agreement extends React.Component {
+ constructor (props) {
+ super(props);
+
+ this.state = {
+ loading: true,
+ content: null
+ }
+ }
+
+ componentDidMount(){
+ window.document.title = "服务协议";
+ this.getContent();
+ }
+
+ getContent(){
+ axios.get("/helps/agreement.json").then((result) => {
+ if(result){
+ this.setState({
+ content: result.data.content,
+ loading: false
+ })
+ }
+ }).catch((error) => {
+ console.log(error);
+ this.setState({ loading: false });
+ })
+ }
+
+ render() {
+ let { loading, content } = this.state;
+
+ return (
+
+
+
+
+ { content && }
+
+
+
+
+ )
+ }
+}
+
+export default Agreement;
\ No newline at end of file
diff --git a/public/react/src/modules/help/ContactUs.css b/public/react/src/modules/help/ContactUs.css
new file mode 100644
index 000000000..e516196e6
--- /dev/null
+++ b/public/react/src/modules/help/ContactUs.css
@@ -0,0 +1,24 @@
+.contact-us-container {
+
+}
+.contact-us-container .contact-item {
+ padding: 20px 15px;
+ border-bottom: 1px solid #EEEEEE;
+}
+.contact-us-container .contact-item:first-child {
+ padding-top: 0;
+}
+.contact-us-container .contact-item:last-child {
+ border-bottom: unset;
+}
+
+.contact-us-container .contact-item-label {
+ font-size: 16px;
+ padding-bottom: 10px;
+}
+.contact-us-container .contact-item-content {
+ margin-left: 10px;
+}
+.contact-us-container .contact-item-content .ant-row {
+ margin-top: 10px;
+}
\ No newline at end of file
diff --git a/public/react/src/modules/help/ContactUs.js b/public/react/src/modules/help/ContactUs.js
new file mode 100644
index 000000000..04e3404fe
--- /dev/null
+++ b/public/react/src/modules/help/ContactUs.js
@@ -0,0 +1,89 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { Card, Row, Col } from "antd";
+import axios from 'axios';
+
+import './ContactUs.css';
+
+class ContactUs extends React.Component {
+ constructor (props) {
+ super(props);
+
+ this.state = {
+ loading: true,
+ contacts: null,
+ address: null
+ }
+ }
+
+ componentDidMount(){
+ window.document.title = "联系我们";
+ this.getData();
+ }
+
+ getData(){
+ axios.get("/helps/contact.json").then((result) => {
+ if(result){
+ this.setState({
+ contacts: result.data.contacts,
+ address: result.data.address,
+ loading: false
+ })
+ }
+ }).catch((error) => {
+ console.log(error);
+ this.setState({ loading: false });
+ })
+ }
+
+ render() {
+ let { loading, contacts, address } = this.state;
+
+ return (
+
+
+
+
+ {
+ contacts && contacts.map((item, _key) => {
+ return (
+
+
{ item.type }
+
+
+ { item.name }
+
+
+ QQ:
+ { item.qq }
+
+
+ Email:
+ { item.mail }
+
+
+
+ )
+ })
+ }
+ {
+ address && (
+
+
公司地址
+
+
+ { address }
+
+
+
+ )
+ }
+
+
+
+
+ )
+ }
+}
+
+export default ContactUs;
\ No newline at end of file
diff --git a/public/react/src/modules/help/Cooperatives.css b/public/react/src/modules/help/Cooperatives.css
new file mode 100644
index 000000000..1ab232a26
--- /dev/null
+++ b/public/react/src/modules/help/Cooperatives.css
@@ -0,0 +1,17 @@
+.cooperatives-container {
+
+}
+
+.cooperatives-container .cooperative-item-title {
+ margin-bottom: 20px;
+ font-size: 16px;
+}
+.cooperatives-container .cooperative-item-list-item {
+ padding: 10px 0;
+ height: 60px;
+ border: 1px solid #eee;
+}
+.cooperatives-container .cooperative-item-list-item img {
+ width: 100%;
+ height: 100%;
+}
\ No newline at end of file
diff --git a/public/react/src/modules/help/Cooperatives.js b/public/react/src/modules/help/Cooperatives.js
new file mode 100644
index 000000000..b64657488
--- /dev/null
+++ b/public/react/src/modules/help/Cooperatives.js
@@ -0,0 +1,82 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { List, Card } from "antd";
+import axios from 'axios';
+import { getImageUrl } from 'educoder';
+
+import './Cooperatives.css';
+
+class Cooperatives extends React.Component {
+ constructor (props) {
+ super(props);
+
+ this.state = {
+ loading: true,
+ data: [
+ { name: "产学联盟" },
+ { name: "知名企业" },
+ { name: "各类院校" }
+ ]
+ }
+ }
+
+ componentDidMount(){
+ window.document.title = "合作伙伴";
+ this.getCooperatives();
+ }
+
+ getCooperatives(){
+ axios.get("/helps/cooperatives.json").then((result) => {
+ if(result){
+ this.setState({
+ data: result.data.data,
+ loading: false
+ })
+ }
+ }).catch((error) => {
+ console.log(error);
+ this.setState({ loading: false });
+ })
+ }
+
+ render() {
+ let { loading, data } = this.state;
+
+ return (
+
+
+
+
+ {
+ data && data.length > 0 && data.map((item, _key) => {
+ return (
+
+ )
+ })
+ }
+
+
+
+
+ )
+ }
+}
+
+export default Cooperatives;
\ No newline at end of file
diff --git a/public/react/src/modules/help/Feedback.css b/public/react/src/modules/help/Feedback.css
new file mode 100644
index 000000000..081370254
--- /dev/null
+++ b/public/react/src/modules/help/Feedback.css
@@ -0,0 +1,7 @@
+.feedback-container {
+
+}
+.feedback-container .feedback-message {
+ line-height: 26px;
+ color: #999999;
+}
\ No newline at end of file
diff --git a/public/react/src/modules/help/Feedback.js b/public/react/src/modules/help/Feedback.js
new file mode 100644
index 000000000..c7f13f809
--- /dev/null
+++ b/public/react/src/modules/help/Feedback.js
@@ -0,0 +1,51 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { Link } from 'react-router-dom';
+import { Card, Form } from "antd";
+
+import "./Feedback.css";
+
+import FeedbackForm from './FeedbackForm';
+const NewFeedbackForm = Form.create({ name: 'feedback_form' })(FeedbackForm);
+
+class Feedback extends React.Component {
+ constructor (props) {
+ super(props);
+ }
+
+ componentDidMount() {
+ window.document.title = "意见反馈";
+ }
+
+ componentDidUpdate(prevProps) {
+ if (prevProps.current_user !== this.props.current_user) {
+ if(!this.props.checkIfLogin()) {
+ this.props.showLoginDialog();
+ }
+ }
+ }
+
+ render() {
+ return (
+
+
+
+
+
+ 想对我们的平台提供功能建议?
+ 发现网页中的问题或bug想告诉我们?
+ 期望与我们展开合作?
+ 在这里把你想说的一切告诉我们吧?
+
+
* 看看帮助中心是否有你想要的答案
+
+
+
+
+
+
+ )
+ }
+}
+
+export default Feedback;
\ No newline at end of file
diff --git a/public/react/src/modules/help/FeedbackForm.js b/public/react/src/modules/help/FeedbackForm.js
new file mode 100644
index 000000000..ae2c4e095
--- /dev/null
+++ b/public/react/src/modules/help/FeedbackForm.js
@@ -0,0 +1,87 @@
+import React from 'react';
+import { Form, Input, Radio, Button } from "antd";
+import axios from 'axios';
+
+const { TextArea } = Input;
+
+class FeedbackForm extends React.Component {
+ constructor (props) {
+ super(props);
+ }
+
+ handleSubmit = e => {
+ e.preventDefault();
+
+ this.props.form.validateFields((err, fieldsValue) => {
+ if(err){ return }
+
+ axios.post("/helps/feedback.json", fieldsValue)
+ .then((result) => {
+ if (result.status === 200 && result.data.status === 0) {
+ this.props.history.push(`/messages/${this.props.current_user.login}/message_detail?target_ids=1`);
+ }
+ }).catch((error) => {
+ console.log(error)
+ })
+ })
+ }
+
+ render() {
+ const { getFieldDecorator } = this.props.form;
+
+ return (
+
+
+ {getFieldDecorator('question_kind', {
+ initialValue: "登录注册",
+ rules: [
+ {
+ required: true,
+ message: '不能为空',
+ },
+ ],
+ })(
+
+ 登录注册
+ 信息认证
+ 实训编程
+ 实训课程
+ 课堂
+ 其它
+
+ )}
+
+
+
+ {getFieldDecorator('url', {
+ rules: [
+ {
+ required: true,
+ message: '不能为空',
+ },
+ ],
+ })()}
+
+
+
+ {getFieldDecorator('description', {
+ rules: [
+ {
+ required: true,
+ message: '不能为空',
+ },
+ ],
+ })()}
+
+
+
+
+
+
+
+ )
+ }
+}
+
+export default FeedbackForm;
\ No newline at end of file
diff --git a/public/react/src/modules/help/Help.css b/public/react/src/modules/help/Help.css
new file mode 100644
index 000000000..db2e77307
--- /dev/null
+++ b/public/react/src/modules/help/Help.css
@@ -0,0 +1,9 @@
+.help-container {
+ margin-top: 30px;
+}
+.help-container .help-menu {
+ text-align: center;
+}
+.help-container .help-content {
+ margin-bottom: 40px;
+}
\ No newline at end of file
diff --git a/public/react/src/modules/help/Help.js b/public/react/src/modules/help/Help.js
new file mode 100644
index 000000000..f04079bcc
--- /dev/null
+++ b/public/react/src/modules/help/Help.js
@@ -0,0 +1,77 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { Switch, Route, Link } from 'react-router-dom';
+import { Affix, Menu, Row, Col } from "antd";
+import { SnackbarHOC } from 'educoder';
+
+import './Help.css';
+
+import CustomLoadable from "../../CustomLoadable";
+import {TPMIndexHOC} from "../tpm/TPMIndexHOC";
+
+const AboutUs = CustomLoadable(() => import('./AboutUs'));
+const ContactUs = CustomLoadable(() => import('./ContactUs'));
+const Cooperatives = CustomLoadable(() => import('./Cooperatives'));
+const Agreement = CustomLoadable(() => import('./Agreement'));
+const HelpCenter = CustomLoadable(() => import('./HelpCenter'));
+const Feedback = CustomLoadable(() => import('./Feedback'));
+
+class Help extends React.Component {
+ constructor (props) {
+ super(props);
+
+ this.state = {
+ type: props.match.params.type || 'about_us'
+ }
+ }
+
+ componentDidUpdate(prevProps) {
+ console.log('update', prevProps, this.props);
+ if(prevProps.match.params.type !== this.props.match.params.type){
+ this.setState({ type: this.props.match.params.type });
+ }
+ }
+
+ render() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ () }>
+
+
+
+
+
+
+
+ )
+ }
+}
+
+export default SnackbarHOC() (TPMIndexHOC ( Help ));
\ No newline at end of file
diff --git a/public/react/src/modules/help/HelpCenter.js b/public/react/src/modules/help/HelpCenter.js
new file mode 100644
index 000000000..077f4b90e
--- /dev/null
+++ b/public/react/src/modules/help/HelpCenter.js
@@ -0,0 +1,54 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { Card } from "antd";
+import axios from 'axios';
+
+import { MarkdownToHtml } from 'educoder';
+
+class HelpCenter extends React.Component {
+ constructor (props) {
+ super(props);
+
+ this.state = {
+ loading: true,
+ content: null
+ }
+ }
+
+ componentDidMount(){
+ window.document.title = "帮助中心";
+ this.getContent();
+ }
+
+ getContent(){
+ axios.get("/helps/help_center.json").then((result) => {
+ if(result){
+ this.setState({
+ content: result.data.content,
+ loading: false
+ })
+ }
+ }).catch((error) => {
+ console.log(error);
+ this.setState({ loading: false });
+ })
+ }
+
+ render() {
+ let { loading, content } = this.state;
+
+ return (
+
+
+
+
+ { content && }
+
+
+
+
+ )
+ }
+}
+
+export default HelpCenter;
\ No newline at end of file
diff --git a/public/react/src/modules/modals/SendTopics.js b/public/react/src/modules/modals/SendTopics.js
new file mode 100644
index 000000000..265bcc7d7
--- /dev/null
+++ b/public/react/src/modules/modals/SendTopics.js
@@ -0,0 +1,177 @@
+import React,{ Component } from "react";
+import { Modal,Radio,Input,Tooltip,Checkbox,Select, Row,Col ,Spin} from "antd";
+import axios from 'axios';
+const { Search } = Input;
+class SendTopics extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ courses:[],
+ search:null,
+ Radiolist:undefined,
+ showcheck:false,
+ smallisSpin:false
+ }
+ }
+
+
+
+
+ componentDidMount(){
+ let{search}=this.state;
+ this.onupdatalist(search)
+ }
+
+ onupdatalist=(search)=>{
+ let url="/question_banks/my_courses.json";
+ axios.get(url,{params:{
+ search
+ }
+ }).then((result)=>{
+ this.setState({
+ courses:result.data.courses
+ })
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
+
+ onSearchChange=(e)=>{
+ this.setState({
+ search:e.target.value
+ })
+ // this.onupdatalist(e.target.value)
+ }
+
+ onSearch=(search)=>{
+ this.onupdatalist(search)
+ }
+
+
+ onChange=(e)=>{
+ this.setState({
+ Radiolist:e.target.value
+ })
+ }
+
+ submitInfo=()=>{
+ this.setState({
+ smallisSpin:true
+ })
+ let{Radiolist}=this.state;
+ let url=`/question_banks/send_to_course.json`;
+ let object_id=this.props.checkBoxValues;
+ let object_type=this.props.category;
+ if(Radiolist===undefined){
+ this.setState({
+ showcheck:true,
+ smallisSpin:false
+ })
+ }else{
+ axios.post(url,{
+ object_id: object_id,
+ object_type:object_type,
+ course_id:Radiolist
+ }
+ ).then((result)=>{
+ this.setState({
+ smallisSpin:false
+ })
+ if(result.data.status===0){
+ this.props.showNotification(result.data.message)
+ this.props.topicscancelmodel()
+ this.props.updataslist()
+ }else{
+ this.props.showNotification(result.data.message)
+ }
+ }).catch((error)=>{
+ console.log(error)
+ this.setState({
+ smallisSpin:false
+ })
+ })
+ }
+
+ }
+ render(){
+ let{courses,Radiolist,showcheck,smallisSpin}= this.state;
+
+ const radioStyle = {
+ display: 'block',
+ height: '30px',
+ lineHeight: '30px',
+ };
+
+ return(
+
+
+
+
+
+
+
+ 温馨提示:选择的题将会发送到指定课堂
+
+
+
+
+
+
+ {
+ courses && courses.map((item,key)=>{
+ return(
+
+
+ {item.course_name}
+
+
+ )
+ })
+ }
+
+
+
+ {showcheck===true?
请先选择课堂
:""}
+
+
+
+
+ )
+ }
+
+}
+export default SendTopics;
\ No newline at end of file
diff --git a/public/react/src/modules/moop_cases/CaseNew.js b/public/react/src/modules/moop_cases/CaseNew.js
index ae9ef4f6f..2fbe993bc 100644
--- a/public/react/src/modules/moop_cases/CaseNew.js
+++ b/public/react/src/modules/moop_cases/CaseNew.js
@@ -49,7 +49,7 @@ class CaseNew extends Component{
onAttachmentRemove = (file, stateName) => {
if(!file.percent || file.percent == 100){
this.props.confirm({
- content: '是否确认删除?',
+ content: '是否确认删除?',
onOk: () => {
this.deleteAttachment(file, stateName)
},
@@ -244,7 +244,10 @@ class CaseNew extends Component{
// 选择标签
changeType=(type)=>{
+ // console.log(this.state.casesTags);
+ // debugger
let tags = [];
+
if(this.state.casesTags.indexOf(type) > -1){
tags = this.state.casesTags.filter(item => item != type);
}else{
diff --git a/public/react/src/modules/page/MainContent.js b/public/react/src/modules/page/MainContent.js
index d8623d84b..21524e627 100644
--- a/public/react/src/modules/page/MainContent.js
+++ b/public/react/src/modules/page/MainContent.js
@@ -100,6 +100,9 @@ class MainContent extends Component {
vnc_url={vnc_url}
{...this.props}
>
+
:
diff --git a/public/react/src/modules/page/main/ActionView.js b/public/react/src/modules/page/main/ActionView.js
index 4933ba0ac..5504b5e7e 100644
--- a/public/react/src/modules/page/main/ActionView.js
+++ b/public/react/src/modules/page/main/ActionView.js
@@ -1,204 +1,206 @@
-import React, { Component } from 'react';
-import { Link } from 'react-router-dom'
-
-import { withStyles } from 'material-ui/styles';
-import Button from 'material-ui/Button';
-
-import Tooltip from 'material-ui/Tooltip';
-
-import './ActionView.css'
-
-/*
-
- color: #1B4061 !important;
- background-color: transparent;
- border: 1px solid #1B4061 !important;
- */
-const styles = theme => ({
- button: {
- margin: theme.spacing.unit,
- border: '1px solid #1B4061',
- color: '#1B4061',
- height: '30px',
- padding: '0 16px',
- '&:hover': {
- color: '#4CACFF',
- border: '1px solid #4CACFF'
- }
- },
- hoverButton: {
- margin: theme.spacing.unit,
- height: '30px',
- padding: '0 16px',
-
- color: '#4CACFF',
- border: '1px solid #4CACFF'
- },
- buttonText: {
- color: '#1B4061 !important',
- '&:hover': {
- color: '#1B4061',
- }
- }
-});
-
-class ActionView extends Component {
-
- constructor(props) {
- super(props)
-
- }
-
- componentDidMount() {
- // request
- window._tpiWidthResize = () => {
- const _w = window.$('#actionView').width();
- // if (_w < 446) {
- // window.$('#time-consuming').hide()
- // // window.$('#time-consuming').hide()
- // } else if (_w < 746) {
- // // 文字放出来之前是 580
- // window.$('#time-consuming').show()
- // window.$('.time_limit').hide()
- // } else {
- // window.$('#time-consuming').show()
- // window.$('.time_limit').show()
- // }
- }
- }
-
- showWebDisplay(challenge) {
- window.open(challenge.webDisplayUrl, '_blank');
- }
- /*耗时:0 天 3 小时 11 分钟 57 秒 */
- render() {
- const { onRunCodeTest, onShowPrevStage, onShowNextStage, gameBuilding
- , game, classes, st, shixun, record, challenge, time_limit, real_time_limit } = this.props;
- return (
-
-
-
- {!!time_limit &&
- {`本关最大执行时间:${real_time_limit}秒`}
- {!gameBuilding && record && }
- }
- {!gameBuilding && record ?
- //
- 本次评测耗时(编译、运行总时间):{ record } 秒
-
- : ""}
-
-
- {/*将第一个按钮改为visibility方式隐藏,不然加载时测评按钮会出现没有垂直居中的情况*/}
-
-
-
-
- {
- !gameBuilding &&
- (game && !!game.prev_game) ?
-
-
-
- : ''}
-
- {/*未发布的都能跳转*/}
- { !gameBuilding &&
- ((game && (game.status === 2 || shixun.status < 2) || shixun && shixun.task_pass ) && !!game.next_game) ?
-
-
-
- : ''}
-
-
-
-
-
- );
- /*
- 离开
-
- 下一关
-
- onclick="training_task_submmit();"
-
-
- {game && !!game.prev_game ?
-
- 上一关
-
- : ''}
-
- {game && !!game.next_game ?
-
- 下一关
-
- : ''}
- */
- }
-}
-
-export default withStyles(styles)( ActionView );
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom'
+
+import { withStyles } from 'material-ui/styles';
+import Button from 'material-ui/Button';
+
+import Tooltip from 'material-ui/Tooltip';
+
+import './ActionView.css'
+
+/*
+
+ color: #1B4061 !important;
+ background-color: transparent;
+ border: 1px solid #1B4061 !important;
+ */
+const styles = theme => ({
+ button: {
+ margin: theme.spacing.unit,
+ border: '1px solid #1B4061',
+ color: '#1B4061',
+ height: '30px',
+ padding: '0 16px',
+ '&:hover': {
+ color: '#4CACFF',
+ border: '1px solid #4CACFF'
+ }
+ },
+ hoverButton: {
+ margin: theme.spacing.unit,
+ height: '30px',
+ padding: '0 16px',
+
+ color: '#4CACFF',
+ border: '1px solid #4CACFF'
+ },
+ buttonText: {
+ color: '#1B4061 !important',
+ '&:hover': {
+ color: '#1B4061',
+ }
+ }
+});
+
+class ActionView extends Component {
+
+ constructor(props) {
+ super(props)
+
+ }
+
+ componentDidMount() {
+ // request
+ window._tpiWidthResize = () => {
+ const _w = window.$('#actionView').width();
+ // if (_w < 446) {
+ // window.$('#time-consuming').hide()
+ // // window.$('#time-consuming').hide()
+ // } else if (_w < 746) {
+ // // 文字放出来之前是 580
+ // window.$('#time-consuming').show()
+ // window.$('.time_limit').hide()
+ // } else {
+ // window.$('#time-consuming').show()
+ // window.$('.time_limit').show()
+ // }
+ }
+ }
+
+ showWebDisplay(challenge) {
+ window.open(challenge.webDisplayUrl, '_blank');
+ }
+ /*耗时:0 天 3 小时 11 分钟 57 秒 */
+ render() {
+ const { onRunCodeTest, onShowPrevStage, onShowNextStage, gameBuilding
+ , game, classes, st, shixun, record, challenge, time_limit, real_time_limit } = this.props;
+
+ console.log(shixun)
+ return (
+
+
+
+ {!!time_limit &&
+ {`本关最大执行时间:${real_time_limit}秒`}
+ {!gameBuilding && record && }
+ }
+ {!gameBuilding && record ?
+ //
+ 本次评测耗时(编译、运行总时间):{ record } 秒
+
+ : ""}
+
+
+ {/*将第一个按钮改为visibility方式隐藏,不然加载时测评按钮会出现没有垂直居中的情况*/}
+
+
+
+
+ {
+ !gameBuilding &&
+ (game && !!game.prev_game) ?
+
+
+
+ : ''}
+
+ {/*未发布的都能跳转*/}
+ { !gameBuilding &&
+ ((game && (game.status === 2 || shixun.status < 2) || shixun && shixun.task_pass ) && !!game.next_game) ?
+
+
+
+ : ''}
+
+
+
+ {(shixun&&!shixun.vnc || shixun&&shixun.vnc_evaluate) &&
}
+
+ );
+ /*
+ 离开
+
+ 下一关
+
+ onclick="training_task_submmit();"
+
+
+ {game && !!game.prev_game ?
+
+ 上一关
+
+ : ''}
+
+ {game && !!game.next_game ?
+
+ 下一关
+
+ : ''}
+ */
+ }
+}
+
+export default withStyles(styles)( ActionView );
diff --git a/public/react/src/modules/page/main/CodeRepositoryViewContainer.js b/public/react/src/modules/page/main/CodeRepositoryViewContainer.js
index 0a5be59e0..5d6be306f 100644
--- a/public/react/src/modules/page/main/CodeRepositoryViewContainer.js
+++ b/public/react/src/modules/page/main/CodeRepositoryViewContainer.js
@@ -1,309 +1,312 @@
-
-import React, { Component } from 'react';
-
-import CodeRepositoryView from './CodeRepositoryView'
-
-import axios from 'axios'
-
-import './CodeRepositoryView.css'
-
-// 自己处理path,加上父节点的path, 这里是处理树节点了,所以是set key
-function addPrePath(treeData, parentNodePath) {
- return treeData.map(item => {
- return {
- ...item,
- key: `${parentNodePath}/${item.name}`
- }
- })
-}
-function getNewTreeData(treeData, curKey, child, level) {
- const loop = (data) => {
- data.forEach((item) => {
- // 这里不能用indexOf 同一级可能出现test目录和test.py文件
- if (item.key == curKey) {
- child = addPrePath(child, curKey);
- item.children = child;
- } else {
- if (item.children) {
- loop(item.children);
- }
- }
- });
- };
- loop(treeData);
-}
-
-function fileData2TreeData(repoFilesData) {
- const fileTreeData = [];
- repoFilesData.forEach((item) => {
- if (item.kind === 'file') {
- fileTreeData.push({
- key: item.path,
- name: item.name,
- isLeaf: true
- })
- } else {
- fileTreeData.push({
- key: item.path,
- name: item.name,
- // isLeaf: false
- })
- }
- })
- return fileTreeData;
-}
-
-class CodeRepositoryViewContainer extends Component {
-
- constructor(props) {
- super(props)
-
- this.showFilesDrawer = this.showFilesDrawer.bind(this)
- this.onRepositoryViewExpand = this.onRepositoryViewExpand.bind(this)
-
- this.state = {
- drawerOpen: false,
- loadingFirstRepoFiles: false,
- fileTreeData: "",
- fileTreeSelectedKeys: [],
- codeRepositoryViewExpanded: false,
- tabIndex: 0,
-
- settingDrawerOpen: false
- }
- }
- showSettingDrawer = (open) => {
- this.setState({settingDrawerOpen: open})
- }
- tabIndexChange = (index) => {
- this.setState({tabIndex: index});
- }
- onRepositoryViewExpand() {
- window.repository_extend_and_zoom();
- this.setState({
- evaluateViewExpanded: !this.state.evaluateViewExpanded
- }, () => {
- setTimeout(()=>{
- window.__tpiOnResize()
- }, 300)
- })
- }
-
- showFilesDrawer(open) {
- if (this.props.loading === true) {
- return;
- }
- if (!this.state.fileTreeData) {
- this.fetchRepoFiles();
- }
-
- this.setState({
- drawerOpen: open,
- })
- }
- loadRepoFiles = () => {
- if (!this.state.fileTreeData) {
- this.fetchRepoFiles();
- }
- }
-
- componentWillReceiveProps(newProps, oldProps) {
-
- }
- componentDidMount() {
-
- }
-
- componentDidUpdate(prevProps, prevState, snapshot) {
- const { game, challenge } = this.props
- if (this.props.game && (!prevProps.game || prevProps.game.identifier !== this.props.game.identifier) ) {
- this.setState({
- fileTreeSelectedKeys: [ challenge.multiPath ? challenge.path[0] : challenge.path ]
- })
- // 初始化
- } else if (this.state.fileTreeSelectedKeys.length === 0 && challenge && challenge.path) {
- this.setState({
- fileTreeSelectedKeys: [ challenge.multiPath ? challenge.path[0] : challenge.path ]
- })
- } else if (challenge && prevProps && prevProps.challenge
- && challenge.pathIndex != prevProps.challenge.pathIndex
- && challenge.pathIndex !== -1) {
- this.setState({
- fileTreeSelectedKeys: [ challenge.multiPath ? challenge.path[challenge.pathIndex] : challenge.path ]
- })
- }
- }
-
- handleDialogClose() {
- this.setState({
- dialogOpen: false
- })
- }
- onLoadData = (treeNode) => {
- if (treeNode.props.children && treeNode.props.children.length) {
- return new Promise((resolve) => {
- resolve();
- });
- }
- return new Promise((resolve, reject) => {
- this.fetchRepoFiles(treeNode, resolve, reject)
- });
- }
- map2OldData = (treeData) => {
- if (!treeData || treeData.length === 0) return treeData;
- treeData = treeData.map(item => {
- return {
- kind: item.type == "blob" ? "file" : "dir", // blob->file tree->dir
- path: item.name,
- name: item.name
- }
- })
- return treeData;
- }
-
- fetchRepoFiles(treeNode, resolve, reject) {
- // http://localhost:3000/api/v1/games/829al3mst4fy/entries?path=src/step1&rev=master
- if (!this.props.challenge || !this.props.game) {
- return;
- }
- // var ar = this.props.challenge.path.split('/');
- // ar.length = ar.length - 2;
- // var _path = ar.join('/');
- var _path = treeNode ? treeNode.props.eventKey : '' ;
- if (_path.charAt(0) === '/') {
- _path = _path.substring(1)
- }
- // var url = `/api/v1/games/${this.props.game.identifier}/entries?path=${_path}&rev=master&gpid=${this.props.myshixun.gpid}`
- let url = `/myshixuns/${this.props.myshixun.identifier}/repository.json`
-
-
- if (!this.state.fileTreeData || this.state.fileTreeData.length === 0) {
- this.setState({
- loadingFirstRepoFiles: true,
- })
- }
- var that = this;
- axios.post(url, {
- path: _path
- // withCredentials: true,
- })
- .then((response) => {
- const repoFilesData = this.map2OldData(response.data.trees)
- if (!this.state.fileTreeData || this.state.fileTreeData.length === 0) { // 还没树节点,没加载过
-
- const fileTreeData = fileData2TreeData(repoFilesData)
- this.setState({
- fileTreeData,
- loadingFirstRepoFiles: false,
- });
- } else {
- var _treeNode = treeNode;
- var _eventKey = _treeNode.props.eventKey;
-
- const fileTreeData = that.state.fileTreeData;
- // 新的数组放置到treenode下
-
- const tempFileTreeData = fileData2TreeData(repoFilesData)
-
- getNewTreeData(fileTreeData, _eventKey, tempFileTreeData, 2);
- this.setState({
- fileTreeData,
- })
- }
-
- resolve && resolve();
-
- })
- .catch(function (error) {
- console.log(error);
- reject && reject();
- });
- }
- onTreeSelect = (selectedKeys, info) => {
- const isLeaf = info.node.props.isLeaf;
- if (isLeaf) { // 叶子节点
- selectedKeys.length && this.setState({
- fileTreeSelectedKeys: selectedKeys
- })
- const { fetchRepositoryCode, onPathChange, showSnackbar, challenge } = this.props;
-
- const nodePath = info.node.props.eventKey;
- // 设置pathIndex为-1,那么代码文件下拉可以切回可编辑的文件
- if (!challenge.multiPath) { // 单path任务 多path任务 path是数组
- if (challenge.path.trim() == nodePath.trim()) {
- if (challenge.pathIndex === 0) {
- showSnackbar(`当前编辑文件已经是${nodePath}`)
- } else {
- onPathChange(0)
- }
- return;
- } else {
- onPathChange(-1)
- }
- } else {
- let isCurrentFile = false;
- let cur_index = -1;
- if (challenge.path && challenge.path.forEach) {
- challenge.path.forEach((item, index) => {
- if (nodePath == item) {
- isCurrentFile = true;
- cur_index = index;
- }
- })
- }
- if (isCurrentFile) {
- onPathChange(cur_index)
- showSnackbar(`当前编辑文件已经是${nodePath}`)
- } else {
- onPathChange(-1)
- }
- }
- if (nodePath) {
- const filetype = nodePath.split('.').pop().toLowerCase();
- if (filetype == 'jpg' || filetype == 'png' || filetype == 'gif' || filetype == 'jpeg'
- || filetype == 'jar'
- || filetype == 'doc' || filetype == 'pdf' || filetype == 'xsl' || filetype == 'ppt') {
- showSnackbar(`不支持加载${filetype}类型的文件。`)
- return;
- }
- fetchRepositoryCode(null, nodePath, 1);
- } else {
- console.error('no eventKey:', info.node)
- }
- }
- }
-// /shixuns/mnf6b7z3/shixun_discuss?challenge_id=88
- render() {
-
- return (
-
- {this.props.isOnlyContainer == true ?
- React.Children.map(this.props.children, child => {
- if(!child) {
- return ''
- }
- return React.cloneElement(child, Object.assign({...this.state}, {
- loadRepoFiles: this.loadRepoFiles,
- onTreeSelect: this.onTreeSelect,
- onLoadData: this.onLoadData,
- }))
- })
-
- :
-
- }
-
- );
- }
-}
-
-export default CodeRepositoryViewContainer;
+
+import React, { Component } from 'react';
+
+import CodeRepositoryView from './CodeRepositoryView'
+
+import axios from 'axios'
+
+import './CodeRepositoryView.css'
+
+// 自己处理path,加上父节点的path, 这里是处理树节点了,所以是set key
+function addPrePath(treeData, parentNodePath) {
+ return treeData.map(item => {
+ return {
+ ...item,
+ key: `${parentNodePath}/${item.name}`
+ }
+ })
+}
+function getNewTreeData(treeData, curKey, child, level) {
+ const loop = (data) => {
+ data.forEach((item) => {
+ // 这里不能用indexOf 同一级可能出现test目录和test.py文件
+ if (item.key == curKey) {
+ child = addPrePath(child, curKey);
+ item.children = child;
+ } else {
+ if (item.children) {
+ loop(item.children);
+ }
+ }
+ });
+ };
+ loop(treeData);
+}
+
+function fileData2TreeData(repoFilesData) {
+ if(repoFilesData!=null){
+ const fileTreeData = [];
+ repoFilesData.forEach((item) => {
+ if (item.kind === 'file') {
+ fileTreeData.push({
+ key: item.path,
+ name: item.name,
+ isLeaf: true
+ })
+ } else {
+ fileTreeData.push({
+ key: item.path,
+ name: item.name,
+ // isLeaf: false
+ })
+ }
+ })
+ return fileTreeData;
+ }
+
+}
+
+class CodeRepositoryViewContainer extends Component {
+
+ constructor(props) {
+ super(props)
+
+ this.showFilesDrawer = this.showFilesDrawer.bind(this)
+ this.onRepositoryViewExpand = this.onRepositoryViewExpand.bind(this)
+
+ this.state = {
+ drawerOpen: false,
+ loadingFirstRepoFiles: false,
+ fileTreeData: "",
+ fileTreeSelectedKeys: [],
+ codeRepositoryViewExpanded: false,
+ tabIndex: 0,
+
+ settingDrawerOpen: false
+ }
+ }
+ showSettingDrawer = (open) => {
+ this.setState({settingDrawerOpen: open})
+ }
+ tabIndexChange = (index) => {
+ this.setState({tabIndex: index});
+ }
+ onRepositoryViewExpand() {
+ window.repository_extend_and_zoom();
+ this.setState({
+ evaluateViewExpanded: !this.state.evaluateViewExpanded
+ }, () => {
+ setTimeout(()=>{
+ window.__tpiOnResize()
+ }, 300)
+ })
+ }
+
+ showFilesDrawer(open) {
+ if (this.props.loading === true) {
+ return;
+ }
+ if (!this.state.fileTreeData) {
+ this.fetchRepoFiles();
+ }
+
+ this.setState({
+ drawerOpen: open,
+ })
+ }
+ loadRepoFiles = () => {
+ if (!this.state.fileTreeData) {
+ this.fetchRepoFiles();
+ }
+ }
+
+ componentWillReceiveProps(newProps, oldProps) {
+
+ }
+ componentDidMount() {
+
+ }
+
+ componentDidUpdate(prevProps, prevState, snapshot) {
+ const { game, challenge } = this.props
+ if (this.props.game && (!prevProps.game || prevProps.game.identifier !== this.props.game.identifier) ) {
+ this.setState({
+ fileTreeSelectedKeys: [ challenge.multiPath ? challenge.path[0] : challenge.path ]
+ })
+ // 初始化
+ } else if (this.state.fileTreeSelectedKeys.length === 0 && challenge && challenge.path) {
+ this.setState({
+ fileTreeSelectedKeys: [ challenge.multiPath ? challenge.path[0] : challenge.path ]
+ })
+ } else if (challenge && prevProps && prevProps.challenge
+ && challenge.pathIndex != prevProps.challenge.pathIndex
+ && challenge.pathIndex !== -1) {
+ this.setState({
+ fileTreeSelectedKeys: [ challenge.multiPath ? challenge.path[challenge.pathIndex] : challenge.path ]
+ })
+ }
+ }
+
+ handleDialogClose() {
+ this.setState({
+ dialogOpen: false
+ })
+ }
+ onLoadData = (treeNode) => {
+ if (treeNode.props.children && treeNode.props.children.length) {
+ return new Promise((resolve) => {
+ resolve();
+ });
+ }
+ return new Promise((resolve, reject) => {
+ this.fetchRepoFiles(treeNode, resolve, reject)
+ });
+ }
+ map2OldData = (treeData) => {
+ if (!treeData || treeData.length === 0) return treeData;
+ treeData = treeData.map(item => {
+ return {
+ kind: item.type == "blob" ? "file" : "dir", // blob->file tree->dir
+ path: item.name,
+ name: item.name
+ }
+ })
+ return treeData;
+ }
+
+ fetchRepoFiles(treeNode, resolve, reject) {
+ // http://localhost:3000/api/v1/games/829al3mst4fy/entries?path=src/step1&rev=master
+ if (!this.props.challenge || !this.props.game) {
+ return;
+ }
+ // var ar = this.props.challenge.path.split('/');
+ // ar.length = ar.length - 2;
+ // var _path = ar.join('/');
+ var _path = treeNode ? treeNode.props.eventKey : '' ;
+ if (_path.charAt(0) === '/') {
+ _path = _path.substring(1)
+ }
+ // var url = `/api/v1/games/${this.props.game.identifier}/entries?path=${_path}&rev=master&gpid=${this.props.myshixun.gpid}`
+ let url = `/myshixuns/${this.props.myshixun.identifier}/repository.json`
+
+
+ if (!this.state.fileTreeData || this.state.fileTreeData.length === 0) {
+ this.setState({
+ loadingFirstRepoFiles: true,
+ })
+ }
+ var that = this;
+ axios.post(url, {
+ path: _path
+ // withCredentials: true,
+ })
+ .then((response) => {
+ const repoFilesData = this.map2OldData(response.data.trees)
+ if (!this.state.fileTreeData || this.state.fileTreeData.length === 0) { // 还没树节点,没加载过
+
+ const fileTreeData = fileData2TreeData(repoFilesData)
+ this.setState({
+ fileTreeData,
+ loadingFirstRepoFiles: false,
+ });
+ } else {
+ var _treeNode = treeNode;
+ var _eventKey = _treeNode.props.eventKey;
+
+ const fileTreeData = that.state.fileTreeData;
+ // 新的数组放置到treenode下
+
+ const tempFileTreeData = fileData2TreeData(repoFilesData)
+
+ getNewTreeData(fileTreeData, _eventKey, tempFileTreeData, 2);
+ this.setState({
+ fileTreeData,
+ })
+ }
+
+ resolve && resolve();
+
+ })
+ .catch(function (error) {
+ console.log(error);
+ reject && reject();
+ });
+ }
+ onTreeSelect = (selectedKeys, info) => {
+ const isLeaf = info.node.props.isLeaf;
+ if (isLeaf) { // 叶子节点
+ selectedKeys.length && this.setState({
+ fileTreeSelectedKeys: selectedKeys
+ })
+ const { fetchRepositoryCode, onPathChange, showSnackbar, challenge } = this.props;
+
+ const nodePath = info.node.props.eventKey;
+ // 设置pathIndex为-1,那么代码文件下拉可以切回可编辑的文件
+ if (!challenge.multiPath) { // 单path任务 多path任务 path是数组
+ if (challenge.path.trim() == nodePath.trim()) {
+ if (challenge.pathIndex === 0) {
+ showSnackbar(`当前编辑文件已经是${nodePath}`)
+ } else {
+ onPathChange(0)
+ }
+ return;
+ } else {
+ onPathChange(-1)
+ }
+ } else {
+ let isCurrentFile = false;
+ let cur_index = -1;
+ if (challenge.path && challenge.path.forEach) {
+ challenge.path.forEach((item, index) => {
+ if (nodePath == item) {
+ isCurrentFile = true;
+ cur_index = index;
+ }
+ })
+ }
+ if (isCurrentFile) {
+ onPathChange(cur_index)
+ showSnackbar(`当前编辑文件已经是${nodePath}`)
+ } else {
+ onPathChange(-1)
+ }
+ }
+ if (nodePath) {
+ const filetype = nodePath.split('.').pop().toLowerCase();
+ if (filetype == 'jpg' || filetype == 'png' || filetype == 'gif' || filetype == 'jpeg'
+ || filetype == 'jar'
+ || filetype == 'doc' || filetype == 'pdf' || filetype == 'xsl' || filetype == 'ppt') {
+ showSnackbar(`不支持加载${filetype}类型的文件。`)
+ return;
+ }
+ fetchRepositoryCode(null, nodePath, 1);
+ } else {
+ console.error('no eventKey:', info.node)
+ }
+ }
+ }
+// /shixuns/mnf6b7z3/shixun_discuss?challenge_id=88
+ render() {
+
+ return (
+
+ {this.props.isOnlyContainer == true ?
+ React.Children.map(this.props.children, child => {
+ if(!child) {
+ return ''
+ }
+ return React.cloneElement(child, Object.assign({...this.state}, {
+ loadRepoFiles: this.loadRepoFiles,
+ onTreeSelect: this.onTreeSelect,
+ onLoadData: this.onLoadData,
+ }))
+ })
+
+ :
+
+ }
+
+ );
+ }
+}
+
+export default CodeRepositoryViewContainer;
diff --git a/public/react/src/modules/paths/PathNew.js b/public/react/src/modules/paths/PathNew.js
index 95e343b13..7dcef663b 100644
--- a/public/react/src/modules/paths/PathNew.js
+++ b/public/react/src/modules/paths/PathNew.js
@@ -1,7 +1,7 @@
import React,{ Component } from "react";
import {getUrl,markdownToHTML} from 'educoder';
-import {Input} from 'antd';
+import {Input,Button} from 'antd';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import axios from 'axios';
@@ -86,7 +86,8 @@ class PathNew extends Component{
pathName:"",
description:"",
point:"",
- flag_name:true
+ flag_name:true,
+ bottonloading:false
}
}
@@ -124,6 +125,9 @@ class PathNew extends Component{
return;
}
if (this.isEditPage == true) {
+ this.setState({
+ bottonloading:true
+ })
let pathId = this.props.match.params.pathId;
const editUrl = `/paths/${pathId}.json`
@@ -135,11 +139,21 @@ class PathNew extends Component{
// console.log(response.data.subject_id);
if (response.data.subject_id) {
this.props.history.push(`/paths/${response.data.subject_id}`)
- }
+ }else{
+ this.setState({
+ bottonloading:false
+ })
+ }
}).catch((error)=>{
console.log(error);
+ this.setState({
+ bottonloading:false
+ })
})
} else {
+ this.setState({
+ bottonloading:true
+ })
let url="/paths.json"
axios.post(url,{
name:pathName,
@@ -149,9 +163,16 @@ class PathNew extends Component{
// console.log(response.data.subject_id);
if (response.data.subject_id) {
this.props.history.push(`/paths/${response.data.subject_id}`)
- }
+ }else{
+ this.setState({
+ bottonloading:false
+ })
+ }
}).catch((error)=>{
console.log(error);
+ this.setState({
+ bottonloading:false
+ })
})
}
@@ -267,7 +288,7 @@ class PathNew extends Component{
-
提交
+
{this.isEditPage ?
取消
diff --git a/public/react/src/modules/paths/ShixunPathCard.js b/public/react/src/modules/paths/ShixunPathCard.js
index 166c6415a..d919b1a6b 100644
--- a/public/react/src/modules/paths/ShixunPathCard.js
+++ b/public/react/src/modules/paths/ShixunPathCard.js
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
-import {getImageUrl} from 'educoder';
+import {getImageUrl , setImagesUrl } from 'educoder';
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import { Tooltip } from 'antd';
import axios from 'axios';
@@ -22,51 +22,49 @@ class ShixunPathCard extends Component{
pathList && pathList.map((item,key)=>{
return(
-
-
- {
- item.tag_name === null ? "" :
-
-
{item.tag_name}
- {/*
*/}
-
- }
-
+
+ {/* item.tag_name === null ? "" :
+
+
{item.tag_name}
+
+
*/}
{
item.excellent === false ? "" :
-
- 开放课程
-
+
+ 开放课程
+
}
-
+ {/*
非试用内容,需要授权
-
-
+
*/}
+
+
{/*target="_blank"*/}
-
+
-
-
- {item.name}
+
+
+ {item.name}
{/*target="_blank"*/}
-
+
-
- {item.stages_count}
-
+ {/* */}
+ {/* */}
+ 章节: {item.stages_count}
+ {/* */}
{/**/}
{/*{item.shixuns_count}*/}
{/**/}
-
-
- {item.members_count}
-
+ {/* */}
+ {/* */}
+ 学习人数: {item.members_count}
+ {/* */}
diff --git a/public/react/src/modules/paths/ShixunPathSearch.js b/public/react/src/modules/paths/ShixunPathSearch.js
index c0060a528..8323cd607 100644
--- a/public/react/src/modules/paths/ShixunPathSearch.js
+++ b/public/react/src/modules/paths/ShixunPathSearch.js
@@ -7,9 +7,6 @@ import Pagination from '@icedesign/base/lib/pagination';
import '@icedesign/base/lib/pagination/style.js';
import './ShixunPaths.css';
-
-const Search = Input.Search;
-
class ShixunPathSearch extends Component{
constructor(props) {
super(props)
@@ -122,9 +119,10 @@ class ShixunPathSearch extends Component{
{this.state.updata===undefined?"":
}
-
-
-
+
+
+
+
- 0 ? "" : "active"}>this.changeSelect(null)}>全部
{
sortList && sortList.map((item,key)=>{
@@ -133,18 +131,18 @@ class ShixunPathSearch extends Component{
)
})
}
-
+
-
+
{/*
this.changeStatus("publish_time")}>全部*/}
{/*
this.changeStatus("mine")}>我的*/}
-
this.changeStatus("updated_at")}>最新
-
this.changeStatus("myshixun_count")}>最热
+
this.changeStatus("updated_at")}>最新
+
this.changeStatus("myshixun_count")}>最热
{/*
*/}
{/*/!*
import('../user/usersInfo/InfosTopics'),
+ loading: Loading,
+})
+
+
+class Topic_bank extends Component {
+ constructor(props) {
+ super(props)
+ }
+
+ componentDidMount(){
+ }
+
+ render() {
+ return (
+
+
+
+ ()
+ }
+ >
+
+ ()
+ }
+ >
+
+
+
+ );
+ }
+}
+
+export default SnackbarHOC() (TPMIndexHOC (Topic_bank)) ;
\ No newline at end of file
diff --git a/public/react/src/modules/tpm/NewFooter.js b/public/react/src/modules/tpm/NewFooter.js
index a85b35ccf..be1a1ed29 100644
--- a/public/react/src/modules/tpm/NewFooter.js
+++ b/public/react/src/modules/tpm/NewFooter.js
@@ -1,5 +1,6 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
+import { Link } from 'react-router-dom';
import { getImageUrl, toPath } from 'educoder'
import PropTypes from 'prop-types';
@@ -29,12 +30,12 @@ class NewFooter extends Component {
*/}
diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
index f1184e7b7..a8917fd02 100644
--- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
+++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
@@ -355,6 +355,7 @@ export default class TPMsettings extends Component {
code_hidden: response.data.shixun.code_hidden,
forbid_copy: response.data.shixun.forbid_copy,
vnc: response.data.shixun.vnc,
+ vnc_evaluate: response.data.shixun.vnc_evaluate,
name: response.data.shixun.name,
scope_partment: response.data.shixun.scope_partment,
description: response.data.shixun.description,
@@ -535,6 +536,12 @@ export default class TPMsettings extends Component {
forbid_copy: sum,
});
}
+ shixun_vnc_evaluate=(e) => {
+ this.setState({
+ vnc_evaluate: e.target.checked,
+ });
+
+ }
shixun_vnc=(e)=>{
// let sum = ""
@@ -545,6 +552,7 @@ export default class TPMsettings extends Component {
// }
this.setState({
vnc: e.target.checked,
+ vnc_evaluate: false,
});
}
@@ -772,7 +780,7 @@ export default class TPMsettings extends Component {
}
let {
- name, choice_main_type, choice_small_type, choice_standard_scripts, scope_partment, choice_standard_scriptssum,
+ name, choice_main_type, choice_small_type, choice_standard_scripts, scope_partment, choice_standard_scriptssum, vnc_evaluate,
evaluate_script, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh,
opening_time,shixunmemoMDvalue,shixun_service_configlist
} = this.state;
@@ -883,6 +891,7 @@ export default class TPMsettings extends Component {
use_scope: use_scope,
can_copy: can_copy,
vnc: vnc===null?undefined:vnc,
+ vnc_evaluate: vnc_evaluate===null?undefined:vnc_evaluate,
test_set_permission: test_set_permission,
code_hidden: code_hidden,
trainee: trainee,
@@ -1464,6 +1473,7 @@ export default class TPMsettings extends Component {
forbid_copy,
code_hidden,
vnc,
+ vnc_evaluate,
scopetype,
scope_partment,
departmentslist,
@@ -1643,8 +1653,6 @@ export default class TPMsettings extends Component {
// onMouseEnter={operateauthority?this.bigopen:""}
onSelect={operateauthority?this.bigopens:""}
// open={opers}
-
- showSearch
optionFilterProp="children"
filterOption={(input, option) =>
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -2222,12 +2230,21 @@ export default class TPMsettings extends Component {
{this.props.identity<3?
VNC图形化:
-
-
-
-
+
+
+
+
+
:""}
+ {this.props.identity<3 && vnc ?
+ VNC图形化评测:
+
+
+
+
:""}
+
+
{this.props.identity<3?
diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
index d2e26d58b..c2c464618 100644
--- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js
+++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
@@ -233,7 +233,8 @@ class Newshixuns extends Component {
systemenvironmenttype:false,
testcoderunmodetype:false,
attachmentidstype:false,
- datalisttype:false
+ datalisttype:false,
+ bottonloading:false
}
}
@@ -494,6 +495,9 @@ class Newshixuns extends Component {
} else {
newmulti_webssh = ""
}
+ this.setState({
+ bottonloading:true
+ })
axios.post(Url, {
name: name,
can_copy: can_copy,
@@ -513,9 +517,16 @@ class Newshixuns extends Component {
if (response.status === 200) {
window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges";
// window.open("/shixuns/"+response.data.shixun_identifier+"/challenges");
- }
+ }else{
+ this.setState({
+ bottonloading:false
+ })
+ }
}).catch((error) => {
console.log(error)
+ this.setState({
+ bottonloading:false
+ })
})
}
@@ -1321,7 +1332,9 @@ class Newshixuns extends Component {
diff --git a/public/react/src/modules/tpm/newshixuns/css/Newshixuns.css b/public/react/src/modules/tpm/newshixuns/css/Newshixuns.css
index da0924b94..e241dcf0d 100644
--- a/public/react/src/modules/tpm/newshixuns/css/Newshixuns.css
+++ b/public/react/src/modules/tpm/newshixuns/css/Newshixuns.css
@@ -384,4 +384,14 @@ a.white-btn.use_scope-btn:hover{
.ml82{
margin-left: 82px;
+}
+
+.ant-btn-primary.active, .ant-btn-primary:active {
+ color: #fff;
+ background-color: #096dd9;
+ border-color: #096dd9;
+}
+
+.ant-btn:hover, .ant-btn:focus, .ant-btn:active, .ant-btn.active{
+ background-color: #4CACFF;
}
\ No newline at end of file
diff --git a/public/react/src/modules/tpm/shixuns/shixunCss/shixunCard.css b/public/react/src/modules/tpm/shixuns/shixunCss/shixunCard.css
index 4470aaec1..1ec00a26e 100644
--- a/public/react/src/modules/tpm/shixuns/shixunCss/shixunCard.css
+++ b/public/react/src/modules/tpm/shixuns/shixunCss/shixunCard.css
@@ -6,9 +6,6 @@
margin-left: 32%;
}
-.square-Item{
- /*min-height: 324px;*/
-}
.square-img{
min-height: 210px;
}
diff --git a/public/react/src/modules/user/modal/RealNameCertificationModal.js b/public/react/src/modules/user/modal/RealNameCertificationModal.js
index 1d17b7c20..412cb58c7 100644
--- a/public/react/src/modules/user/modal/RealNameCertificationModal.js
+++ b/public/react/src/modules/user/modal/RealNameCertificationModal.js
@@ -2,7 +2,7 @@ import React, { Component } from "react";
import { message, Icon, Input, Form, Upload} from "antd";
import axios from 'axios'
import ModalWrapper from "../../courses/common/ModalWrapper"
-import { City, getUploadActionUrl, getImageUrl, ImageLayerHook } from 'educoder'
+import { City, getUploadActionUrl, getImageUrl, ImageLayerHook, getUploadActionUrlOfAuth } from 'educoder'
import '../account/common.css'
import authImg from '../../../images/account/auth.png'
@@ -125,14 +125,14 @@ class RealNameCertificationModal extends Component{
const { moduleName } = this.props
const { getFieldDecorator } = this.props.form;
let {certification}=this.props;
-
+ // /api/users/accounts/${this.props.current_user.login}/auth_attachment.json
const uploadProps2 = {
name: 'image',
data:{type:certification == 1 ? "real_name" : "professional"},
multiple: true,
showUploadList: false,
// https://newweb.educoder.net
- action: this.props.current_user ? `/api/users/accounts/${this.props.current_user.login}/auth_attachment.json` : '',
+ action: this.props.current_user ? `${getUploadActionUrlOfAuth(this.props.current_user.login)}` : '',
className: 'idPic-uploader',
onChange: this.handleChange2,
};
diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js
index 242e25464..3a2632061 100644
--- a/public/react/src/modules/user/usersInfo/Infos.js
+++ b/public/react/src/modules/user/usersInfo/Infos.js
@@ -43,7 +43,10 @@ const InfosVideo = Loadable({
loader: () => import('./video/InfosVideo'),
loading:Loading,
})
-
+const InfosTopics=Loadable({
+ loader: () => import('./InfosTopics'),
+ loading:Loading,
+})
const $ = window.$;
class Infos extends Component{
@@ -258,13 +261,10 @@ class Infos extends Component{
{/* --------------------------------------------------------------------- */}
-
-
- {/* 众包 */}
- {/* http://localhost:3007/courses/1309/homework/9300/setting */}
- ()
+ (props) => ()
}
>
@@ -297,7 +297,15 @@ class Infos extends Component{
}
>
- {/* 项目 */}
+ {/* 众包 */}
+ {/* http://localhost:3007/courses/1309/homework/9300/setting */}
+ ()
+ }
+ >
+
+ {/* 视频 */}
()
@@ -305,6 +313,7 @@ class Infos extends Component{
>
+
()
diff --git a/public/react/src/modules/user/usersInfo/InfosBanner.js b/public/react/src/modules/user/usersInfo/InfosBanner.js
index 3aa329ec9..4e6492c7f 100644
--- a/public/react/src/modules/user/usersInfo/InfosBanner.js
+++ b/public/react/src/modules/user/usersInfo/InfosBanner.js
@@ -27,6 +27,14 @@ class InfosBanner extends Component{
let {pathname}=this.props.location;
moduleName=pathname.split("/")[3];
+ let user_id=this.props.current_user&&this.props.current_user.user_id;
+ let user_type=this.props.current_user&&this.props.current_user.user_identity;
+ let targetuserid=this.props.data&&this.props.data.id;
+
+ // console.log(is_current)
+ // console.log(current_user)
+ // console.log(current_user.is_teacher)
+ // console.log(current_user.admin)
return(
@@ -115,6 +123,14 @@ class InfosBanner extends Component{
to={`/users/${username}/videos`}>视频
}
+ {/*自己的主页且不是学生显示题库按钮*/}
+ {(is_current && current_user)
+ &&
+ this.setState({moduleName: 'topics'})}
+ to={`/users/${username}/topics/personal`}>题库
+ }
+
diff --git a/public/react/src/modules/user/usersInfo/InfosCourse.js b/public/react/src/modules/user/usersInfo/InfosCourse.js
index bc401d4d7..f90b35d09 100644
--- a/public/react/src/modules/user/usersInfo/InfosCourse.js
+++ b/public/react/src/modules/user/usersInfo/InfosCourse.js
@@ -103,7 +103,7 @@ class InfosCourse extends Component{
} = this.state;
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(
}
-
+
共参与{totalCount}个{category?category=="manage"?"发布":"学习":"课堂"}
时间最新
+ {/* 289 */}
{
page == 1 && is_current && !category &&
this.props.current_user && this.props.current_user.user_identity != "学生" ?
: ""
@@ -135,7 +136,7 @@ class InfosCourse extends Component{
{
data && data.courses && data.courses.map((item,key)=>{
return(
-
this.turnToCourses(`${item.first_category_url}`,item.can_visited)} style={{"cursor": "pointer"}}>
+
this.turnToCourses(`${item.first_category_url}`,item.can_visited)} style={{"cursor": "pointer",height:"289px"}}>
{
item.is_public == 1 &&
diff --git a/public/react/src/modules/user/usersInfo/InfosPath.js b/public/react/src/modules/user/usersInfo/InfosPath.js
index 554d8380f..67809b6ef 100644
--- a/public/react/src/modules/user/usersInfo/InfosPath.js
+++ b/public/react/src/modules/user/usersInfo/InfosPath.js
@@ -147,6 +147,7 @@ class InfosPath extends Component{
时间最新
+ {/* 295 */}
{
page == 1 && is_current && !category &&
this.props.current_user && this.props.current_user.user_identity != "学生" ?
:""
diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js
index 5aea5117b..030af5fb6 100644
--- a/public/react/src/modules/user/usersInfo/InfosProject.js
+++ b/public/react/src/modules/user/usersInfo/InfosProject.js
@@ -120,6 +120,7 @@ class InfosProject extends Component{
时间最新
+ {/* 289 */}
{
page == 1 && is_current && this.props.current_user && !category && this.props.current_user.user_identity != "学生" ?
:""
@@ -130,7 +131,7 @@ class InfosProject extends Component{
{
data && data.projects && data.projects.map((item,key)=>{
return(
-
this.turnToCourses(`/projects/${item.id}`,item.can_visited)} style={{"cursor": "pointer"}}>
+
this.turnToCourses(`/projects/${item.id}`,item.can_visited)} style={{"cursor": "pointer","height":"289px"}}>
{
item.is_public==1 &&
diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js
index 4799626a9..61a9ce8cb 100644
--- a/public/react/src/modules/user/usersInfo/InfosShixun.js
+++ b/public/react/src/modules/user/usersInfo/InfosShixun.js
@@ -153,6 +153,7 @@ class InfosShixun extends Component{
+ {/* 298 */}
{
page == 1 && is_current && !category && this.props.current_user && this.props.current_user.user_identity != "学生" ?
:""
@@ -163,7 +164,7 @@ class InfosShixun extends Component{
{
data && data.shixuns && data.shixuns.map((item,key)=>{
return(
-
this.turnToCourses(`/shixuns/${item.identifier}/challenges`)}>
+
this.turnToCourses(`/shixuns/${item.identifier}/challenges`)}>
{
item.tag &&
{item.tag}
}
diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js
new file mode 100644
index 000000000..8da80aad3
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/InfosTopics.js
@@ -0,0 +1,593 @@
+import React, { Component } from 'react';
+import { SnackbarHOC } from 'educoder';
+import {BrowserRouter as Router,Route,Switch,Link} from 'react-router-dom';
+import {Tooltip,Menu,Pagination,Spin, Dropdown,Checkbox} from 'antd';
+import axios from 'axios';
+import {getImageUrl,WordsBtn} from 'educoder';
+import moment from 'moment';
+import Modals from '../../modals/Modals';
+import SendTopics from '../../modals/SendTopics'
+import NoneData from '../../courses/coursesPublic/NoneData';
+import "./usersInfo.css";
+import Withoutpermission from './Withoutpermission.png';
+
+
+
+class InfosTopics extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ isSpin:false,
+ category:"normal",
+ course_list_id:undefined,
+ sort_by:"updated_at",
+ sort_direction:"desc",
+ page:1,
+ data:undefined,
+ checkBoxValues:[],
+ per_page:15,
+ isshowprofes:false
+ }
+ }
+
+ componentDidMount(){
+ // let types=this.props.match.params.topicstype;
+ // let professional_certification=this.props.current_user&&this.props.current_user.professional_certification;
+ //
+ // if(professional_certification===false&&types==="publicly"){
+ // this.setState({
+ // isshowprofes:true
+ // })
+ // }else{
+ // this.updataslist()
+ // }
+ this.updataslist()
+ }
+ // componentDidUpdate(prevProps) {
+ //
+ // if(prevProps.current_user!=this.props.current_user){
+ // let types=this.props.match.params.topicstype;
+ // let professional_certification=this.props.current_user&&this.props.current_user.professional_certification;
+ //
+ // console.log(professional_certification)
+ // if(professional_certification===false&&types==="publicly"){
+ // this.setState({
+ // isshowprofes:true
+ // })
+ // }else{
+ // this.updataslist()
+ // }
+ // }
+ // }
+ updataslist=()=>{
+ let types=this.props.match.params.topicstype;
+ let { category,course_list_id,sort_by,sort_direction,page}=this.state;
+ this.searchAlldata(types,category,course_list_id,sort_by,sort_direction,page)
+ }
+ searchAlldata=(type,category,course_list_id,sort_by,sort_direction,page)=>{
+
+ this.setState({
+ isSpin:true
+ })
+
+ let {per_page}=this.state;
+ let url=`/users/question_banks.json`;
+
+ axios.get(encodeURI(url),{params:{
+ type,
+ object_type:category,
+ course_list_id,
+ sort_by,
+ sort_direction,
+ page,
+ per_page
+ }
+ }).then((response) => {
+ if(response){
+ if(response.status){
+ if(response.data.status == -2){
+ this.setState({
+ isshowprofes:true,
+ isSpin:false
+ })
+ }else if(response.data.status === 403||response.data.status === 401||response.data.status === 500){
+ this.setState({
+ isSpin:false
+ })
+ }else{
+ this.setState({
+ data:response.data,
+ checkBoxValues:[],
+ isSpin:false
+ })
+ }
+ }
+ }
+
+ }).catch((error) => {
+ this.setState({
+ isSpin:false
+ })
+ });
+
+ }
+
+ searchCategory=(type)=>{
+ this.setState({
+ category:type,
+ course_list_id:undefined,
+ })
+
+ let types=this.props.match.params.topicstype;
+ let { category,course_list_id,sort_by,sort_direction,page}=this.state;
+ this.searchAlldata(types,type,undefined,sort_by,sort_direction,page)
+ }
+
+ searchCourselistid=(id)=>{
+ this.setState({
+ course_list_id:id
+ })
+
+ let types=this.props.match.params.topicstype;
+ let { category,course_list_id,sort_by,sort_direction,page}=this.state;
+ this.searchAlldata(types,category,id,sort_by,sort_direction,page)
+ }
+
+ onCheckBoxChange=(checkedValues)=>{
+ if(checkedValues.length>15){
+ this.props.showNotification("选择条数不能大于15条")
+ }else{
+ this.setState({
+ checkBoxValues:checkedValues
+ })
+ }
+
+ }
+
+ updatedlist=(updatedtype)=>{
+ let types=this.props.match.params.topicstype;
+ let { category,course_list_id,sort_by,sort_direction,page}=this.state;
+ if(updatedtype===sort_by){
+ if(sort_direction==="desc"){
+ this.setState({
+ sort_direction:"asc",
+ sort_by:updatedtype
+ })
+ this.searchAlldata(types,category,course_list_id,updatedtype,"asc",page)
+ }else{
+ this.setState({
+ sort_direction:"desc",
+ sort_by:updatedtype
+ })
+ this.searchAlldata(types,category,course_list_id,updatedtype,"desc",page)
+ }
+ }else{
+ this.setState({
+ sort_direction:"desc",
+ sort_by:updatedtype
+ })
+ this.searchAlldata(types,category,course_list_id,updatedtype,"desc",page)
+ }
+ }
+
+
+ changePage=(pageNumber)=>{
+ let types=this.props.match.params.topicstype;
+ let { category,course_list_id,sort_by,sort_direction,page}=this.state;
+ this.searchAlldata(types,category,course_list_id,sort_by,sort_direction,pageNumber)
+ this.setState({
+ page:pageNumber,
+ checkBoxValues:[]
+ })
+ }
+
+ deletecheckBoxValues=()=>{
+ let {checkBoxValues}=this.state;
+
+ if(checkBoxValues.length===0){
+ this.props.showNotification("请选择题库")
+ }else{
+ this.setState({
+ Modalstype:true,
+ Modalstopval:"是否确认删除?",
+ ModalCancel:this.topicscancelmodel,
+ ModalSave:this.topicssavedelete,
+ })
+ }
+ }
+
+ topicssavedelete=()=>{
+ let {checkBoxValues,category}=this.state;
+ const url = `/question_banks/multi_delete.json`;
+ axios.delete(url, { data: {
+ object_id: checkBoxValues,
+ object_type:category
+ }})
+ .then((response) => {
+ if(response.data.status===0){
+ this.updataslist()
+ this.props.showNotification(response.data.message)
+ }else{
+ this.props.showNotification(response.data.message)
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+
+ this.topicscancelmodel()
+ }
+
+
+ topicscancelmodel=()=>{
+ this.setState({
+ Modalstype:false,
+ Loadtype:false,
+ visible:false,
+ Modalstopval:"",
+ ModalCancel:"",
+ ModalSave:"",
+ checkBoxValues:[],
+ checkedtype:false
+ })
+
+ }
+ openTopics=(id)=>{
+ this.setState({
+ Modalstype:true,
+ Modalstopval:"公开后不能重设为私有",
+ ModalsBottomval:"是否确认设为公开?",
+ ModalCancel:this.topicscancelmodel,
+ ModalSave:()=>this.topicssaveonOpen(id),
+ })
+ }
+
+ topicssaveonOpen=(id)=>{
+
+ let {category}=this.state;
+ const url = `/question_banks/multi_public.json`;
+ axios.post(url,{
+ object_id:[id],
+ object_type:category
+ }).then((response) => {
+ if(response.data.status===0){
+ this.updataslist()
+ this.props.showNotification(response.data.message)
+ }else{
+ this.props.showNotification(response.data.message)
+ }
+ }).catch(function (error) {
+ console.log(error);
+ });
+
+ this.topicscancelmodel()
+ }
+
+
+ sendTopics=()=>{
+ let {checkBoxValues}=this.state;
+ if(checkBoxValues.length===0){
+ this.props.showNotification("请选择题库")
+ }else{
+ this.setState({
+ visible:true
+ })
+ }
+
+ }
+ render(){
+ let{
+ category,
+ course_list_id,
+ isSpin,
+ data,
+ page,
+ sort_direction,
+ sort_by,
+ checkBoxValues,
+ Modalstype,
+ visible,
+ isshowprofes
+ } = this.state;
+ let {
+ is_current,
+ current_user,
+ }=this.props;
+
+ let categorylist=[
+ {val:"普通作业",type:"normal"},
+ {val:"分组作业",type:"group"},
+ {val:"毕设选题",type:"gtopic"},
+ {val:"毕设任务",type:"gtask"},
+ {val:"试卷",type:"exercise"},
+ {val:"问卷",type:"poll"},
+ ]
+
+ let types=this.props.match.params.topicstype;
+ let username=this.props.match.params.username;
+
+
+ //types===publicly 公共
+ //types===personal 私有
+ let user_id=this.props.current_user&&this.props.current_user.user_id;
+ let user_type=this.props.current_user&&this.props.current_user.user_identity;
+ let targetuserid=this.props.data&&this.props.data.id;
+
+
+
+ // console.log(is_current)
+ // console.log(current_user)
+ // console.log(current_user.is_teacher)
+ // console.log(current_user.admin)
+ const menu = (
+
+ );
+
+ // console.log(this.props)
+ return(
+
+ {/*提示*/}
+
+ {Modalstype&&Modalstype===true?
:""}
+
+ {/*发送至弹窗*/}
+ {
+ visible&&visible===true?
+
this.updataslist()}
+ topicscancelmodel={()=>this.topicscancelmodel()}
+ />:""
+ }
+
+
+
+
+ {types==="publicly"?
:
}
+
+ {isshowprofes===false?
+
+
+
+ {categorylist.map((item,key)=>{
+ return(
+ this.searchCategory(item.type)}>{item.val}
+ )
+ })}
+
+
+
+ {data&&data.count===undefined?"":data&&data.count===0?"":
+
this.searchCourselistid(undefined)}>全部
+
+ {data===undefined?"":data.course_list===undefined||data.course_list.length===0?"":data.course_list.map((item,key)=>{
+ return(
+
this.searchCourselistid(item.id)}>{item.name}
+ )
+ })}
+
+
}
+
+
:
+
+
+
+
通过职业认证的教师才能访问公共题库
+
+
+
+
}
+
+
+
+
+
+
+ {isshowprofes===false?data&&data.count===undefined?"":data&&data.count===0?"":
+
+ 共 {data&&data.count===undefined?0:data&&data.count} 个
+ 已选择 {checkBoxValues.length} 个 (不支持跨页勾选)
+
+
+
+
+
+ {sort_by==="updated_at"?'最近更新':sort_by==="name"?'题目名称':sort_by==="contributor"?"贡献者":""}
+ this.updatedlist(sort_by)}>
+
+
+
+
+
+ {user_type!="学生"?this.sendTopics()}>发送:""}
+ {types==="personal"?((is_current && current_user && current_user.is_teacher ) || current_user && current_user.admin)
+ &&this.deletecheckBoxValues()}>删除:""}
+
+
:""}
+
+
+ {isshowprofes===true?"":data===undefined?:data.question_banks===undefined||data.question_banks.length===0?:
+
+ {data.question_banks.map((item,key)=>{
+ return(
+
+ )})}
+
+ }
+
+ {
+ isshowprofes===true?"":data&&data.count >15 &&
+
+ }
+
+
+
+ )
+ }
+}
+export default InfosTopics;
\ No newline at end of file
diff --git a/public/react/src/modules/user/usersInfo/Withoutpermission.png b/public/react/src/modules/user/usersInfo/Withoutpermission.png
new file mode 100755
index 000000000..791a0bc6e
Binary files /dev/null and b/public/react/src/modules/user/usersInfo/Withoutpermission.png differ
diff --git a/public/react/src/modules/user/usersInfo/banks/BanksIndex.js b/public/react/src/modules/user/usersInfo/banks/BanksIndex.js
index e6c39d578..121119a0d 100644
--- a/public/react/src/modules/user/usersInfo/banks/BanksIndex.js
+++ b/public/react/src/modules/user/usersInfo/banks/BanksIndex.js
@@ -72,16 +72,50 @@ class BanksIndex extends Component{
constructor(props){
super(props);
this.state={
- crumbData:undefined
+ crumbData:undefined,
+ publicly:undefined
}
}
- initPublic = (crumbData) =>{
+ componentDidMount = () =>{
+ // let pathname = this.props.location.pathname;
+ // this.setState({
+ // publicly:pathname.indexOf("/publicly") > -1
+ // })
+
+ }
+
+ initPublic = (crumbData,data) =>{
+ if(data && data.status && data.status == -2){
+ this.props.history.push(`/topicbank/publicly`);
+ }
this.setState({
crumbData
})
}
+ componentDidUpdate(prevProps) {
+ // if(prevProps.current_user!=this.props.current_user){
+ // let { publicly }=this.state;
+ // if( this.props.checkIfLogin()) {
+ // if (this.props.current_user && this.props.current_user.professional_certification == false && publicly){
+ // this.props.history.push(`/topicbank/${this.props.current_user.login}/publicly`);
+ // }
+ // } else {
+ // this.props.showLoginDialog()
+ // }
+ // }
+ // let { publicly }=this.state;
+ // if(this.props.current_user && this.props.current_user.professional_certification == false && publicly){
+ // if( this.props.checkIfLogin()) {
+ // this.props.history.push(`/topicbank/${this.props.current_user.login}/publicly`);
+ // } else {
+ // this.props.showLoginDialog()
+ // }
+ // // console.log(`/topicbank/${this.props.current_user.login}/publicly`);
+ // }
+ }
+
render(){
let { crumbData }=this.state
const common = {
@@ -93,7 +127,7 @@ class BanksIndex extends Component{
{
crumbData &&
- 题库
+ { crumbData && crumbData.is_public == true ? '公共' : '我的' }题库
{
crumbData.crumbArray && crumbData.crumbArray.map((item,key)=>{
return(
@@ -105,23 +139,26 @@ class BanksIndex extends Component{
}
{
- crumbData &&
-
- {crumbData && crumbData.title}
- {crumbData.is_public == true ? '公开':'私有'}
-
- }
+ crumbData &&
+ {crumbData && crumbData.title}
+ { crumbData.is_public == true ?
+ 公开
+ :
+ 私有
+ }
+
+
}
{/*毕设任务编辑*/}
- {
return ()
}
}>
- {
return (
- {
return (
- {
return (
- {
return ()
@@ -156,40 +194,46 @@ class BanksIndex extends Component{
{/*题库问卷编辑详情*/}
- ()
}
>
- {
return ()
}
}>
-
- {/*毕设任务题库详情*/}
- {
+ return ()
+ }
+ }>
+ {/*毕设任务题库详情*/}
+ ()
}
>
{/*毕设内容题库详情*/}
- ()
}
>
{/*分组作业题库详情*/}
- ()
}
>
{/* 普通作业题库详情*/}
- ()
}
diff --git a/public/react/src/modules/user/usersInfo/banks/BanksTabIndex.js b/public/react/src/modules/user/usersInfo/banks/BanksTabIndex.js
new file mode 100644
index 000000000..e38bb5de8
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/banks/BanksTabIndex.js
@@ -0,0 +1,90 @@
+import React, { Component } from 'react';
+
+import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
+
+
+import Loadable from 'react-loadable';
+import Loading from '../../../../Loading';
+
+import BanksMenu from './banksMenu'
+// 毕设选题
+const GtopicBanks = Loadable({
+ loader: () => import('./GtopicBanks'),
+ loading: Loading,
+})
+// 问卷内容
+const PollBanks = Loadable({
+ loader: () => import('./PollBanksContent'),
+ loading: Loading,
+})
+// 试卷详情
+const ExerciseBanksDetail = Loadable({
+ loader: () => import('./ExerciseBanksDetail'),
+ loading: Loading,
+});
+
+class BanksTabIndex extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ banksMenu:undefined
+ }
+ }
+
+ initPublic = (crumbData,menuData,data) =>{
+ this.setState({
+ banksMenu:menuData
+ })
+ this.props.initPublic(crumbData,data);
+ }
+
+ render(){
+ let{
+ banksMenu
+ }=this.state
+
+ const common={
+ initPublic:this.initPublic,
+ };
+ console.log("BanksTabIndex");
+ console.log(banksMenu);
+ console.log(this.props);
+ return(
+
+ {
+ banksMenu &&
+
+ }
+
+ {
+ return ()
+ }
+ }>
+
+ {
+ return ()
+ }
+ }>
+ {
+ return ()
+ }
+ }>
+
+
+
+ )
+ }
+}
+export default (BanksTabIndex);
\ No newline at end of file
diff --git a/public/react/src/modules/user/usersInfo/banks/ExerciseBanksDetail.js b/public/react/src/modules/user/usersInfo/banks/ExerciseBanksDetail.js
new file mode 100644
index 000000000..00fb830db
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/banks/ExerciseBanksDetail.js
@@ -0,0 +1,56 @@
+import React, { Component } from 'react';
+import axios from 'axios'
+
+import ExerciseDisplay from '../../../courses/exercise/ExerciseDisplay'
+
+class ExerciseBanksDetail extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+
+ }
+ }
+
+ componentDidMount = () =>{
+
+ }
+ detailFetchCallback = (result) => {
+ let Id=this.props.match.params.Id;
+
+ const crumbData={
+ title: result.data.exercise && result.data.exercise.name,
+ is_public: result.data.exercise && result.data.exercise.is_public,
+ crumbArray:[
+ {content:'详情'},
+ ]
+ }
+ const menuData={
+ tab:'0',//tab选中的index
+ menuArray:[//tab以及tab路由
+ {to:`/banks/exercise/${Id}/${this.props.match.params.type}?tab=0`,content:'内容详情'}
+ ],
+ category:'exercise',//
+ tos: `/banks/exercise/${Id}/edit/${this.props.match.params.type}`,
+ id: Id,
+ is_public: result.data.exercise && result.data.exercise.is_public,
+ type:this.props.match.params.type,
+ authorize:result && result.data && result.data.authorize,
+ }
+ this.props.initPublic(crumbData,menuData,result.data);
+ }
+
+ render(){
+ let { pollDetail } = this.state
+
+ return(
+
+
+
+
+ )
+ }
+}
+export default ExerciseBanksDetail
diff --git a/public/react/src/modules/user/usersInfo/banks/ExerciseBanksEdit.js b/public/react/src/modules/user/usersInfo/banks/ExerciseBanksEdit.js
new file mode 100644
index 000000000..94d093454
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/banks/ExerciseBanksEdit.js
@@ -0,0 +1,71 @@
+import React, { Component } from 'react';
+import axios from 'axios'
+import { ActionBtn } from 'educoder'
+
+
+import ExerciseNewCommon from '../../../courses/exercise/ExerciseNewCommon'
+
+class ExerciseBanksEdit extends Component {
+ constructor(props){
+ super(props);
+ this.state = {
+ isPublic: undefined,
+ // isGroup: false
+ }
+ }
+ componentDidMount = () =>{
+
+
+ }
+
+ initData = (responseData) =>{
+ const Id = this.props.match.params.Id;
+
+ const crumbData={
+ title:'编辑',
+ is_public: responseData && responseData.data && responseData.data.exercise.is_public,
+ crumbArray:[
+ {to:`/banks/exercise/${Id}/${this.props.match.params.type}`,content:'详情'},
+ {content:'编辑'}
+ ]
+ }
+ this.props.initPublic(crumbData,responseData.data);
+ }
+
+ render(){
+ let { Id, type } = this.props.match.params
+ const common = {
+ // onCancel:this.onCancel,
+ // isGroup: this.isGroup,
+ // doNew: this.doNew,
+ // doEdit: this.doEdit,
+ initData: this.initData
+ }
+ return(
+
+
+
this.exerciseNewCommonRef = ref}
+ isEdit={true}
+ shixunsUrl={`/exercise_banks/choose_shixun.json`}
+ exercise_url={'exercise_banks'}
+ exercise_url_questions={'exercise_bank_questions'}
+ bottomSection={
+ 完成
+ }
+ >
+
+ )
+ }
+}
+export default ExerciseBanksEdit;
\ No newline at end of file
diff --git a/public/react/src/modules/user/usersInfo/banks/GtaskBanksEdit.js b/public/react/src/modules/user/usersInfo/banks/GtaskBanksEdit.js
new file mode 100644
index 000000000..8209effa4
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/banks/GtaskBanksEdit.js
@@ -0,0 +1,99 @@
+import React, { Component } from 'react';
+import axios from 'axios'
+import NewGtaskForm from './NewGtaskForm';
+import NewWorkForm from "./HomeworkBanksEdit";
+
+class GtaskBanksEdit extends Component {
+ constructor(props){
+ super(props);
+ this.state = {
+ isPublic: undefined,
+ isGroup: false
+ }
+ }
+ componentDidMount = () =>{
+ let workId = this.props.match.params.workId;
+ this.initData(workId);
+ }
+
+ initData = (workId) =>{
+
+ let url = `/task_banks/${workId}.json`;
+ axios.get(url).then((result)=>{
+ if(result){
+ const crumbData={
+ title:'编辑',
+ is_public:result && result.data && result.data.is_public,
+ crumbArray:[
+ {to:`/banks/gtask/${workId}/${this.props.match.params.type}?tab=0`,content:'详情'},
+ {content:'编辑'}
+ ]
+ }
+ this.props.initPublic(crumbData,result.data);
+ result.data.isEdit = true;
+ this.setState({ data:result.data})
+ this.newWorkFormRef.initValue(result.data);
+ }
+ }).catch((error)=>{
+ console.log(error)
+ })
+ }
+
+
+ doNew = () => {
+ }
+ doEdit = (params) => {
+ const workId = this.props.match.params.workId
+ const newUrl = `/homework_banks/${workId}.json`
+
+ // const isGroup = this.props.isGroup()
+ axios.put(newUrl, params)
+ .then((response) => {
+ if (response.data.status == 0) {
+ this.props.showNotification('保存成功')
+ this.toWorkDetail()
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+ toWorkDetail = () => {
+ window.location.href=`/banks/gtask/${this.props.match.params.workId}/${this.props.match.params.type}?tab=0`;
+ this.props.initPublic(undefined);
+ }
+ onCancel = () => {
+ this.toWorkDetail()
+ }
+ isGroup = () => {
+ return this.state.isGroup;
+ }
+ render(){
+
+ const common = {
+ onCancel:this.onCancel,
+ isGroup: this.isGroup,
+ doNew: this.doNew,
+ doEdit: this.doEdit,
+ }
+ return(
+
+
+ this.newWorkFormRef = ref}
+ topicId={this.props.match.params.workId}
+ >
+
+ )
+ }
+}
+export default GtaskBanksEdit;
\ No newline at end of file
diff --git a/public/react/src/modules/user/usersInfo/banks/GtopicBanks.js b/public/react/src/modules/user/usersInfo/banks/GtopicBanks.js
new file mode 100644
index 000000000..be7922d90
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/banks/GtopicBanks.js
@@ -0,0 +1,37 @@
+import React, { Component } from 'react';
+
+
+class GtopicBanks extends Component{
+ constructor(props){
+ super(props);
+ }
+ componentDidMount = () =>{
+ let bankId = this.props.match.params.bankId
+ const crumbData={
+ title:'MySQL数据库编程开发实训(基础篇)111',
+ is_public:true,
+ crumbArray:[
+ {content:'详情'},
+ ]
+ }
+ const menuData={
+ tab:'0',//tab选中的index
+ menuArray:[//tab以及tab路由
+ {to:'/banks/gtopic/1',content:'内容详情'},
+ // {to:'/banks/gtopic/1/answer',content:'参考答案'},
+ ],
+ category:'topic',//毕设选题
+ id:bankId,
+ is_public:true,
+ }
+ this.props.initPublic(crumbData,menuData);
+ }
+ render(){
+ return(
+
+
+
+ )
+ }
+}
+export default GtopicBanks;
\ No newline at end of file
diff --git a/public/react/src/modules/user/usersInfo/banks/GtopicBanksEdit.js b/public/react/src/modules/user/usersInfo/banks/GtopicBanksEdit.js
new file mode 100644
index 000000000..a03a5b533
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/banks/GtopicBanksEdit.js
@@ -0,0 +1,88 @@
+import React, { Component } from 'react';
+import axios from 'axios'
+
+import GraduateTopicNewFrom from '../../../courses/graduation/topics/GraduateTopicNewFrom'
+
+class GtopicBanksEdit extends Component{
+ constructor(props){
+ super(props);
+ this.state = {
+ isPublic:undefined
+ }
+ }
+ componentDidMount = () =>{
+ let bankId = this.props.match.params.bankId;
+ this.initData(bankId);
+ }
+
+ initData = (bankId) =>{
+ let url = `/gtopic_banks/${bankId}/edit.json`;
+ axios.get(url).then((result)=>{
+ if(result){
+ const crumbData={
+ title:'编辑',
+ is_public:result && result.data.selected_data && result.data.selected_data.is_public,
+ crumbArray:[
+ {to:`/banks/gtopic/${bankId}/${this.props.match.params.type}?tab=0`,content:'详情'},
+ {content:'编辑'}
+ ]
+ }
+ this.props.initPublic(crumbData,result.data);
+
+ this.GraduateTopicNewFromRef.initValue(result);
+ }
+ }).catch((error)=>{
+ console.log(error)
+ })
+ }
+
+ // 编辑保存
+ editSave = (param,attachments,bankId) =>{
+ const url = `/gtopic_banks/${bankId}.json`;
+ let params = {
+ gtopic_bank:param,
+ attachment_ids:attachments
+ }
+ axios.put(url,params).then((result)=>{
+ if(result){
+ this.props.showNotification('保存成功!');
+ this.props.history.push(`/banks/gtopic/${bankId}/${this.props.match.params.type}?tab=0`);
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
+
+ // 取消
+ editCancel = () =>{
+ this.props.history.push(`/banks/gtopic/${this.props.match.params.bankId}/${this.props.match.params.type}?tab=0`);
+ this.props.initPublic(undefined);
+ }
+
+ render(){
+ let { bankId } = this.props.match.params
+ const common = {
+ editSave:this.editSave,
+ editCancel:this.editCancel
+ }
+ return(
+
+
+ this.GraduateTopicNewFromRef = ref}
+ topicId={bankId}
+ >
+
+ )
+ }
+}
+export default GtopicBanksEdit;
\ No newline at end of file
diff --git a/public/react/src/modules/user/usersInfo/banks/HomeworkBanksEdit.js b/public/react/src/modules/user/usersInfo/banks/HomeworkBanksEdit.js
new file mode 100644
index 000000000..33a981141
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/banks/HomeworkBanksEdit.js
@@ -0,0 +1,103 @@
+import React, { Component } from 'react';
+import axios from 'axios'
+
+
+import NewWorkForm from '../../../courses/busyWork/NewWorkForm'
+
+class HomeworkBanksEdit extends Component {
+ constructor(props){
+ super(props);
+ this.state = {
+ isPublic: undefined,
+ // isGroup: false
+ }
+ }
+ componentDidMount = () =>{
+ let workId = this.props.match.params.workId;
+
+ this.initData(workId);
+ }
+
+ initData = (workId) =>{
+ let url = `/homework_banks/${workId}.json`;
+ axios.get(url).then((result)=>{
+ if(result){
+ const crumbData={
+ title:'编辑',
+ is_public:result && result.data && result.data.is_public,
+ crumbArray:[
+ {to:`/banks/${this.getModuleName()}/${workId}/${this.props.match.params.type}?tab=0`,content:'详情'},
+ {content:'编辑'}
+ ]
+ }
+ this.props.initPublic(crumbData,result.data);
+ result.data.isEdit = true;
+ result.data.ref_attachments = result.data.reference_attachments
+ // this.setState({ isGroup: result.data.min_num || result.data.max_num })
+ this.newWorkFormRef.initValue(result.data);
+ }
+ }).catch((error)=>{
+ console.log(error)
+ })
+ }
+
+
+ doNew = () => {
+ }
+ doEdit = (params) => {
+ const workId = this.props.match.params.workId
+ const newUrl = `/homework_banks/${workId}.json`
+
+ // const isGroup = this.props.isGroup()
+ axios.put(newUrl, params)
+ .then((response) => {
+ if (response.data.status == 0) {
+ this.props.showNotification('保存成功')
+ this.toWorkDetail()
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+ getModuleName = () => {
+ return this.props.isGroup ? 'group' : 'normal'
+ }
+ toWorkDetail = () => {
+ this.props.history.push(`/banks/${this.getModuleName()}/${this.props.match.params.workId}/${this.props.match.params.type}?tab=0`)
+ this.props.initPublic(undefined);
+ }
+ onCancel = () => {
+ this.toWorkDetail()
+ }
+ isGroup = () => {
+ return this.props.isGroup;
+ }
+ render(){
+ let { bankId } = this.props.match.params
+ const common = {
+ onCancel:this.onCancel,
+ isGroup: this.isGroup,
+ doNew: this.doNew,
+ doEdit: this.doEdit,
+ }
+ return(
+
+
+ this.newWorkFormRef = ref}
+ >
+
+ )
+ }
+}
+export default HomeworkBanksEdit;
\ No newline at end of file
diff --git a/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js b/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js
new file mode 100644
index 000000000..8c0f6474c
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js
@@ -0,0 +1,358 @@
+import React,{ Component } from "react";
+import { Input, InputNumber, Form, Button, Checkbox, Upload, Icon, message, Modal } from "antd";
+import axios from 'axios'
+import { WordsBtn, getUrl, ConditionToolTip, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll } from 'educoder'
+import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
+const $ = window.$;
+const MAX_TITLE_LENGTH = 60;
+class NewGtaskForms extends Component{
+ constructor(props){
+ super(props);
+ this.contentMdRef = React.createRef();
+ this.state={
+ title_num:0,
+ description:"",
+ contentFileList: [],
+ }
+ }
+
+
+ initValue = (data) => {
+
+ if (data.isEdit===true) {
+ const contentFileList = data.attachments.map(item => {
+ return {
+ id: item.id,
+ uid: item.id,
+ name: appendFileSizeToUploadFile(item),
+ url: item.url,
+ filesize: item.filesize,
+ status: 'done'
+ }
+ })
+ this.setState({
+ ...data,
+ base_on_project: data.task_type===2?data.group_info.base_on_project:undefined,
+ title_num: parseInt(data.name.length),
+ min_num: data.task_type===2?data.group_info.min_number:undefined,
+ max_num: data.task_type===2?data.group_info.max_number:undefined,
+ contentFileList,
+ }, () => {
+ setTimeout(() => {
+ this.contentMdRef.current.setValue(data.description || '')
+ }, 2000)
+
+ this.props.form.setFieldsValue({
+ title: data.name,
+ description: data.description || '',
+ });
+
+ })
+ }
+
+
+ }
+
+
+ // 输入title
+ changeTitle=(e)=>{
+ console.log(e.target.value.length);
+ this.setState({
+ title_num: parseInt(e.target.value.length)
+ })
+ }
+ handleContentUploadChange = (info) => {
+ let contentFileList = info.fileList;
+ this.setState({ contentFileList: appendFileSizeToUploadFileAll(contentFileList) });
+ }
+ deleteAttachment = (file, stateName) => {
+ // 初次上传不能直接取uid
+ 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[stateName].indexOf(file);
+ const newFileList = state[stateName].slice();
+ newFileList.splice(index, 1);
+ return {
+ [stateName]: newFileList,
+ };
+ });
+ }
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+
+ onAttachmentRemove = (file, stateName) => {
+ if(file.response!=undefined){
+ this.props.confirm({
+ content: '是否确认删除?',
+
+ onOk: () => {
+ this.deleteAttachment(file, stateName)
+ },
+ onCancel() {
+ console.log('Cancel');
+ },
+ });
+ return false;
+ }
+
+ }
+
+ handleSubmit = () => {
+
+ let {contentFileList,min_num,max_num,base_on_project}=this.state;
+ let {data}=this.props;
+ let task_type=data.task_type
+ let topicId=this.props.topicId
+ let attachment_ids = contentFileList.map(item => {
+ return item.response ? item.response.id : item.id
+ })
+ this.props.form.validateFields((err, values) => {
+
+ const mdContnet = this.contentMdRef.current.getValue().trim();
+
+ values.description = mdContnet;
+
+ if (!err) {
+ if (this.props.data.isEdit===true) {
+ let url="/task_banks/"+topicId+".json";
+ axios.put(url, {
+ gtask_bank: {
+ name: values.title,
+ description: values.description,
+ min_num:task_type===1?undefined:min_num,
+ max_num:task_type===1?undefined:max_num,
+ base_on_project: task_type===1?task_type:base_on_project===true?1:0
+ },
+ attachment_ids:attachment_ids
+ }
+ ).then((response) => {
+ if(response.data.status===0){
+ this.props.showNotification(response.data.message)
+ this.props.onCancel()
+ }else{
+ this.props.showNotification(response.data.message)
+ }
+ }).catch((error) => {
+ console.log(error)
+ })
+ }
+ } else {
+ $("html").animate({ scrollTop: $('html').scrollTop() - 100 })
+ }
+ })
+ }
+
+ max_num_change = (val) => {
+ if (val < 2) {
+ this.setState({
+ max_num: 2,
+ })
+ return;
+ }
+ const { min_num } = this.state;
+ this.setState({
+ max_num: val,
+ min_num: val <= min_num ? val - 1 : min_num
+ })
+ }
+
+ min_num_change = (val) => {
+ this.setState({ min_num: val })
+ }
+
+ base_on_project_change = () => {
+ this.setState({ base_on_project: !this.state.base_on_project })
+ }
+
+ render(){
+ const { getFieldDecorator } = this.props.form;
+ let{
+ title_value, contentFileList, answerFileList, max_num, min_num, base_on_project,
+ init_max_num, init_min_num,
+ title_num, course_name, category, has_commit, has_project,
+ isEdit
+ }=this.state
+ const uploadProps = {
+ width: 600,
+ fileList: contentFileList,
+ multiple: true,
+ // https://github.com/ant-design/ant-design/issues/15505
+ // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
+ // showUploadList: false,
+ action: `${getUrl()}/api/attachments.json`,
+ onChange: this.handleContentUploadChange,
+ onRemove: (file) => this.onAttachmentRemove(file, 'contentFileList'),
+ beforeUpload: (file) => {
+ console.log('beforeUpload', file.name);
+ const isLt150M = file.size / 1024 / 1024 < 150;
+ if (!isLt150M) {
+ message.error('文件大小必须小于150MB!');
+ }
+ return isLt150M;
+ },
+ };
+
+
+ return(
+
+
+
+ {getFieldDecorator('title', {
+ rules: [{
+ required: true, message: '请输入标题'
+ }],
+ })(
+
+ )}
+
+
+
+
+
+ {
+ {getFieldDecorator('description', {
+ rules: [{
+ required: true, message: '请输入任务内容说明'
+ }],
+ })(
+
+ )}
+ }
+
+
+ (单个文件150M以内)
+
+ {this.props.data&&this.props.data.task_type===2?
+
+ {getFieldDecorator('personNum', {
+ rules: [{
+ required: false
+ // required: true, message: '请输入最小人数和最大人数'
+ }],
+ })(
+
+
+
+ {/* max={has_commit ? init_min_num : null } */}
+ 每组最小人数: 人
+
+
+
+ {/* min={has_commit ? init_max_num : (min_num == undefined ? 2 : min_num + 1) } */}
+
+ 每组最大人数: 人
+
+
学生提交作品时需要关联同组成员,组内成员作品共享
+
+
+
+ 基于项目(选中,则必须在本平台创建项目,项目管理员可以提交作品;不选中,无需在平台创建项目,任意小组成员均可以提交作品)
+
+
+
+ )}
+ :""
+ }
+
+
+
+
+
+ )
+ }
+}
+
+
+const NewGtaskForm = Form.create({ name: 'NewGtaskForm' })(NewGtaskForms);
+export default NewGtaskForm;
\ No newline at end of file
diff --git a/public/react/src/modules/user/usersInfo/banks/PollBanksContent.js b/public/react/src/modules/user/usersInfo/banks/PollBanksContent.js
new file mode 100644
index 000000000..be6bd5e2c
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/banks/PollBanksContent.js
@@ -0,0 +1,69 @@
+import React, { Component } from 'react';
+import axios from 'axios'
+
+import PollDetailTabThirdInfo from '../../../courses/poll/PollDetailTabThirdInfo'
+
+class PollBanksContent extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ pollDetail:undefined
+ }
+ }
+
+ componentDidMount = () =>{
+ console.log("PollBanksContent");
+ console.log(this.props)
+ let bankId=this.props.match.params.bankId;
+ let url = `/exercise_banks/${bankId}.json`
+ axios.get(url).then((result)=>{
+ if(result){
+ let pollDetail = {
+ poll:{
+ id: result.data.poll && result.data.poll.id ,
+ polls_description: result.data.poll && result.data.poll.description,
+ polls_name: result.data.poll && result.data.poll.name,
+ is_public:result.data.poll && result.data.poll.is_public
+ },
+ question_types:result.data.question_types,
+ questions:result.data.questions,
+ }
+ const crumbData={
+ title:result.data.poll && result.data.poll.name,
+ is_public:result.data.poll && result.data.poll.is_public,
+ crumbArray:[
+ {content:'详情'},
+ ]
+ }
+ const menuData={
+ tab:'0',//tab选中的index
+ menuArray:[//tab以及tab路由
+ {to:`/banks/poll/${bankId}/${this.props.match.params.type}`,content:'内容详情'}
+ ],
+ category:'poll',//毕设选题
+ tos:`/banks/poll/${bankId}/edit/${this.props.match.params.type}`,
+ id:bankId,
+ is_public:result.data.poll && result.data.poll.is_public,
+ type:this.props.match.params.type,
+ authorize:result && result.data && result.data.authorize,
+ }
+ this.props.initPublic(crumbData,menuData,result.data);
+ this.setState({
+ pollDetail
+ })
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
+
+ render(){
+ let { pollDetail } = this.state
+ return(
+
+ )
+ }
+}
+export default PollBanksContent
diff --git a/public/react/src/modules/user/usersInfo/banks/banksMenu.js b/public/react/src/modules/user/usersInfo/banks/banksMenu.js
new file mode 100644
index 000000000..1c753450b
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/banks/banksMenu.js
@@ -0,0 +1,196 @@
+import React, { Component } from 'react';
+
+import { Menu } from 'antd'
+import { Link } from 'react-router-dom'
+import { WordsBtn } from 'educoder'
+import "../usersInfo.css"
+import "../../../courses/css/Courses.css"
+import "../../../courses/css/busyWork.css"
+import SendTopics from '../../../modals/SendTopics';
+import Modals from '../../../modals/Modals';
+import axios from 'axios';
+class BanksMenu extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ visible:false,
+ tab:['0'],
+ }
+ }
+
+ //发送至相关
+ sendTopics=()=>{
+ this.setState({
+ visible:true
+ })
+ }
+ componentDidMount() {
+ debugger
+ try {
+ const query = this.props.location.search;
+ const type = query.split('?tab=');
+ if(type[1]===undefined){
+ this.setState({
+ tab:['0'],
+ });
+ }else{
+ if(type[1]==="0"){
+ this.setState({
+ tab:['0'],
+ });
+ }else if(type[1]==="1"){
+ this.setState({
+ tab:['1'],
+ });
+ }
+ }
+
+ }catch (e) {
+ this.setState({
+ tab:['0'],
+ });
+ }
+
+ }
+
+ topicscancelmodel=()=>{
+ this.setState({
+ Modalstype:false,
+ Loadtype:false,
+ visible:false,
+ Modalstopval:"",
+ ModalCancel:"",
+ ModalSave:"",
+ checkBoxValues:[],
+ checkedtype:false
+ })
+ }
+
+ //删除相关
+
+ deletecheckBoxValues=(id,type)=>{
+
+ this.setState({
+ Modalstype:true,
+ Modalstopval:"是否确认删除?",
+ ModalCancel:this.topicscancelmodel,
+ ModalSave:()=>this.topicssavedelete(id,type),
+ })
+
+ }
+
+ topicssavedelete=(id,type)=>{
+ console.log("删除了");
+ console.log(id);
+ console.log(type);
+ const url = `/question_banks/multi_delete.json`;
+ axios.delete(url, { data: {
+ object_id: [id],
+ object_type:type
+ }})
+ .then((response) => {
+ console.log(response);
+ if(response){
+ if(response.data){
+ if(response.data.status===0){
+ this.props.showNotification(response.data.message)
+ window.location.href=`/users/${this.props.current_user.login}/topics/personal`;
+ }else{
+ this.props.showNotification(response.data.message)
+ }
+ }
+ }
+
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ this.topicscancelmodel()
+ }
+ changeTab=(e)=>{
+ this.setState({
+ tab:e.key
+ })
+ console.log(e.key);
+ // if(e.key === 0){
+ //
+ // }else{
+ //
+ //
+ // }
+ }
+ render(){
+ let { banksMenu} = this.props;
+ let {visible,tab}=this.state;
+ // console.log("问卷预览");
+ // console.log(visible);
+ let user_id=this.props.current_user&&this.props.current_user.user_id;
+ let user_type=this.props.current_user&&this.props.current_user.user_identity;
+ let targetuserid=this.props.data&&this.props.data.id;
+ // console.log("_____________________________");
+ // console.log(this.props);
+ // console.log("++++++++++++++++=");
+ // console.log("banksMenubanksMenubanksMenubanksMenu");
+ // console.log(banksMenu);
+ return(
+
+ {this.state.Modalstype&&this.state.Modalstype===true?
:""}
+ {/*发送至弹窗*/}
+ {
+ visible&&visible===true?
+
this.topicscancelmodel()}
+ />:""
+ }
+ {
+ banksMenu &&
+
+
+
+ }
+
+ {
+ banksMenu===undefined?
+
+ this.deletecheckBoxValues(banksMenu&&banksMenu.id,banksMenu&&banksMenu.category)}style="blue" className="ml20 font-16">删除
+ 编辑
+ this.sendTopics()} style="blue" className="ml20 font-16">发送
+
+ :banksMenu.authorize===true?
+
+ this.deletecheckBoxValues(banksMenu&&banksMenu.id,banksMenu&&banksMenu.category)}style="blue" className="ml20 font-16">删除
+ 编辑
+ this.sendTopics()} style="blue" className="ml20 font-16">发送
+
+ :
+
+ this.sendTopics()} style="blue" className="ml20 font-16">发送
+
+ }
+
+ )
+ }
+}
+export default BanksMenu;
\ No newline at end of file
diff --git a/public/react/src/modules/user/usersInfo/publicCreatNew.js b/public/react/src/modules/user/usersInfo/publicCreatNew.js
index 0b5cee7d2..25dd4a030 100644
--- a/public/react/src/modules/user/usersInfo/publicCreatNew.js
+++ b/public/react/src/modules/user/usersInfo/publicCreatNew.js
@@ -17,7 +17,7 @@ class publicCreateNew extends Component{
render() {
let {href,name,index}=this.props;
return (
-
+
diff --git a/public/react/src/modules/user/usersInfo/usersInfo.css b/public/react/src/modules/user/usersInfo/usersInfo.css
index ab5dd6136..a0cd3ba21 100644
--- a/public/react/src/modules/user/usersInfo/usersInfo.css
+++ b/public/react/src/modules/user/usersInfo/usersInfo.css
@@ -226,4 +226,207 @@
content: '';
left:0px;
background: #4CACFF;
+}
+/* 题库相关 */
+.breadcrumb{
+ height: 18px;
+ line-height: 18px;
+ margin:10px 0px 0px;
+}
+.breadcrumb .ant-breadcrumb a:hover{
+ color: #459BE5 !important;
+}
+.breadcrumb .ant-breadcrumb-separator{
+ margin:0px 2px!important;
+}
+.breadcrumb span.ant-breadcrumb-link{
+ cursor: default;
+}
+.bank_is_public{
+ background: #84B6EB;
+ float: left;
+ height: 24px;
+ line-height: 24px;
+ padding:0px 20px;
+ color: #fff;
+ font-size: 16px;
+ margin-left: 10px;
+ border-radius:20px;
+ margin-top:3px;
+}
+.breadcrumb.ant-breadcrumb > span:last-child a{
+ color: #05101A
+}
+.breadcrumb.ant-breadcrumb a{
+ color:#999;
+}
+.bank_is_private{
+ background: #56B998;
+ float: left;
+ height: 24px;
+ line-height: 24px;
+ padding:0px 20px;
+ color: #fff;
+ font-size: 16px;
+ margin-left: 10px;
+ border-radius:20px;
+ margin-top:3px;
+}
+.topicsbox{
+ width: 1200px;
+ /*min-height: 216px;*/
+ background: rgba(255,255,255,1);
+ padding: 0px 30px 0px 40px;
+}
+
+.topicstopfont{
+ width:64px;
+ height:16px;
+ font-size:16px;
+ font-weight:400;
+ color: #666 !important;
+}
+
+.topcschild{
+ width:1128px;
+ height:55px;
+ line-height: 54px;
+ border-bottom:1px solid rgba(235,235,235,1);
+}
+
+.topcsmid{
+ width:1128px;
+ height:55px;
+ line-height: 55px;
+}
+
+.topcsactive{
+ color: #4CACFF !important;
+ cursor: pointer;
+}
+
+.topicsmidfont{
+ max-width: 56px;
+ height: 55px;
+ font-size: 14px;
+ font-weight: 400;
+ cursor: pointer;
+ line-height: 55px;
+ color: #666;
+}
+
+.alltopisc{
+ width:230px;
+ height:20px;
+ font-size:14px;
+ font-weight:400;
+ color:rgba(153,153,153,1);
+ line-height:20px;
+}
+
+.alltopiscright{
+ /* width: 141px; */
+ height: 20px;
+ font-size: 14px;
+ font-weight: 400;
+ color: rgba(153,153,153,1);
+ line-height: 20px;
+}
+
+.topicsbtn{
+ padding: 0px 15px;
+ border-radius: 2px;
+ /*color: #4C4C4C;*/
+ cursor: pointer;
+ display: inline-block;
+ /*background-color: #4CACFF!important;*/
+ /*color: #fff!important;*/
+ border-radius: 11px;
+ border: 1px solid rgba(76,172,255,1);
+ color: rgba(76,172,255,1);
+}
+
+.pd1323{
+ padding: 10px 6px 25px 40px;
+ /*cursor: pointer;*/
+}
+.pd1323:hover {
+ box-shadow: 0px 2px 6px rgba(51,51,51,0.09);
+ opacity: 1;
+ border-radius: 2px;
+}
+.topicswidth600{
+ mac-width: 600px;
+ display: inline-block;
+}
+.topicswidth300{
+ width: 300px;
+ display: inline-block;
+}
+.topiscfilterbtn{
+ font-size: 14px;
+ color: #4CACFF !important;
+ border-radius: 5px;
+ border: 1px solid #4CACFF !important;
+ line-height: 23px !important;
+}
+
+.topscisright{
+ right: 0px;
+ top: 45px;
+ display: block;
+ position: absolute;
+}
+
+.topsics135{
+ max-width: 135px;
+ display: inline-block;
+}
+
+.professional_certificationbox{
+ height:431px;
+ background:rgba(255,255,255,1);
+}
+
+.pd115200{
+ padding: 55px 200px 0px 200px;
+}
+
+.topicsItemimg{
+ width:150px;
+}
+
+.topicsItemfont{
+ font-size: 18px;
+ font-family: PingFang-SC;
+ font-weight: 400;
+ color: rgba(51,51,51,1);
+ line-height: 35px;
+}
+
+.topicsItem{
+ max-width: 1068px;
+ max-height: 115px;
+ overflow-y: auto;
+}
+
+.mb45{
+ margin-bottom: 45px!important;
+}
+
+.topsicsmax550{
+ max-width: 550px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ position: absolute;
+ top: -16px;
+}
+
+.topsicrelative{
+ position: relative;
+}
+
+.topsicinline{
+ display: inline-block;
}
\ No newline at end of file
diff --git a/public/stylesheets/css/edu-common.css b/public/stylesheets/css/edu-common.css
index ad1d2598c..4e9fcbffd 100644
--- a/public/stylesheets/css/edu-common.css
+++ b/public/stylesheets/css/edu-common.css
@@ -108,6 +108,7 @@ a:hover.link-color-grey03{color:#3498db!important;}
.font-18{ font-size: 18px!important;}
.font-20{ font-size: 20px!important;}
.font-22{ font-size: 22px!important;}
+.font-25{ font-size: 25px!important;}
.font-24{ font-size: 24px!important;}
.font-28{ font-size: 28px!important;}
.font-30{ font-size: 30px!important;}
diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
index 022030757..91ea604d4 100644
--- a/public/stylesheets/educoder/edu-all.css
+++ b/public/stylesheets/educoder/edu-all.css
@@ -3761,8 +3761,3 @@ a.singlepublishtwo{
/*width: auto !important;*/
/*max-width: 600px !important;*/
/*}*/
-.topicsItem{
- max-width: 1138px;
- max-height: 110px;
- overflow-y: auto;
-}
\ No newline at end of file
diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css
index 62e052104..4c596bad2 100644
--- a/public/stylesheets/educoder/edu-main.css
+++ b/public/stylesheets/educoder/edu-main.css
@@ -82,6 +82,7 @@ a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center
.font-18{ font-size: 18px!important;}
.font-20{ font-size: 20px!important;}
.font-22{ font-size: 22px!important;}
+.font-25{ font-size: 25px!important;}
.font-24{ font-size: 24px!important;}
.font-26{ font-size: 26px!important;}
.font-28{ font-size: 28px!important;}
@@ -103,6 +104,9 @@ a.decoration{text-decoration: underline}
.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;}.ml29{margin-left: 29px;}.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;}
+.ml61{
+ margin-left: 61px;
+}
.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;}
@@ -111,7 +115,6 @@ a.decoration{text-decoration: underline}
.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}
@@ -170,7 +173,7 @@ input::-ms-clear{display:none;}
.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-bottom根据底部的高度而定*/
-.newMain{ padding-bottom: 120px !important; }
+.newMain{ padding-bottom: 124px !important; }
/*高度*/
.height-100{height: 100%;}