diff --git a/public/react/src/App.js b/public/react/src/App.js index f7530989e..dfb8c89d0 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -258,7 +258,7 @@ class App extends Component { - + {/*{*/} {/* isRender === true?*/} {/* : ""*/} diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 2100ebe8d..335ab80fa 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -18,7 +18,7 @@ function locationurl(list){ } // TODO 开发期多个身份切换 -const debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : +const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' : window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin' window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/public/react/src/index.js b/public/react/src/index.js index 849f3faed..cb8cb4f94 100644 --- a/public/react/src/index.js +++ b/public/react/src/index.js @@ -1,46 +1,46 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; - -import './index.css'; -import './indexPlus.css'; -import App from './App'; - -// 加之前main.js 18.1MB -// import { message } from 'antd'; -import message from 'antd/lib/message'; -import 'antd/lib/message/style/css'; - -import { AppContainer } from 'react-hot-loader'; - -import registerServiceWorker from './registerServiceWorker'; - -import { configureUrlQuery } from 'react-url-query'; - -import history from './history'; - -// link the history used in our app to url-query so it can update the URL with it. -configureUrlQuery({ history }); -// ----------------------------------------------------------------------------------- 请求配置 - -window.__useKindEditor = false; - - -const render = (Component) => { - ReactDOM.render( - - - , - document.getElementById('root') - ); -} - - -// ReactDOM.render( -// , -// document.getElementById('root')); -// registerServiceWorker(); - -render(App); -if (module.hot) { - module.hot.accept('./App', () => { render(App) }); -} +import React from 'react'; +import ReactDOM from 'react-dom'; + +import './index.css'; +import './indexPlus.css'; +import App from './App'; + +// 加之前main.js 18.1MB +// import { message } from 'antd'; +import message from 'antd/lib/message'; +import 'antd/lib/message/style/css'; + +import { AppContainer } from 'react-hot-loader'; + +import registerServiceWorker from './registerServiceWorker'; + +import { configureUrlQuery } from 'react-url-query'; + +import history from './history'; + +// link the history used in our app to url-query so it can update the URL with it. +configureUrlQuery({ history }); +// ----------------------------------------------------------------------------------- 请求配置 + +window.__useKindEditor = false; + + +const render = (Component) => { + ReactDOM.render( + + + , + document.getElementById('root') + ); +} + + +// ReactDOM.render( +// , +// document.getElementById('root')); +// registerServiceWorker(); + +render(App); +if (module.hot) { + module.hot.accept('./App', () => { render(App) }); +} diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index 65633839a..f058c415a 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -825,6 +825,7 @@ a.white-btn.use_scope-btn:hover{ .summaryname{ /*height: 23px;*/ font-size: 22px; + height: 25px; font-family: MicrosoftYaHei; font-weight: 400; color: rgba(51,51,51,1); diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index 1928bd85b..62ec3ff2f 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -130,7 +130,7 @@ class Testpapersettinghomepage extends Component{ }) } }else { - window.open(url, '_blank'); + window.open("/api"+url, '_blank'); } }).catch((error) => { console.log(error) @@ -290,9 +290,9 @@ class Testpapersettinghomepage extends Component{ {isAdmin === true?
  • 导出
  • :""} diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 50faef559..dbc04e651 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -633,6 +633,7 @@ class Listofworks extends Component { // 获取作品列表 Getalistofworks = (homeworkid) => { // console.log("获取作品列表");7009 + let urll = `/homework_commons/${homeworkid}/works_list.json`; // console.log(homeworkid); @@ -651,6 +652,8 @@ class Listofworks extends Component { limit:20, } axios.post(urll, data).then((result) => { + + if(this.props.isNotMember()===false){ if (result !== undefined) { // console.log(url) // console.log("作品列表6789077") @@ -669,7 +672,7 @@ class Listofworks extends Component { challenges_count:result.data.challenges_count, }) this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); - } + } } }).catch((error) => { console.log(error) this.setState({ @@ -687,55 +690,57 @@ class Listofworks extends Component { //debug=t 是老师的意思 // console.log(ordervlue)7009 - var homeworkid = this.props.match.params.homeworkid; - let urll = `/homework_commons/${homeworkid}/works_list.json?`; - var order = "asc"; - if (ordervlue === "update_time") { - order = "desc"; - } - var checkedValuesines = checkedValuesine; - var checkedValuesineinfos = checkedValuesineinfo; - var searchtexts = searchtext - var data = { - search: searchtexts, - order: ordervlue, - b_order: order, - work_status: checkedValuesines, - course_group: checkedValuesineinfos, - page: page, - limit: limit, - } - // console.log("Startsorting"); - // console.log(data); - axios.post(urll, data).then((result) => { - // if (result.status === 200) {/] - // console.log(url) - // console.log("作品列表______________________") - // console.log(JSON.stringify(result)) - if (result !== undefined) { + var homeworkid = this.props.match.params.homeworkid; + let urll = `/homework_commons/${homeworkid}/works_list.json?`; + var order = "asc"; + if (ordervlue === "update_time") { + order = "desc"; + } + var checkedValuesines = checkedValuesine; + var checkedValuesineinfos = checkedValuesineinfo; + var searchtexts = searchtext + var data = { + search: searchtexts, + order: ordervlue, + b_order: order, + work_status: checkedValuesines, + course_group: checkedValuesineinfos, + page: page, + limit: limit, + } + // console.log("Startsorting"); + // console.log(data); + axios.post(urll, data).then((result) => { + // if (result.status === 200) {/] + // console.log(url) + // console.log("作品列表______________________") + // console.log(JSON.stringify(result)) + if(this.props.isNotMember()===false){ + if (result !== undefined) { + this.setState({ + teacherdata: result.data, + task_status: result.data.task_status, + course_group_info: result.data.course_group_info, + loadingstate: false, + jobsettingsdata: result, + allow_late:result.data.allow_late, + publish_immediately: result.data.publish_immediately, + work_efficiency: result.data.work_efficiency, + end_immediately: result.data.end_immediately, + code_review: result.data.code_review, + challenges_count:result.data.challenges_count, + }) + this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page); + } + } + // } + }).catch((error) => { + console.log(error) this.setState({ - teacherdata: result.data, - task_status: result.data.task_status, - course_group_info: result.data.course_group_info, - loadingstate: false, - jobsettingsdata: result, - allow_late:result.data.allow_late, - publish_immediately: result.data.publish_immediately, - work_efficiency: result.data.work_efficiency, - end_immediately: result.data.end_immediately, - code_review: result.data.code_review, - challenges_count:result.data.challenges_count, + loadingstate: false }) - this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page); - } - - // } - }).catch((error) => { - console.log(error) - this.setState({ - loadingstate: false }) - }) + } @@ -1359,7 +1364,7 @@ class Listofworks extends Component { }) } }else { - window.open(url, '_blank'); + window.open("/api"+url, '_blank'); } }).catch((error) => { console.log(error) @@ -1455,7 +1460,7 @@ class Listofworks extends Component { typs={this.state.typs} />
    -
    +

    {jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name} @@ -1467,7 +1472,7 @@ class Listofworks extends Component { 作业详情

    -
    +

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

    diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 4e9cb3e00..cb1e8b642 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -294,28 +294,32 @@ class Listofworksstudentone extends Component { course_group: "", } axios.post(urll, data).then((result) => { - if (result.status === 200) { - this.setState({ - teacherdata: result.data, - task_status: result.data.task_status, - course_group_info: result.data.course_group_info, - student_works: result.data.student_works, - jobsettingsdata: result, - publish_immediately: result.data.publish_immediately, - end_immediately: result.data.end_immediately, - id: result.data.id, - work_efficiency: result.data.work_efficiency, - code_review: result.data.code_review, - challenges_count:result.data.challenges_count, - view_report:result.data.view_report, - }) - if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { - this.seacthdata(result.data); - } else { - this.seacthdatas(result.data,result.data.student_works); - } + if (result.status === 200) { + if(this.props.isNotMember()===false) { + this.setState({ + teacherdata: result.data, + task_status: result.data.task_status, + course_group_info: result.data.course_group_info, + student_works: result.data.student_works, + jobsettingsdata: result, + publish_immediately: result.data.publish_immediately, + end_immediately: result.data.end_immediately, + id: result.data.id, + work_efficiency: result.data.work_efficiency, + code_review: result.data.code_review, + challenges_count: result.data.challenges_count, + view_report: result.data.view_report, + }) + if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { + this.seacthdata(result.data); + } else { + this.seacthdatas(result.data, result.data.student_works); + } + + } } + }).catch((error) => { console.log(error) }) @@ -703,6 +707,7 @@ class Listofworksstudentone extends Component { if (result !== undefined) { // console.log("学生公开的作品列表") // console.log(JSON.stringify(result)) + if(this.props.isNotMember()===false) { this.setState({ teacherdata: result.data, task_status: result.data.task_status, @@ -719,6 +724,7 @@ class Listofworksstudentone extends Component { }) this.seacthdata(result.data); } + } }).catch((error) => { console.log(error) this.setState({ diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 2d2babb09..60bcfa155 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -479,7 +479,7 @@ class ShixunStudentWork extends Component { }) } }else { - window.open(url, '_blank'); + window.open("/api"+url, '_blank'); } }).catch((error) => { console.log(error) @@ -609,8 +609,8 @@ class ShixunStudentWork extends Component { typs={this.state.typs} />
    -
    -

    +

    +

    {jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name} {/*{data.course_name}*/} @@ -624,7 +624,7 @@ class ShixunStudentWork extends Component { 作业详情

    -
    +

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

    diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 4dce1b5f2..646bd5f02 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -52,7 +52,7 @@ class ShixunWorkReport extends Component { }) } }else { - window.open(url, '_blank'); + window.open("/api"+url, '_blank'); } }).catch((error) => { console.log(error) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 1ff1c1170..f6b7a5c86 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -959,6 +959,14 @@ class Trainingjobsetting extends Component { this.setState({ latedeductiontwo: value, }) + //均分比例 + if(this.state.proportion==="均分比例"){ + this.Equalproportion(); + + }else if(this.state.proportion==="经验值比例"){ + this.Empiricalvalueratio(); + + } } @@ -1630,7 +1638,7 @@ class Trainingjobsetting extends Component { }) } }else { - window.open(url, '_blank'); + window.open("/api"+url, '_blank'); } }).catch((error) => { console.log(error) @@ -1711,7 +1719,7 @@ class Trainingjobsetting extends Component { modalSave={modalSave} >
    -
    +

    {jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name} @@ -1724,7 +1732,7 @@ class Trainingjobsetting extends Component {

    -
    +

    {jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name} diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index a02ec50e7..ca9d3f752 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -333,7 +333,7 @@ class Workquestionandanswer extends Component { }) } }else { - window.open(url, '_blank'); + window.open("/api"+url, '_blank'); } }).catch((error) => { console.log(error) @@ -400,7 +400,7 @@ class Workquestionandanswer extends Component { typs={this.state.typs} />

    -
    +

    {jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name} @@ -412,7 +412,7 @@ class Workquestionandanswer extends Component { 作业详情

    -
    +

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

    diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index 787acedce..b46435fe7 100644 --- a/public/react/src/modules/login/EducoderLogin.js +++ b/public/react/src/modules/login/EducoderLogin.js @@ -116,9 +116,9 @@ class EducoderLogin extends Component { }) } else if(e===2) { this.setState({ - showbool: 2, namezh:name, passmm:pass, + showbool: 2, }) }else if(e===3){ this.setState({ diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 1275cf4a0..c6a5e3076 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -317,7 +317,9 @@ class LoginDialog extends Component { }); } handleDialogClose = () => { - if(this.props.match.path==="/"){ + if(this.props.match===undefined){ + window.location.href="/"; + }else if(this.props.match.path==="/"){ this.setState({ isRender: false }) diff --git a/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js b/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js index b05732e31..f9f56a90d 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js +++ b/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js @@ -25,7 +25,7 @@ class ShixunSearchBar extends Component { super(props) this.state = { status: undefined, - diff: undefined, + diff: 0, InputValue: undefined, shixunhoverData: [], shixunchildValues:'', @@ -238,6 +238,7 @@ render() {
  • 全部
  • { shixunhoverData.map((item,key)=>{ + return(
  • {item.name} @@ -269,21 +270,48 @@ render() {
  • 筛选: -
    - {/**!/*/} + {/*/!**!/*/} + {/*/!**!/*/} + {/*/!**!/*/} + {/*/!**!/*/} + {/*/!**!/*/} + {/**/} - -
    + {/*
    */} {/*
    */} {/* { if (response !== undefined) { - this.Jumptotheinterestpage(); + // this.Jumptotheinterestpage(); + window.location.href = "/" }