diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index 4aa57355e..2fc1bbe64 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -113,21 +113,21 @@ module.exports = { // First, run the linter. // It's important to do this before Babel processes the JS. - { - test: /\.(js|jsx|mjs)$/, - enforce: 'pre', - use: [ - { - options: { - formatter: eslintFormatter, - eslintPath: require.resolve('eslint'), - - }, - loader: require.resolve('eslint-loader'), - }, - ], - include: paths.appSrc, - }, + // { + // test: /\.(js|jsx|mjs)$/, + // enforce: 'pre', + // use: [ + // { + // options: { + // formatter: eslintFormatter, + // eslintPath: require.resolve('eslint'), + // + // }, + // loader: require.resolve('eslint-loader'), + // }, + // ], + // include: paths.appSrc, + // }, { // "oneOf" will traverse all following loaders until one will // match the requirements. When no loader matches it will fall diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index 6cc84bf81..ae7f2f092 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -40,7 +40,7 @@ class Fileslistitem extends Component{ let link = document.createElement('a'); // link.href = window.URL.createObjectURL(new Blob([result.data.url])); link.href = result.data.url; - link.download = encodeURI(result.data.title); + // link.download = encodeURI(result.data.title); //兼容火狐浏览器 document.body.appendChild(link); let evt = document.createEvent("MouseEvents"); @@ -288,7 +288,16 @@ class Fileslistitem extends Component{ { discussMessage.publish_time===null?"":discussMessage.is_publish===true?moment(discussMessage.publish_time).fromNow():moment(discussMessage.publish_time).format('YYYY-MM-DD HH:mm')} - {this.props.isAdmin ||this.props.current_user.login===discussMessage.author.login? + {this.props.isAdmin? + + + + this.settingList()}>设置 + + :""} + + {this.props.current_user.login===discussMessage.author.login? diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 3912a3515..c42d8e09b 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -41,7 +41,9 @@ class Fileslists extends Component{ } componentDidMount=()=>{ this.setState({ - isSpin:true + isSpin:true, + checkBoxValues:[], + checkAllValue:false }) if(this.props.match.params.main_id){ this.seactall(); @@ -65,17 +67,21 @@ class Fileslists extends Component{ } componentDidUpdate = (prevProps) => { if(prevProps.match.params.main_id != this.props.match.params.main_id){ - this.setState({ - isSpin:true - }) + this.setState({ + isSpin:true, + checkBoxValues:[], + checkAllValue:false + }) if(this.props.match.params.main_id!=undefined){ this.seactall(); } } if(prevProps.match.params.Id != this.props.match.params.Id){ - this.setState({ - isSpin:true - }) + this.setState({ + isSpin:true, + checkBoxValues:[], + checkAllValue:false + }) if(this.props.match.params.Id!=undefined){ this.seactall(parseInt(this.props.match.params.Id),1) } @@ -533,7 +539,7 @@ class Fileslists extends Component{ // ModalSave:this.cancelmodel, // Loadtype:true, checkBoxValues:[], - // checkAllValue:false + checkAllValue:false }) this.props.showNotification('资源移动成功') @@ -681,6 +687,9 @@ class Fileslists extends Component{
{this.props.isAdmin()?
  • 删除
  • :""} {this.props.isAdmin()?
  • 发送
  • :""} + {this.props.isAdmin()? +
  • 立即发布
  • + :""} {this.props.isAdmin()?course_is_public===true?
  • 设为公开
  • :"":""} @@ -785,7 +794,7 @@ class Fileslists extends Component{ isAdmin={this.props.isAdmin()} isStudent={this.props.isStudent()} isNotMember={this.props.isNotMember()} - checkBox={} + checkBox={this.props.isAdmin()?:""} Settingtypes={(id)=>this.Settingtypes(id)} coursesId={this.props.match.params.coursesId} updatafiledfun={()=>this.updatafiled()} @@ -830,7 +839,7 @@ class Fileslists extends Component{
    diff --git a/public/react/src/modules/courses/coursesPublic/Addcourses.js b/public/react/src/modules/courses/coursesPublic/Addcourses.js index c3e579872..749e4870c 100644 --- a/public/react/src/modules/courses/coursesPublic/Addcourses.js +++ b/public/react/src/modules/courses/coursesPublic/Addcourses.js @@ -153,14 +153,14 @@ class Addcourses extends Component{ this.setState({ invite_codetype:true, invite_codevalue:"邀请码不能为空", - spinning:false + isSpin:false }) return }else{ this.setState({ invite_codetype:false, invite_codevalue:" ", - spinning:false + isSpin:false }) } @@ -217,12 +217,12 @@ class Addcourses extends Component{ } this.setState({ - spinning:false + isSpin:false }) }).catch((error) => { console.log(error) this.setState({ - spinning:false + isSpin:false }) }) @@ -313,7 +313,7 @@ class Addcourses extends Component{
  • @@ -321,7 +321,7 @@ class Addcourses extends Component{

    请输入五位课堂邀请码

    + >请输入5位课堂邀请码或6位分班邀请码

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

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

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

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

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

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

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

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

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

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

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

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

    */} +// +// {/*
    */} +// {/*
  • */} +// {/**/} +// {/*
  • */} +// {/*
    */} +// {/*
    */} +// {/*
    :""}*/} +// {/*
    */} +// {/*)*/} +// {/*})*/} +// {/*}*/} +// {/*
    */} +// {/*
    */} +// {/**/} +// diff --git a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js index 8b7bbb544..056414904 100644 --- a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js +++ b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js @@ -87,7 +87,7 @@ class ShixunWorkModal extends Component{ let {page,limit,group_list}=this.state; let newpage=page+1; let newgroup_list=group_list; - + debugger let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json"; axios.get(url,{params:{ @@ -97,7 +97,7 @@ class ShixunWorkModal extends Component{ }).then((response) => { if(response!==null || response!==undefined){ if(response.data.group_list.length>0){ - console.log("84"); + response.data.group_list.map((item,key)=>{ newgroup_list.push(item); this.setState({ @@ -111,8 +111,7 @@ class ShixunWorkModal extends Component{ if(response.data.ungroup_list===undefined || response.data.ungroup_list === null) { }else { - console.log("95"); - console.log(response.data.ungroup_list); + newgroup_list.push(response.data.ungroup_list); this.setState({ course_groups:response.data, @@ -244,24 +243,23 @@ class ShixunWorkModal extends Component{ .fontlefts{text-align: left;} `} {course_groups===undefined?"":