add @loadable/component

dev_aliyun2
harry 5 years ago
parent 07a373c99f
commit 00890c04e1

@ -14,7 +14,7 @@ const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
module.exports = override(
disableEsLint(),
addBundleVisualizer(),
//addBundleVisualizer(),
addWebpackAlias({
"educoder": path.resolve(__dirname, 'src/common/educoder.js')
}),

File diff suppressed because one or more lines are too long

@ -1510,6 +1510,15 @@
"@types/yargs": "^13.0.0"
}
},
"@loadable/component": {
"version": "5.12.0",
"resolved": "https://registry.npm.taobao.org/@loadable/component/download/@loadable/component-5.12.0.tgz",
"integrity": "sha1-NNBW0V9T3AjQTpIDytaGfPT3MGw=",
"requires": {
"@babel/runtime": "^7.7.7",
"hoist-non-react-statics": "^3.3.1"
}
},
"@mrmlnc/readdir-enhanced": {
"version": "2.2.1",
"resolved": "http://registry.npm.taobao.org/@mrmlnc/readdir-enhanced/download/@mrmlnc/readdir-enhanced-2.2.1.tgz",

@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@loadable/component": "^5.12.0",
"@novnc/novnc": "^1.1.0",
"antd": "^3.26.12",
"axios": "^0.19.2",

@ -18,7 +18,7 @@ import AccountProfile from "./modules/user/AccountProfile";
import Accountnewprofile from './modules/user/Accountnewprofile';
import Certifiedprofessional from './modules/modals/Certifiedprofessional';
import Loading from './Loading'
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import moment from 'moment'

@ -1,4 +1,4 @@
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from "./Loading";

@ -72,3 +72,11 @@ export { default as NoneData } from '../modules/courses/coursesPublic/NoneData'
export { default as WordNumberTextarea } from '../modules/modals/WordNumberTextarea'
import loadable from '@loadable/component'
export function Loadable({ loader, loading }) {
return loadable(loader, {
fallback: loading
})
}

@ -4,7 +4,7 @@ import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import Loading from '../../Loading';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import TPMIndexHOC from '../tpm/TPMIndexHOC';

@ -4,7 +4,7 @@ import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import Loading from '../../Loading';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import TPMIndexHOC from '../tpm/TPMIndexHOC';

@ -1,23 +1,13 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import PropTypes from 'prop-types';
import classNames from 'classnames'
import { getImageUrl, toPath, getUrl,getUploadActionUrl } from 'educoder';
import { getUploadActionUrl } from 'educoder';
import './CommentItemMDEditor.css'
const $ = window.$;
const _origin = window.location.origin;
class CommentItemMDEditor extends Component {
componentDidUpdate(prevProps) {
const { item, currentReplyComment } = this.props;
if ( prevProps.showReplyEditorFlag != this.props.showReplyEditorFlag &&
currentReplyComment && currentReplyComment.id == item.id ) {
if (prevProps.showReplyEditorFlag != this.props.showReplyEditorFlag &&
currentReplyComment && currentReplyComment.id == item.id) {
this.showOrHideEditor(currentReplyComment)
}
}
@ -33,45 +23,45 @@ class CommentItemMDEditor extends Component {
const initMD_ID = `reply_message_editorMd_${commentId}`
const view_selector = `.commentItemMDEditorView_${commentId}`
const commitBtnSelector = `#commitBtn_${commentId}`
if( $(`#${initMD_ID} textarea`).length === 1 ) { // 没有初始化
const placeholder = '我要回复...'
// const imageUrl = `/upload_with_markdown?container_id=${commentId}&container_type=Memo`;
const imageUrl = `${getUploadActionUrl()}`;
const otherOptions = {
watch: false,
htmlDecode: "style,script,iframe", // you can filter tags decode
// taskList: true,
mode: 'markdown',
toolbar: true,
markdown: '',
readOnly: false,
if ($(`#${initMD_ID} textarea`).length === 1) { // 没有初始化
const placeholder = '我要回复...'
// const imageUrl = `/upload_with_markdown?container_id=${commentId}&container_type=Memo`;
const imageUrl = `${getUploadActionUrl()}`;
const otherOptions = {
watch: false,
htmlDecode: "style,script,iframe", // you can filter tags decode
// taskList: true,
mode: 'markdown',
toolbar: true,
markdown: '',
readOnly: false,
// preview: false,
tex: true, // 数学公式
flowChart: false, // 默认不解析
sequenceDiagram: false, // 默认不解析
dialogLockScreen: false,
}
tex: true, // 数学公式
flowChart: false, // 默认不解析
sequenceDiagram: false, // 默认不解析
dialogLockScreen: false,
}
const commentMDEditor = window.create_editorMD_4comment(`${initMD_ID}`, '', 120, placeholder, imageUrl, () => {
// onload callback
commentMDEditor.cm.focus()
window.initMDEditorDragResize(".editor__resize", commentMDEditor, {
initHeight: 120
initHeight: 120
})
}, otherOptions);
}, otherOptions);
commentMDEditor.state.preview = false;
this.commentMDEditor = commentMDEditor;
$('.commentItemMDEditorView').hide();
$(view_selector).show();
}else { // 初始化了,显示隐藏切换
} else { // 初始化了,显示隐藏切换
if ($(reply_message_el).is(':visible')) {
$( view_selector ).hide()
$(view_selector).hide()
} else {
$('.commentItemMDEditorView').hide();
@ -80,7 +70,7 @@ class CommentItemMDEditor extends Component {
window._currentChildcommentMDEditor && window._currentChildcommentMDEditor.resize()
// 自动focus
setTimeout(()=>{
setTimeout(() => {
this.commentMDEditor && this.commentMDEditor.cm && this.commentMDEditor.cm.focus()
this.commentMDEditor.resize() // 解决切换显示、隐藏多次后出现的样式错乱的问题
}, 200)
@ -91,48 +81,50 @@ class CommentItemMDEditor extends Component {
}
onCommit = () => {
window.$(document).trigger("onReply", { commentContent: this.commentMDEditor.getValue()
, id: this.props.item.id, editor: this.commentMDEditor } );
window.$(document).trigger("onReply", {
commentContent: this.commentMDEditor.getValue()
, id: this.props.item.id, editor: this.commentMDEditor
});
}
render() {
const { match, history, item, user, buttonText } = this.props
if (!item) {
return <div></div>
}
return (
<div className={`commentItemMDEditorView commentItemMDEditorView_${item.id}`} style={{display:'none'}}>
<div className="homepagePostReplyPortrait mr15 fl imageFuzzy" id="reply_image_3097"
style={{ marginTop: '2px', marginRight: '-20px' }} >
<a href={`${user.user_url}`} target="_blank" alt="用户头像">
{/* 'https://testeduplus2.educoder.net/images/avatars/User/50571'|| */}
<img alt="0?1442652658" height="33" src={`/images/${user.image_url}`} width="33"></img>
</a>
</div>
<div id={`reply_message_${item.id}`} className="reply_to_message commentItemMDEditor editormd-image-click-expand"
style={{ paddingTop: '0px', paddingBottom: '0px', marginTop: '36px' }}
>
<div id={`reply_message_editorMd_${item.id}`} className="editorMD" style={{ marginBottom: '0px'}}>
<textarea style={{'display': 'none'}}>
</textarea>
</div>
<div className="editor__resize" href="javascript:void(0);" style={{display: ''}}>调整高度</div>
render() {
const { match, history, item, user, buttonText } = this.props
if (!item) {
return <div></div>
}
return (
<div className={`commentItemMDEditorView commentItemMDEditorView_${item.id}`} style={{ display: 'none' }}>
<div className="homepagePostReplyPortrait mr15 fl imageFuzzy" id="reply_image_3097"
style={{ marginTop: '2px', marginRight: '-20px' }} >
<a href={`${user.user_url}`} target="_blank" alt="用户头像">
{/* 'https://testeduplus2.educoder.net/images/avatars/User/50571'|| */}
<img alt="0?1442652658" height="33" src={`/images/${user.image_url}`} width="33"></img>
</a>
</div>
<div id={`reply_message_${item.id}`} className="reply_to_message commentItemMDEditor editormd-image-click-expand"
style={{ paddingTop: '0px', paddingBottom: '0px', marginTop: '36px' }}
>
<div id={`reply_message_editorMd_${item.id}`} className="editorMD" style={{ marginBottom: '0px' }}>
<textarea style={{ 'display': 'none' }}>
</textarea>
</div>
<div className="editor__resize" href="javascript:void(0);" style={{ display: '' }}>调整高度</div>
<div class="clearfix">
<a id={`commitBtn_${item.id}`} href="javascript:void(0)"
onClick={this.onCommit} style={{ marginRight: '44px' }}
className="commentsbtn task-btn task-btn-blue fr " style={{display: ''}}>
{ buttonText || '发送'}
<a id={`commitBtn_${item.id}`} href="javascript:void(0)"
onClick={this.onCommit} style={{ marginRight: '44px' }}
className="commentsbtn task-btn task-btn-blue fr " style={{ display: '' }}>
{buttonText || '发送'}
</a>
</div>
</div>
</div>
);
}
</div>
</div>
);
}
}
export default ( CommentItemMDEditor );
export default (CommentItemMDEditor);
// style={{ margin: '10px 44px', marginBottom: '0px'}}

@ -4,7 +4,7 @@ import { Route, Switch } from "react-router-dom";
import Loading from '../../Loading';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import TPMIndexHOC from '../tpm/TPMIndexHOC';
import CNotificationHOC from '../courses/common/CNotificationHOC';

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import { Route, Switch } from 'react-router-dom';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../Loading';
import CNotificationHOC from './common/CNotificationHOC'
import "./css/Courses.css"

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import { Route, Switch } from 'react-router-dom';
import { withRouter } from 'react-router'
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../Loading';
import axios from 'axios';
import TPMIndexHOC from '../tpm/TPMIndexHOC';

@ -1,8 +1,8 @@
import React, { Component } from 'react';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import {Input,Pagination,Tooltip} from 'antd';
import Loadable from 'react-loadable';
import { Input, Pagination, Tooltip } from 'antd';
import { Loadable } from 'educoder';
import Loading from '../../Loading';
import Guide from "../../modules/courses/shixunHomework/Guide";
//业务组件
@ -12,63 +12,63 @@ import Coursesleftnav from "./coursesDetail/CoursesLeftNav";
//普通作业
const CommonWork = Loadable({
loader: () => import('./busyWork/commonWork'),
loading:Loading,
loading: Loading,
})
const GroupWork= Loadable({
loader: () => import('./busyWork/commonWork'),
loading: Loading,
const GroupWork = Loadable({
loader: () => import('./busyWork/commonWork'),
loading: Loading,
})
// 讨论
const Boards= Loadable({
const Boards = Loadable({
loader: () => import('./boards'),
loading: Loading,
})
//教师列表
const TeacherList= Loadable({
loader: () => import('./members/teacherList'),
loading: Loading,
const TeacherList = Loadable({
loader: () => import('./members/teacherList'),
loading: Loading,
})
//学生列表
const StudentsList= Loadable({
loader: () => import('./members/studentsList'),
loading: Loading,
const StudentsList = Loadable({
loader: () => import('./members/studentsList'),
loading: Loading,
});
//分班列表
const CourseGroupList= Loadable({
loader: () => import('./members/CourseGroupList'),
loading: Loading,
const CourseGroupList = Loadable({
loader: () => import('./members/CourseGroupList'),
loading: Loading,
});
const Eduinforms= Loadable({
const Eduinforms = Loadable({
loader: () => import('./gradinforms/Eduinforms'),
loading: Loading,
});
//2019.10.29 统计
const Statistics=Loadable({
loader: () => import('./statistics/Statistics'),
loading: Loading,
const Statistics = Loadable({
loader: () => import('./statistics/Statistics'),
loading: Loading,
});
const Elearning= Loadable({
const Elearning = Loadable({
loader: () => import('./elearning/Elearning'),
loading: Loading,
});
//
const Exercise= Loadable({
loader: () => import('./exercise/Exercise'),
loading: Loading,
const Exercise = Loadable({
loader: () => import('./exercise/Exercise'),
loading: Loading,
})
//
const Poll= Loadable({
loader: () => import('./poll/Poll'),
loading: Loading,
const Poll = Loadable({
loader: () => import('./poll/Poll'),
loading: Loading,
})
// 资源
const Resourcelist= Loadable({
loader: () => import('./Resource/index'),
loading: Loading,
const Resourcelist = Loadable({
loader: () => import('./Resource/index'),
loading: Loading,
})
// 视频
@ -78,41 +78,41 @@ const CourseVideo = Loadable({
})
//实训作业
const ShixunHomework= Loadable({
loader: () => import('./shixunHomework/shixunHomework'),
loading: Loading,
const ShixunHomework = Loadable({
loader: () => import('./shixunHomework/shixunHomework'),
loading: Loading,
})
const GraduationTopics= Loadable({
loader: () => import('./graduation/topics'),
loading: Loading,
const GraduationTopics = Loadable({
loader: () => import('./graduation/topics'),
loading: Loading,
})
const GraduationTasks= Loadable({
loader: () => import('./graduation/tasks'),
loading: Loading,
const GraduationTasks = Loadable({
loader: () => import('./graduation/tasks'),
loading: Loading,
})
class ListPageIndex extends Component{
class ListPageIndex extends Component {
constructor(props) {
super(props);
this.state={
yslGuideone:undefined,
yslElearning:false,
isexcellent:false
this.state = {
yslGuideone: undefined,
yslElearning: false,
isexcellent: false
}
}
comyslElearning(bool){
if(bool===true){
comyslElearning(bool) {
if (bool === true) {
this.setState({
yslElearning:true,
yslElearning: true,
})
}else {
} else {
this.setState({
yslElearning:false,
yslElearning: false,
})
}
}
componentDidMount(){
componentDidMount() {
// console.log("77");
var yslGuideone = window.localStorage.getItem('yslGuideone');
// console.log("78");
@ -121,18 +121,18 @@ class ListPageIndex extends Component{
if (yslGuideone === "true") {
// console.log("true 字符串");
this.setState({
yslGuideone:true,
yslGuideone: true,
})
} else {
this.setState({
yslGuideone:false,
yslGuideone: false,
});
// console.log("false 字符串");
}
}catch (e) {
} catch (e) {
console.log(e);
this.setState({
yslGuideone:false,
yslGuideone: false,
});
}
@ -146,227 +146,227 @@ class ListPageIndex extends Component{
// navttype:newselectnavid
// })
// }
componentWillUnmount(){
componentWillUnmount() {
// window.localStorage.setItem('yslGuideone', "false");
}
setwindowlocal=(bool)=>{
window.localStorage.setItem('yslGuideone', bool);
setwindowlocal = (bool) => {
window.localStorage.setItem('yslGuideone', bool);
try {
if (bool === "true") {
this.setState({
yslGuideone:true,
yslGuideone: true,
})
} else {
this.setState({
yslGuideone:false,
yslGuideone: false,
});
}
}catch (e) {
} catch (e) {
// console.log(e);
this.setState({
yslGuideone:false,
yslGuideone: false,
});
}
}
ispostexcellenttype=(excellent)=>{
this.setState({
isexcellent:excellent
})
}
updatabanners=()=>{
}
ispostexcellenttype = (excellent) => {
this.setState({
isexcellent: excellent
})
}
updatabanners = () => {
this.refs.CoursesBanner.updatabanner()
}
render() {
let {yslGuideone} =this.state;
let { yslGuideone } = this.state;
// console.log("98");
// console.log(yslGuideone);
// console.log(this.props.isAdmin());
// // var yslGuideones = window.sessionStorage.getItem('yslGuideone');
// console.log(this.props);
// console.log(this.props.location.search);
return (
return (
<div>
<div className="newMain clearfix">
{/*头部banner*/}
<CoursesBanner ref={"CoursesBanner"} {...this.props} ispostexcellenttype={(excellent)=>this.ispostexcellenttype(excellent)}></CoursesBanner>
{/*下面是指引哦*/}
{/*{yslGuideone!==undefined?*/}
{/*(*/}
{/* yslGuideone===true?*/}
{/* <Guide*/}
{/* setwindowlocal={(b)=>this.setwindowlocal(b)}*/}
{/* >*/}
{/* </Guide>*/}
{/* :""*/}
{/* )*/}
{/* :""*/}
{/*}*/}
<div className="educontent clearfix" style={{flex: "1 0 auto"}}>
<div className="stud-class-set">
<div className="news">
<div className="edu-class-inner container clearfix">
<div className="member for-content-0 for-content">
<div className="people clearfix mb60">
{/*left_nav*/}
<div className={"with22 fl setleft"} style={{width:'264px',minHeight:'500px'}}>
<Coursesleftnav {...this.props} {...this.state} comyslElearning={(i)=>this.comyslElearning(i)}/>
</div>
{/*right_concent*/}
<div className="with78 fl">
<div className={"ml20 clearfix"}>
<Switch {...this.props}>
{/* --------------------------------------------------------------------- */}
{/* 作业设置 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */}
{/* 普通作业 */}
<Route path="/courses/:coursesId/common_homeworks/:category_id"
render={
(props) => (<CommonWork {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 作品列表 */}
<Route path="/courses/:coursesId/group_homeworks/:category_id"
render={
(props) => (<CommonWork {...this.props} {...props} {...this.state} />)
}
></Route>
<Route exact path="/courses/:coursesId/boards/:boardId"
render={
(props) => (<Boards {...this.props} {...props} {...this.state} />)
}
></Route>
{/*视频列表*/}
<Route path="/courses/:coursesId/course_videos"
render={
(props) => (<CourseVideo {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/teachers"
render={
(props) => (<TeacherList updatabanners={()=>this.updatabanners()} {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 学生列表*/}
<Route path="/courses/:coursesId/students"
render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/course_groups/:course_group_id"
render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/course_groups"
render={
(props) => (<CourseGroupList {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/exercises/:Id"
render={
(props) => (<Exercise {...this.props} {...props} {...this.state} />)
}
></Route>
<div className="newMain clearfix">
{/*头部banner*/}
<CoursesBanner ref={"CoursesBanner"} {...this.props} ispostexcellenttype={(excellent) => this.ispostexcellenttype(excellent)}></CoursesBanner>
{/*下面是指引哦*/}
{/*{yslGuideone!==undefined?*/}
{/*(*/}
{/* yslGuideone===true?*/}
{/* <Guide*/}
{/* setwindowlocal={(b)=>this.setwindowlocal(b)}*/}
{/* >*/}
{/* </Guide>*/}
{/* :""*/}
{/* )*/}
{/* :""*/}
{/*}*/}
<div className="educontent clearfix" style={{ flex: "1 0 auto" }}>
<div className="stud-class-set">
<div className="news">
<div className="edu-class-inner container clearfix">
<div className="member for-content-0 for-content">
<div className="people clearfix mb60">
{/*left_nav*/}
<div className={"with22 fl setleft"} style={{ width: '264px', minHeight: '500px' }}>
<Coursesleftnav {...this.props} {...this.state} comyslElearning={(i) => this.comyslElearning(i)} />
</div>
<Route path="/courses/:coursesId/polls/:Id"
render={
(props) => (<Poll {...this.props} {...props} {...this.state} />)
}
></Route>
{/* <Route path="/courses/:coursesId/file/:Id"
{/*right_concent*/}
<div className="with78 fl">
<div className={"ml20 clearfix"}>
<Switch {...this.props}>
{/* --------------------------------------------------------------------- */}
{/* 作业设置 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */}
{/* 普通作业 */}
<Route path="/courses/:coursesId/common_homeworks/:category_id"
render={
(props) => (<CommonWork {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 作品列表 */}
<Route path="/courses/:coursesId/group_homeworks/:category_id"
render={
(props) => (<CommonWork {...this.props} {...props} {...this.state} />)
}
></Route>
<Route exact path="/courses/:coursesId/boards/:boardId"
render={
(props) => (<Boards {...this.props} {...props} {...this.state} />)
}
></Route>
{/*视频列表*/}
<Route path="/courses/:coursesId/course_videos"
render={
(props) => (<CourseVideo {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/teachers"
render={
(props) => (<TeacherList updatabanners={() => this.updatabanners()} {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 学生列表*/}
<Route path="/courses/:coursesId/students"
render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/course_groups/:course_group_id"
render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/course_groups"
render={
(props) => (<CourseGroupList {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/exercises/:Id"
render={
(props) => (<Exercise {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/polls/:Id"
render={
(props) => (<Poll {...this.props} {...props} {...this.state} />)
}
></Route>
{/* <Route path="/courses/:coursesId/file/:Id"
render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
}
></Route> */}
{/* 实训作业子页面*/}
<Route path="/courses/:coursesId/shixun_homework/:category_id"
render={
(props) => (<ShixunHomework {...this.props} {...props} {...this.state} />)
}
></Route>
{/*课堂统计列表2019.10.29 */}
<Route path="/courses/:coursesId/statistics"
render={
(props) => (<Statistics {...this.props} {...props} {...this.state} />)
}
></Route>
{/*公告栏列表*/}
<Route path="/courses/:coursesId/informs"
render={
(props) => (<Eduinforms {...this.props} {...props} {...this.state} />)
}
></Route>
{/*在线学习*/}
<Route
path="/courses/:coursesId/online_learning"
render={
(props) => (<Elearning {...this.props} {...props} {...this.state} comyslElearning={(i)=>this.comyslElearning(i)} />)
}
>
</Route>
{/* 实训作业页面*/}
<Route path="/courses/:coursesId/shixun_homeworks/:main_id"
render={
(props) => (<ShixunHomework {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/files/:main_id"
render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/file/:Id"
render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/graduation_topics/:Id"
render={
(props) => (<GraduationTopics {...this.props} {...props} {...this.state} />)
}></Route>
<Route path="/courses/:coursesId/graduation_tasks/:Id"
render={
(props) => (<GraduationTasks {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 默认 */}
<Route path="/courses/:coursesId"
render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />)
}
></Route>
</Switch>
</div>
</div>
</div>
</div>
</div>
{/* 实训作业子页面*/}
<Route path="/courses/:coursesId/shixun_homework/:category_id"
render={
(props) => (<ShixunHomework {...this.props} {...props} {...this.state} />)
}
></Route>
{/*课堂统计列表2019.10.29 */}
<Route path="/courses/:coursesId/statistics"
render={
(props) => (<Statistics {...this.props} {...props} {...this.state} />)
}
></Route>
{/*公告栏列表*/}
<Route path="/courses/:coursesId/informs"
render={
(props) => (<Eduinforms {...this.props} {...props} {...this.state} />)
}
></Route>
{/*在线学习*/}
<Route
path="/courses/:coursesId/online_learning"
render={
(props) => (<Elearning {...this.props} {...props} {...this.state} comyslElearning={(i) => this.comyslElearning(i)} />)
}
>
</Route>
{/* 实训作业页面*/}
<Route path="/courses/:coursesId/shixun_homeworks/:main_id"
render={
(props) => (<ShixunHomework {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/files/:main_id"
render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/file/:Id"
render={
(props) => (<Resourcelist {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/graduation_topics/:Id"
render={
(props) => (<GraduationTopics {...this.props} {...props} {...this.state} />)
}></Route>
<Route path="/courses/:coursesId/graduation_tasks/:Id"
render={
(props) => (<GraduationTasks {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 默认 */}
<Route path="/courses/:coursesId"
render={
(props) => (<StudentsList {...this.props} {...props} {...this.state} />)
}
></Route>
</Switch>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
)
}

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { Route, Switch } from 'react-router-dom';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../../Loading';
import { WordsBtn, trigger, queryString, getRandomcode } from 'educoder';
import axios from 'axios';

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../../Loading';
import CNotificationHOC from '../common/CNotificationHOC'
import { RouteHOC } from './common'

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../../Loading';
import CNotificationHOC from '../common/CNotificationHOC'
import { RouteHOC } from './common'

@ -4,7 +4,7 @@ import { Route, Switch } from "react-router-dom";
import Loading from '../../Loading';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import TPMIndexHOC from '../tpm/TPMIndexHOC';
import CNotificationHOC from '../courses/common/CNotificationHOC';

@ -1,10 +1,10 @@
import React, {Component} from "react";
import {BrowserRouter as Router,Route,Switch,Link, NavLin} from 'react-router-dom';
import {WordsBtn, ActionBtn,getImageUrl} from 'educoder';
import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd";
import React, { Component } from "react";
import { BrowserRouter as Router, Route, Switch, Link, NavLin } from 'react-router-dom';
import { WordsBtn, ActionBtn, getImageUrl } from 'educoder';
import { Input, Checkbox, Table, Pagination, Modal, Menu, Tooltip, Spin, Button, Form } from "antd";
import axios from 'axios';
import BanksMenu from '../../user/usersInfo/banks/banksMenu'
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../../Loading';
import '../css/members.css';
import "../common/formCommon.css";
@ -22,12 +22,12 @@ class Completetaskpage extends Component {
constructor(props) {
super(props);
// this.answerMdRef = React.createRef();
this.state={
workid:1,
isSpin:false,
datas:[],
visible:false,
banksMenu:undefined
this.state = {
workid: 1,
isSpin: false,
datas: [],
visible: false,
banksMenu: undefined
}
}
@ -37,89 +37,89 @@ class Completetaskpage extends Component {
// console.log("父组件加载框");
this.getonedata();
}
getonedata(){
if( this.props.match.params.workid){
getonedata() {
if (this.props.match.params.workid) {
this.setState({
workid: this.props.match.params.workid,
workid: this.props.match.params.workid,
})
}
this.getdata(this.props.match.params.workid);
}
// 获取数据的地方
getdata=(workid)=>{
var workids= workid;
if(workids){
getdata = (workid) => {
var workids = workid;
if (workids) {
}else{
workids=this.state.workid;
} else {
workids = this.state.workid;
}
this.setState({
isSpin:true,
isSpin: true,
})
let url = `/task_banks/${workids}.json`;
//
axios.get(url).then((response) => {
if(response){
if(response.data){
if (response) {
if (response.data) {
this.setState({
datas:response.data,
datas: response.data,
});
try {
const crumbData={
title:response && response.data && response.data.name,
is_public:response && response.data && response.data.is_public,
crumbArray:[
{content:'详情'}
const crumbData = {
title: response && response.data && response.data.name,
is_public: response && response.data && response.data.is_public,
crumbArray: [
{ content: '详情' }
]
};
const menuData={
tab:'0',//tab选中的index
menuArray:[//tab以及tab路由
{to:`/banks/gtask/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'},
const menuData = {
tab: '0',//tab选中的index
menuArray: [//tab以及tab路由
{ to: `/banks/gtask/${workids}/${this.props.match.params.type}?tab=0`, content: '内容详情' },
],
category:'gtask',//毕设选题
tos:`/banks/gtask/${workids}/edit/${this.props.match.params.type}?tab=0`,
id:workids,
is_public:response && response.data && response.data.is_public,
type:this.props.match.params.type,
authorize:response && response.data && response.data.authorize,
category: 'gtask',//毕设选题
tos: `/banks/gtask/${workids}/edit/${this.props.match.params.type}?tab=0`,
id: workids,
is_public: response && response.data && response.data.is_public,
type: this.props.match.params.type,
authorize: response && response.data && response.data.authorize,
}
this.setState({
banksMenu:menuData
banksMenu: menuData
})
this.props.initPublic(crumbData,response.data);
}catch (e) {
this.props.initPublic(crumbData, response.data);
} catch (e) {
}
}else {
} else {
this.setState({
datas:[],
datas: [],
})
}
}else {
} else {
this.setState({
datas:[],
datas: [],
})
}
this.setState({
isSpin:false,
isSpin: false,
})
}).catch((error) => {
console.log(error)
this.setState({
datas:[],
isSpin:false,
datas: [],
isSpin: false,
})
});
}
render() {
let {datas} = this.state;
let{
let { datas } = this.state;
let {
banksMenu
}=this.state;
} = this.state;
return (
<React.Fragment>
@ -134,14 +134,14 @@ class Completetaskpage extends Component {
}
<Switch {...this.props}>
<Route path={`/banks/gtask/:workid/${this.props.match.params.type}`}
render={
(props) => {
return (<Completetaskdetails {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
render={
(props) => {
return (<Completetaskdetails {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
</Switch>
</div>
</React.Fragment>
</React.Fragment>
)
}
}

@ -1,10 +1,10 @@
import React, {Component} from "react";
import {BrowserRouter as Router,Route,Switch,Link, NavLin} from 'react-router-dom';
import {WordsBtn, ActionBtn,getImageUrl} from 'educoder';
import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd";
import React, { Component } from "react";
import { BrowserRouter as Router, Route, Switch, Link, NavLin } from 'react-router-dom';
import { WordsBtn, ActionBtn, getImageUrl } from 'educoder';
import { Input, Checkbox, Table, Pagination, Modal, Menu, Tooltip, Spin, Button, Form } from "antd";
import axios from 'axios';
import BanksMenu from '../../user/usersInfo/banks/banksMenu'
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../../Loading';
import '../css/members.css';
import "../common/formCommon.css";
@ -20,110 +20,110 @@ class CompletetopicdePage extends Component {
constructor(props) {
super(props);
// this.answerMdRef = React.createRef();
this.state={
workid:1,
isSpin:false,
datas:[],
visible:false,
banksMenu:undefined
}
this.state = {
workid: 1,
isSpin: false,
datas: [],
visible: false,
banksMenu: undefined
}
}
componentDidMount() {
if( this.props.match.params.workid){
if (this.props.match.params.workid) {
this.setState({
workid: this.props.match.params.workid,
workid: this.props.match.params.workid,
})
}
this.getdata(this.props.match.params.workid);
}
//获取数据的地方
getdata=(workid)=>{
var workids= workid;
if(workids){
getdata = (workid) => {
var workids = workid;
if (workids) {
}else{
workids=this.state.workid;
} else {
workids = this.state.workid;
}
this.setState({
isSpin:true,
isSpin: true,
})
let url = `/gtopic_banks/${workids}.json`;
//
axios.get(url).then((response) => {
if(response){
if(response.data){
if (response) {
if (response.data) {
this.setState({
datas:response.data,
datas: response.data,
});
try {
const crumbData={
title:response && response.data && response.data.name,
is_public:response && response.data && response.data.is_public,
crumbArray:[
{content:'详情'}
const crumbData = {
title: response && response.data && response.data.name,
is_public: response && response.data && response.data.is_public,
crumbArray: [
{ content: '详情' }
]
}
const menuData={
tab:'0',//tab选中的index
menuArray:[//tab以及tab路由
{to:`/banks/gtopic/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'},
const menuData = {
tab: '0',//tab选中的index
menuArray: [//tab以及tab路由
{ to: `/banks/gtopic/${workids}/${this.props.match.params.type}?tab=0`, content: '内容详情' },
],
category:'gtopic',//毕设选题
tos:`/banks/gtopic/${workids}/edit/${this.props.match.params.type}?tab=0`,
id:workids,
is_public:response && response.data && response.data.is_public,
type:this.props.match.params.type,
authorize:response && response.data && response.data.authorize,
category: 'gtopic',//毕设选题
tos: `/banks/gtopic/${workids}/edit/${this.props.match.params.type}?tab=0`,
id: workids,
is_public: response && response.data && response.data.is_public,
type: this.props.match.params.type,
authorize: response && response.data && response.data.authorize,
}
this.setState({
banksMenu:menuData
banksMenu: menuData
})
this.props.initPublic(crumbData,response.data);
}catch (e) {
this.props.initPublic(crumbData, response.data);
} catch (e) {
}
}else {
} else {
this.setState({
datas:[],
datas: [],
})
}
}else {
} else {
this.setState({
datas:[],
datas: [],
})
}
this.setState({
isSpin:false,
isSpin: false,
})
}).catch((error) => {
console.log(error)
this.setState({
datas:[],
isSpin:false,
datas: [],
isSpin: false,
})
});
}
render() {
let {tab,datas,visible} = this.state;
let { tab, datas, visible } = this.state;
let{
let {
banksMenu
}=this.state
} = this.state
//
// const common={
// initPublic:this.initPublic,
// }
return (
<React.Fragment>
<div className="pd30">
<div className="pd30">
{
banksMenu &&
<BanksMenu
@ -134,11 +134,11 @@ class CompletetopicdePage extends Component {
}
<Switch {...this.props}>
<Route path={`/banks/gtopic/:workid/${this.props.match.params.type}`}
render={
(props) => {
return (<Completetopicdetails {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
render={
(props) => {
return (<Completetopicdetails {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
</Switch>
</div>
</React.Fragment>

@ -1,10 +1,10 @@
import React, { Component } from 'react';
import {getRandomNumber} from 'educoder';
import {Link} from 'react-router-dom';
import {Tooltip,Menu} from 'antd';
import Loadable from 'react-loadable';
import { getRandomNumber } from 'educoder';
import { Link } from 'react-router-dom';
import { Tooltip, Menu } from 'antd';
import { Loadable } from 'educoder';
import Loading from '../../../../Loading';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import axios from 'axios';
import OneSelfOrderModal from "../../coursesPublic/OneSelfOrderModal";
import HomeworkModal from "../../coursesPublic/HomeworkModal";
@ -20,81 +20,81 @@ import Modals from '../../../modals/Modals';
//毕设描述
const GraduationTasksquestions= Loadable({
const GraduationTasksquestions = Loadable({
loader: () => import('./GraduationTaskssettingquestions'),
loading: Loading,
})
//毕设任务设置
const GraduationTaskssetting=Loadable({
const GraduationTaskssetting = Loadable({
loader: () => import('./GraduationTaskssetting'),
loading: Loading,
})
//毕设任务列表
const GraduationTaskslist=Loadable({
const GraduationTaskslist = Loadable({
loader: () => import('./GraduationTaskssettinglist'),
loading: Loading,
})
class GraduationTaskDetail extends Component{
constructor(props){
class GraduationTaskDetail extends Component {
constructor(props) {
super(props);
this.state={
modalname:undefined,
visible:false,
Topval:undefined,
starttime:undefined,
starttimes:undefined,
typs:undefined,
endtime:undefined,
Cancelname:undefined,
Savesname:undefined,
Cancel:undefined,
Saves:undefined,
Topvalright:undefined,
Botvalleft:undefined,
course_groupslist:undefined,
course_groups:undefined,
questionslist:undefined,
tab:"list",
visibles:undefined,
Modalstype:undefined,
Modalstopval:undefined,
ModalCancel:undefined,
ModalSave:undefined,
acrossVisible:undefined,
OneSelftype:false,
taskdatas:undefined
this.state = {
modalname: undefined,
visible: false,
Topval: undefined,
starttime: undefined,
starttimes: undefined,
typs: undefined,
endtime: undefined,
Cancelname: undefined,
Savesname: undefined,
Cancel: undefined,
Saves: undefined,
Topvalright: undefined,
Botvalleft: undefined,
course_groupslist: undefined,
course_groups: undefined,
questionslist: undefined,
tab: "list",
visibles: undefined,
Modalstype: undefined,
Modalstopval: undefined,
ModalCancel: undefined,
ModalSave: undefined,
acrossVisible: undefined,
OneSelftype: false,
taskdatas: undefined
}
}
componentDidMount(){
componentDidMount() {
this.getdatas()
}
getdatas=()=>{
getdatas = () => {
const task_Id = this.props.match.params.task_Id;
let url="/graduation_tasks/"+task_Id+".json";
let url = "/graduation_tasks/" + task_Id + ".json";
axios.get(url).then((result)=>{
if(result.status===200){
axios.get(url).then((result) => {
if (result.status === 200) {
this.setState({
questionslist:result.data
questionslist: result.data
})
}
}).catch((error)=>{
}).catch((error) => {
console.log(error)
})
}
// 交叉评阅设置弹框
openAcross=()=>{
openAcross = () => {
this.setState({
acrossVisible:true
acrossVisible: true
})
}
closeAcross=()=>{
closeAcross = () => {
this.setState({
acrossVisible:false
acrossVisible: false
})
this.getdatas()
}
@ -102,7 +102,7 @@ class GraduationTaskDetail extends Component{
//返回
goback=()=>{
goback = () => {
// let courseId=this.props.match.params.coursesId;
// let category_id=this.props.match.params.category_id;
// window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id;
@ -117,48 +117,48 @@ class GraduationTaskDetail extends Component{
this.props.history.replace(`/courses/${this.state.questionslist.course_id}/graduation_tasks/${this.state.questionslist.graduation_id}`);
}
setend_time=(time)=>{
setend_time = (time) => {
this.setState({
starttimesend:time===undefined||time===null||time===""?undefined:time,
starttimesend: time === undefined || time === null || time === "" ? undefined : time,
})
}
//立即发布
publish=()=>{
let {questionslist}=this.state;
let starttime= this.props.getNowFormatDates(1,1);
let endtime=this.props.getNowFormatDates(2,1);
console.log(this.bindRef.end_time)
publish = () => {
let { questionslist } = this.state;
let starttime = this.props.getNowFormatDates(1, 1);
let endtime = this.props.getNowFormatDates(2, 1);
console.log(this.bindRef.end_time)
this.setState({
modalname:"立即发布",
modalname: "立即发布",
// visible:true,
OneSelftype:true,
Topval:"学生将立即收到毕设任务",
OneSelftype: true,
Topval: "学生将立即收到毕设任务",
// Botvalleft:"点击修改",
// Botval:`本操作只对"未发布"的分班有效`,
starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") ,
starttimes:questionslist.end_time,
staytime:this.props.getNowFormatDates(1),
typs:"start",
endtime:endtime,
Cancelname:"暂不发布",
Savesname:"立即发布",
Cancel:this.cancelmodel,
Saves:this.homepublish,
starttime: moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes: questionslist.end_time,
staytime: this.props.getNowFormatDates(1),
typs: "start",
endtime: endtime,
Cancelname: "暂不发布",
Savesname: "立即发布",
Cancel: this.cancelmodel,
Saves: this.homepublish,
})
}
// 确定立即发布
homepublish=(ids,endtime)=>{
homepublish = (ids, endtime) => {
this.cancelmodel();
let task_Id=this.props.match.params.task_Id;
let task_Id = this.props.match.params.task_Id;
const cid = this.props.match.params.coursesId;
// let url = `/courses/${cid}/graduation_tasks/publish_task.json`;
let url="/courses/"+cid+"/graduation_tasks/publish_task.json"
axios.post(url,{
task_ids:[task_Id],
let url = "/courses/" + cid + "/graduation_tasks/publish_task.json"
axios.post(url, {
task_ids: [task_Id],
group_ids: this.state.course_groupslist,
end_time:endtime,
}).then((response)=>{
end_time: endtime,
}).then((response) => {
if (response.data.status == 0) {
this.getdatas()
this.props.showNotification(response.data.message);
@ -167,45 +167,45 @@ class GraduationTaskDetail extends Component{
// Modalstopval:response.data.message,
// ModalSave:this.cancelmodel,
// Loadtype:true,
course_groupslist:[],
checkAllValue:false
course_groupslist: [],
checkAllValue: false
})
}
}).catch((error)=>{
}).catch((error) => {
})
}
// 刷新
resetList=()=>{
resetList = () => {
this.getdatas();
this.child && this.child.searchValue();
}
// 立即截止
end=()=>{
end = () => {
// this.homeworkstart()
this.setState({
modalname:"立即截止",
visible:true,
Topval:"学生将不能再提交作品",
modalname: "立即截止",
visible: true,
Topval: "学生将不能再提交作品",
// Botvalleft:"暂不截止",
// Botval:`本操作只对"提交中"的作业有效`,
Cancelname:"暂不截止",
Savesname:"立即截止",
Cancel:this.cancelmodel,
Saves:this.coursetaskend,
typs:"end",
Cancelname: "暂不截止",
Savesname: "立即截止",
Cancel: this.cancelmodel,
Saves: this.coursetaskend,
typs: "end",
})
}
coursetaskend=()=>{
coursetaskend = () => {
const coursesId = this.props.match.params.coursesId;
const task_Id = this.props.match.params.task_Id;
let url = `/courses/${coursesId}/graduation_tasks/end_task.json`;
axios.post(url,{
task_ids:[task_Id],
axios.post(url, {
task_ids: [task_Id],
group_ids: this.state.course_groupslist,
}).then((response)=>{
}).then((response) => {
if (response.data.status == 0) {
this.props.showNotification(response.data.message);
this.cancelmodel();
@ -213,88 +213,88 @@ class GraduationTaskDetail extends Component{
this.child && this.child.reInit();
}
}).catch((error)=>{
}).catch((error) => {
})
}
// 取消
cancelmodel=()=>{
cancelmodel = () => {
this.setState({
Modalstype:false,
Loadtype:false,
visible:false,
OneSelftype:false,
Modulationtype:false,
Allocationtype:false,
Modalstopval:"",
ModalCancel:"",
ModalSave:"",
Modalstype: false,
Loadtype: false,
visible: false,
OneSelftype: false,
Modulationtype: false,
Allocationtype: false,
Modalstopval: "",
ModalCancel: "",
ModalSave: "",
})
}
getcourse_groupslist=(id)=>{
getcourse_groupslist = (id) => {
this.setState({
course_groupslist:id
course_groupslist: id
})
}
setTab = (tab) =>{
setTab = (tab) => {
this.setState({
tab
})
}
// 关联项目
AssociationItems=()=>{
AssociationItems = () => {
this.setState({
visibles:true
visibles: true
})
}
Cancel=()=>{
Cancel = () => {
this.setState({
visibles:false
visibles: false
})
}
// 取消关联
cannelAssociation=()=>{
cannelAssociation = () => {
this.setState({
Modalstype:true,
Modalstopval:"确定要取消该项目关联?",
ModalCancel:this.cannerassocition,
ModalSave:this.savetassociton
Modalstype: true,
Modalstopval: "确定要取消该项目关联?",
ModalCancel: this.cannerassocition,
ModalSave: this.savetassociton
})
}
savetassociton=()=>{
savetassociton = () => {
this.cannerassocition();
let {questionslist}=this.state;
let url = "/graduation_tasks/"+questionslist.task_id+"/graduation_works/cancel_relate_project.json";
let { questionslist } = this.state;
let url = "/graduation_tasks/" + questionslist.task_id + "/graduation_works/cancel_relate_project.json";
console.log(url)
axios.get(url).then((result)=>{
if(result.data.status===0){
axios.get(url).then((result) => {
if (result.data.status === 0) {
this.resetList();
}
}).catch((error)=>{
}).catch((error) => {
console.log(error)
})
}
cannerassocition=()=>{
cannerassocition = () => {
this.setState({
Modalstype:false,
Modalstopval:"",
ModalCancel:"",
ModalSave:"",
loadtype:false,
visibles:false
Modalstype: false,
Modalstopval: "",
ModalCancel: "",
ModalSave: "",
loadtype: false,
visibles: false
})
}
// 补交附件
handaccessory=()=>{
handaccessory = () => {
// let {taskslistdata}=this.state;
// let courseId=this.props.match.params.coursesId;
//
@ -302,55 +302,55 @@ class GraduationTaskDetail extends Component{
//
// window.location.href=url;
this.setState({
avisible:true
avisible: true
})
}
Cancelvisible=()=>{
Cancelvisible = () => {
this.setState({
avisible:false
avisible: false
})
}
CodeReview=()=>{
let newgetRandomNumber=getRandomNumber(true);
CodeReview = () => {
let newgetRandomNumber = getRandomNumber(true);
console.log(newgetRandomNumber)
this.props.showNotification("正在导出中...");
if(newgetRandomNumber){
const task_Id = this.props.match.params.task_Id;
window.open(`/api/graduation_tasks/${task_Id}/sonar?
${this.state.taskdatas.teacher_comment===undefined||this.state.taskdatas.teacher_comment===null?"":"teacher_comment="+this.state.taskdatas.teacher_comment+"&"}
${this.state.taskdatas.task_status===undefined||this.state.taskdatas.task_status===null?"":"task_status="+this.state.taskdatas.task_status+"&"}
${this.state.taskdatas.course_group===undefined||this.state.taskdatas.course_group===null?"":"course_group="+this.state.taskdatas.course_group+"&"}
${this.state.taskdatas.cross_comment===undefined||this.state.taskdatas.cross_comment===null?"":"cross_comment="+this.state.taskdatas.cross_comment+"&"}
${this.state.taskdatas.search===undefined||this.state.taskdatas.search===null?"":"search="+this.state.taskdatas.search+"&"}${newgetRandomNumber}`)
if (newgetRandomNumber) {
const task_Id = this.props.match.params.task_Id;
window.open(`/api/graduation_tasks/${task_Id}/sonar?
${this.state.taskdatas.teacher_comment === undefined || this.state.taskdatas.teacher_comment === null ? "" : "teacher_comment=" + this.state.taskdatas.teacher_comment + "&"}
${this.state.taskdatas.task_status === undefined || this.state.taskdatas.task_status === null ? "" : "task_status=" + this.state.taskdatas.task_status + "&"}
${this.state.taskdatas.course_group === undefined || this.state.taskdatas.course_group === null ? "" : "course_group=" + this.state.taskdatas.course_group + "&"}
${this.state.taskdatas.cross_comment === undefined || this.state.taskdatas.cross_comment === null ? "" : "cross_comment=" + this.state.taskdatas.cross_comment + "&"}
${this.state.taskdatas.search === undefined || this.state.taskdatas.search === null ? "" : "search=" + this.state.taskdatas.search + "&"}${newgetRandomNumber}`)
}
}
getsonars=(teacher_comment,task_status,course_group,cross_comment,search)=>{
let data={
teacher_comment:teacher_comment,
task_status:task_status,
course_group:course_group,
cross_comment:cross_comment,
search:search
getsonars = (teacher_comment, task_status, course_group, cross_comment, search) => {
let data = {
teacher_comment: teacher_comment,
task_status: task_status,
course_group: course_group,
cross_comment: cross_comment,
search: search
}
this.setState({
taskdatas:data
taskdatas: data
})
}
bindRef = ref => { this.child = ref } ;
bindRef = ref => { this.child = ref };
render(){
render() {
let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id;
let task_Id=this.props.match.params.task_Id;
let courseId = this.props.match.params.coursesId;
let category_id = this.props.match.params.category_id;
let task_Id = this.props.match.params.task_Id;
let {
questionslist ,
tab ,
visibles ,
questionslist,
tab,
visibles,
Modalstype,
Modalstopval,
ModalCancel,
@ -359,12 +359,12 @@ class GraduationTaskDetail extends Component{
} = this.state
const commom = {
setTab:this.setTab,
getdatas:this.getdatas
setTab: this.setTab,
getdatas: this.getdatas
}
return(
return (
<div className="newMain clearfix">
{
questionslist &&
@ -388,7 +388,7 @@ class GraduationTaskDetail extends Component{
modaltype={this.state.modaltype}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
/>
{this.state.OneSelftype==true?<OneSelfOrderModal
{this.state.OneSelftype == true ? <OneSelfOrderModal
{...this.props}
staytime={this.state.staytime}
starttimes={this.state.starttimes}
@ -411,23 +411,23 @@ class GraduationTaskDetail extends Component{
starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs}
/>:""}
/> : ""}
{/*关联项目*/}
{visibles===true?
{visibles === true ?
<Associationmodel
modalname={"关联项目"}
visible={visibles}
Cancel={()=>this.Cancel()}
taskid={ questionslist && questionslist.task_id }
Cancel={() => this.Cancel()}
taskid={questionslist && questionslist.task_id}
funlist={this.resetList}
/>
:""}
: ""}
{this.state.avisible===true?<AccessoryModal
{this.state.avisible === true ? <AccessoryModal
{...this.props}
modalname={"补交附件"}
visible={this.state.avisible}
@ -436,7 +436,7 @@ class GraduationTaskDetail extends Component{
Cancel={this.Cancelvisible}
categoryid={questionslist.work_id}
setupdate={this.resetList}
/>:""}
/> : ""}
{/*提示*/}
<Modals
modalsType={Modalstype}
@ -458,7 +458,7 @@ class GraduationTaskDetail extends Component{
modalVisible={acrossVisible}
modalCloss={this.closeAcross}
resetFun={this.resetList}
comment_status={ questionslist && questionslist.comment_status }
comment_status={questionslist && questionslist.comment_status}
/>
}
@ -481,16 +481,16 @@ class GraduationTaskDetail extends Component{
<div className="stud-class-set bor-bottom-greyE">
<div className="clearfix edu-back-white pl30 pr30 graduationTaskMenu">
<Link className={tab && tab == "list" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/list"}>任务列表</Link>
<Link className={tab && tab == "questions" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/questions"}>毕设描述</Link>
<Link className={tab && tab == "setting" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/setting?tab=3"}>设置</Link>
<Link className={tab && tab == "list" ? "active" : ""} to={"/courses/" + courseId + "/graduation_tasks/" + category_id + "/detail/" + task_Id + "/list"}>任务列表</Link>
<Link className={tab && tab == "questions" ? "active" : ""} to={"/courses/" + courseId + "/graduation_tasks/" + category_id + "/detail/" + task_Id + "/questions"}>毕设描述</Link>
<Link className={tab && tab == "setting" ? "active" : ""} to={"/courses/" + courseId + "/graduation_tasks/" + category_id + "/detail/" + task_Id + "/setting?tab=3"}>设置</Link>
{/*<a className={"fr color-blue font-16"}>导出成绩</a>*/}
{/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>:""}*/}
{/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className={"fr color-blue font-16"}>导出作品附件</a>:""}*/}
<style>
{ `
{`
.drop_down_menu{
height: 118px;
left:0px;
@ -519,56 +519,56 @@ class GraduationTaskDetail extends Component{
}
`}
</style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mt20" style={{"paddingLeft":"0px"}}>
{this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mt20" style={{ "paddingLeft": "0px" }}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.child.confirmysl(`/graduation_tasks/${task_Id}/tasks_list.xlsx`)} className="color-dark">导出成绩</a></li>
<li><a onClick={()=>this.child.confirmysl(`/graduation_tasks/${task_Id}/tasks_list.zip`)} className="color-dark">导出作品附件</a></li>
<ul className="drop_down_menu" style={{ "right": "-34px", "left": "unset", "height": "auto" }}>
<li><a onClick={() => this.child.confirmysl(`/graduation_tasks/${task_Id}/tasks_list.xlsx`)} className="color-dark">导出成绩</a></li>
<li><a onClick={() => this.child.confirmysl(`/graduation_tasks/${task_Id}/tasks_list.zip`)} className="color-dark">导出作品附件</a></li>
</ul>
</li>:""}
{questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{
return(
</li> : ""}
{questionslist.work_status === undefined || questionslist.work_status === null || questionslist.work_status.length === 0 ? "" : questionslist.work_status.map((item, key) => {
return (
<span key={key} className="fr mt20">
{item==="提交作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works/"+task_Id+"/new"}>提交作品</a>:""}
{item==="补交作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works/"+task_Id+"/new"}>补交作品</a>:""}
{item==="修改作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works"+"/"+ questionslist.work_id + "/edit"}>修改作品</a>:""}
{item==="查看作品"?<a className={"fr color-blue font-16 ml20"} target="_blank" href={"/courses/"+courseId+"/graduation_tasks/"+ questionslist.work_id + "/appraise"}>查看作品</a> :""}
{item==="创建项目"?<a className={"fr color-blue font-16 ml20"} href={'/projects/new'} target="_blank">创建项目</a>:""}
{item==="关联项目"?<a className={"fr color-blue font-16 ml20"} onClick={this.AssociationItems}>关联项目</a>:""}
{item==="取消关联"?<a className={"fr color-blue font-16 ml20"} onClick={this.cannelAssociation}>取消关联</a>:""}
{item==="补交附件"?<a className={"fr color-blue font-16 ml20"} onClick={this.handaccessory}>补交附件</a>:""}
</span>
{item === "提交作品" ? <a className={"fr color-blue font-16 ml20"} href={"/courses/" + courseId + "/graduation_tasks/" + category_id + "/works/" + task_Id + "/new"}>提交作品</a> : ""}
{item === "补交作品" ? <a className={"fr color-blue font-16 ml20"} href={"/courses/" + courseId + "/graduation_tasks/" + category_id + "/works/" + task_Id + "/new"}>补交作品</a> : ""}
{item === "修改作品" ? <a className={"fr color-blue font-16 ml20"} href={"/courses/" + courseId + "/graduation_tasks/" + category_id + "/works" + "/" + questionslist.work_id + "/edit"}>修改作品</a> : ""}
{item === "查看作品" ? <a className={"fr color-blue font-16 ml20"} target="_blank" href={"/courses/" + courseId + "/graduation_tasks/" + questionslist.work_id + "/appraise"}>查看作品</a> : ""}
{item === "创建项目" ? <a className={"fr color-blue font-16 ml20"} href={'/projects/new'} target="_blank">创建项目</a> : ""}
{item === "关联项目" ? <a className={"fr color-blue font-16 ml20"} onClick={this.AssociationItems}>关联项目</a> : ""}
{item === "取消关联" ? <a className={"fr color-blue font-16 ml20"} onClick={this.cannelAssociation}>取消关联</a> : ""}
{item === "补交附件" ? <a className={"fr color-blue font-16 ml20"} onClick={this.handaccessory}>补交附件</a> : ""}
</span>
)
})}
{/*<a className={"fr color-blue font-16"}>项目在线质量检测</a>*/}
{ this.props.isAdmin() ? questionslist.status===1 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.end()} }>立即截止</a> : "" : "" }
{ this.props.isAdmin() ? questionslist.status===0 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a> : "" : "" }
{ this.props.isAdmin() && questionslist.cross_comment ? <a className={"fr color-blue font-16"} onClick={this.openAcross}>交叉评阅设置</a> : "" }
{ this.props.isAdmin() ? <a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a> : "" }
{ this.props.user&&this.props.user.admin===true || this.props.user&&this.props.user.business===true ? <a className={"fr color-blue font-16"} onClick={()=>this.CodeReview()}>代码评测</a> : "" }
{this.props.isAdmin() ? questionslist.status === 1 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.end() }}>立即截止</a> : "" : ""}
{this.props.isAdmin() ? questionslist.status === 0 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish() }}>立即发布</a> : "" : ""}
{this.props.isAdmin() && questionslist.cross_comment ? <a className={"fr color-blue font-16"} onClick={this.openAcross}>交叉评阅设置</a> : ""}
{this.props.isAdmin() ? <a className={"fr color-blue font-16"} href={"/courses/" + courseId + "/graduation_tasks/" + task_Id + "/edit"}>编辑任务</a> : ""}
{this.props.user && this.props.user.admin === true || this.props.user && this.props.user.business === true ? <a className={"fr color-blue font-16"} onClick={() => this.CodeReview()}>代码评测</a> : ""}
</div>
</div>
<Switch {...this.props}>
{/*//毕设任务列表*/}
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/list"
render={
(props) => (<GraduationTaskslist getsonar={(teacher_comment,task_status,course_group,cross_comment,search)=>this.getsonars(teacher_comment,task_status,course_group,cross_comment,search)}{...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`list`}/>)
}
render={
(props) => (<GraduationTaskslist getsonar={(teacher_comment, task_status, course_group, cross_comment, search) => this.getsonars(teacher_comment, task_status, course_group, cross_comment, search)}{...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time) => this.setend_time(time)} tab={`list`} />)
}
></Route>
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/setting"
render={
(props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`setting`}/>)
}
render={
(props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time) => this.setend_time(time)} tab={`setting`} />)
}
></Route>
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/questions"
render={
(props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time)=>this.setend_time(time)} tab={`questions`}/>)
}></Route>
render={
(props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} setend_time={(time) => this.setend_time(time)} tab={`questions`} />)
}></Route>
</Switch>
</div>
@ -579,4 +579,4 @@ class GraduationTaskDetail extends Component{
}
}
// CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC))
export default (GraduationTaskDetail) ;
export default (GraduationTaskDetail);

@ -1,10 +1,10 @@
import React, {Component} from "react";
import {BrowserRouter as Router,Route,Switch,Link, NavLin} from 'react-router-dom';
import {WordsBtn, ActionBtn,getImageUrl} from 'educoder';
import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd";
import React, { Component } from "react";
import { BrowserRouter as Router, Route, Switch, Link, NavLin } from 'react-router-dom';
import { WordsBtn, ActionBtn, getImageUrl } from 'educoder';
import { Input, Checkbox, Table, Pagination, Modal, Menu, Tooltip, Spin, Button, Form } from "antd";
import axios from 'axios';
import BanksMenu from '../../user/usersInfo/banks/banksMenu'
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../../Loading';
import '../css/members.css';
import "../common/formCommon.css";
@ -28,11 +28,11 @@ class GroupjobbankPage extends Component {
// this.answerMdRef = React.createRef();
this.state = {
tab: ["0"],
workid:1,
isSpin:false,
datas:[],
visible:false,
banksMenu:undefined
workid: 1,
isSpin: false,
datas: [],
visible: false,
banksMenu: undefined
}
}
@ -41,82 +41,82 @@ class GroupjobbankPage extends Component {
}
getonedata=()=>{
if( this.props.match.params.workid){
getonedata = () => {
if (this.props.match.params.workid) {
this.setState({
workid: this.props.match.params.workid,
workid: this.props.match.params.workid,
})
}
this.getdata(this.props.match.params.workid);
};
//获取数据的地方
getdata=(workid)=>{
var workids= workid;
if(workids){
getdata = (workid) => {
var workids = workid;
if (workids) {
}else{
workids=this.state.workid;
} else {
workids = this.state.workid;
}
this.setState({
isSpin:true,
isSpin: true,
})
let url = `/homework_banks/${workids}.json`;
//
axios.get(url).then((response) => {
if(response){
if(response.data){
if (response) {
if (response.data) {
this.setState({
datas:response.data,
datas: response.data,
})
try {
const crumbData={
title:response && response.data && response.data.name,
is_public:response && response.data && response.data.is_public,
crumbArray:[
{content:'详情'}
const crumbData = {
title: response && response.data && response.data.name,
is_public: response && response.data && response.data.is_public,
crumbArray: [
{ content: '详情' }
]
};
const menuData={
tab:'0',//tab选中的index
menuArray:[//tab以及tab路由
{to:`/banks/group/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'},
{to:`/banks/group/${workids}/${this.props.match.params.type}/answer?tab=1`,content:'参考答案'}
const menuData = {
tab: '0',//tab选中的index
menuArray: [//tab以及tab路由
{ to: `/banks/group/${workids}/${this.props.match.params.type}?tab=0`, content: '内容详情' },
{ to: `/banks/group/${workids}/${this.props.match.params.type}/answer?tab=1`, content: '参考答案' }
],
category:'group',//毕设选题
tos:`/banks/group/${workids}/edit/${this.props.match.params.type}?tab=0`,
id:workids,
is_public:response && response.data && response.data.is_public,
type:this.props.match.params.type,
authorize:response && response.data && response.data.authorize,
category: 'group',//毕设选题
tos: `/banks/group/${workids}/edit/${this.props.match.params.type}?tab=0`,
id: workids,
is_public: response && response.data && response.data.is_public,
type: this.props.match.params.type,
authorize: response && response.data && response.data.authorize,
}
this.setState({
banksMenu:menuData
banksMenu: menuData
})
this.props.initPublic(crumbData,response.data);
}catch (e) {
this.props.initPublic(crumbData, response.data);
} catch (e) {
}
}else {
} else {
this.setState({
datas:[],
datas: [],
})
}
}else {
} else {
this.setState({
datas:[],
datas: [],
})
}
this.setState({
isSpin:false,
isSpin: false,
})
}).catch((error) => {
console.log(error)
this.setState({
datas:[],
isSpin:false,
datas: [],
isSpin: false,
})
});
};
@ -128,41 +128,41 @@ class GroupjobbankPage extends Component {
// }
render() {
let {tab,datas,visible} = this.state;
let { tab, datas, visible } = this.state;
let{
let {
banksMenu
}=this.state
} = this.state
//
// const common={
// initPublic:this.initPublic,
// }
return (
<React.Fragment>
<div className="pd30">
{
banksMenu &&
<BanksMenu
banksMenu={banksMenu}
{...this.props}
{...this.state}
></BanksMenu>
}
<Switch {...this.props}>
<Route path={`/banks/group/:workid/${this.props.match.params.type}/answer`}
render={
(props) => {
return (<Groupjobquesanswer {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
<Route path={`/banks/group/:workid/${this.props.match.params.type}`}
render={
(props) => {
return (<Groupjobbandetails {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
</Switch>
</div>
<div className="pd30">
{
banksMenu &&
<BanksMenu
banksMenu={banksMenu}
{...this.props}
{...this.state}
></BanksMenu>
}
<Switch {...this.props}>
<Route path={`/banks/group/:workid/${this.props.match.params.type}/answer`}
render={
(props) => {
return (<Groupjobquesanswer {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
<Route path={`/banks/group/:workid/${this.props.match.params.type}`}
render={
(props) => {
return (<Groupjobbandetails {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
</Switch>
</div>
</React.Fragment>
)
}

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../../Loading';
import TPMIndexHOC from '../../tpm/TPMIndexHOC';

@ -1,10 +1,10 @@
import React, {Component} from "react";
import {BrowserRouter as Router,Route,Switch,Link, NavLin} from 'react-router-dom';
import {WordsBtn, ActionBtn,getImageUrl} from 'educoder';
import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd";
import React, { Component } from "react";
import { BrowserRouter as Router, Route, Switch, Link, NavLin } from 'react-router-dom';
import { WordsBtn, ActionBtn, getImageUrl } from 'educoder';
import { Input, Checkbox, Table, Pagination, Modal, Menu, Tooltip, Spin, Button, Form } from "antd";
import axios from 'axios';
import BanksMenu from '../../user/usersInfo/banks/banksMenu'
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../../Loading';
import '../css/members.css';
import "../common/formCommon.css";
@ -22,102 +22,102 @@ const Generaljobanswer = Loadable({
loading: Loading,
});
class Generaljobbankdetails extends Component {
//普通作业内容详情
//普通作业内容详情
constructor(props) {
super(props);
// this.answerMdRef = React.createRef();
this.state = {
tab: ["0"],
workid:1,
isSpin:false,
datas:[],
visible:false,
banksMenu:undefined
workid: 1,
isSpin: false,
datas: [],
visible: false,
banksMenu: undefined
}
}
componentDidMount() {
this.getonedata();
this.getonedata();
}
getonedata=()=>{
if( this.props.match.params.workid){
getonedata = () => {
if (this.props.match.params.workid) {
this.setState({
workid: this.props.match.params.workid,
workid: this.props.match.params.workid,
})
}
this.getdata(this.props.match.params.workid);
};
//获取数据的地方
getdata=(workid)=>{
var workids= workid;
if(workids){
getdata = (workid) => {
var workids = workid;
if (workids) {
}else{
workids=this.state.workid;
} else {
workids = this.state.workid;
}
this.setState({
isSpin:true,
isSpin: true,
})
let url = `/homework_banks/${workids}.json`;
//
axios.get(url).then((response) => {
if(response){
if(response.data){
if (response) {
if (response.data) {
this.setState({
datas:response.data,
datas: response.data,
})
try {
const crumbData={
title:response && response.data && response.data.name,
is_public:response && response.data && response.data.is_public,
crumbArray:[
{content:'详情'}
const crumbData = {
title: response && response.data && response.data.name,
is_public: response && response.data && response.data.is_public,
crumbArray: [
{ content: '详情' }
]
};
const menuData={
tab:'0',//tab选中的index
menuArray:[//tab以及tab路由
{to:`/banks/normal/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'},
{to:`/banks/normal/${workids}/${this.props.match.params.type}/answer?tab=1`,content:'参考答案'}
const menuData = {
tab: '0',//tab选中的index
menuArray: [//tab以及tab路由
{ to: `/banks/normal/${workids}/${this.props.match.params.type}?tab=0`, content: '内容详情' },
{ to: `/banks/normal/${workids}/${this.props.match.params.type}/answer?tab=1`, content: '参考答案' }
],
category:'normal',//毕设选题
tos:`/banks/normal/${workids}/edit/${this.props.match.params.type}?tab=0`,
id:workids,
is_public:response && response.data && response.data.is_public,
type:this.props.match.params.type,
authorize:response && response.data && response.data.authorize,
category: 'normal',//毕设选题
tos: `/banks/normal/${workids}/edit/${this.props.match.params.type}?tab=0`,
id: workids,
is_public: response && response.data && response.data.is_public,
type: this.props.match.params.type,
authorize: response && response.data && response.data.authorize,
}
this.setState({
banksMenu:menuData
})
this.props.initPublic(crumbData,response.data);
}catch (e) {
banksMenu: menuData
})
this.props.initPublic(crumbData, response.data);
} catch (e) {
}
}else {
} else {
this.setState({
datas:[],
datas: [],
})
}
}else {
} else {
this.setState({
datas:[],
datas: [],
})
}
this.setState({
isSpin:false,
isSpin: false,
})
}).catch((error) => {
console.log(error)
this.setState({
datas:[],
isSpin:false,
datas: [],
isSpin: false,
})
});
};
@ -129,40 +129,40 @@ class Generaljobbankdetails extends Component {
// }
render() {
let {tab,datas,visible} = this.state;
let { tab, datas, visible } = this.state;
let{
let {
banksMenu
}=this.state
} = this.state
return (
<React.Fragment>
<div className="pd30">
{
banksMenu &&
<BanksMenu
banksMenu={banksMenu}
{...this.props}
{...this.state}
></BanksMenu>
}
<Switch {...this.props}>
<Route path={`/banks/normal/:workid/${this.props.match.params.type}/answer`}
render={
(props) => {
return (<Generaljobanswer {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
<Route path={`/banks/normal/:workid/${this.props.match.params.type}`}
render={
(props) => {
return (<Generaljobdetails {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
<React.Fragment>
<div className="pd30">
{
banksMenu &&
<BanksMenu
banksMenu={banksMenu}
{...this.props}
{...this.state}
></BanksMenu>
}
<Switch {...this.props}>
<Route path={`/banks/normal/:workid/${this.props.match.params.type}/answer`}
render={
(props) => {
return (<Generaljobanswer {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
<Route path={`/banks/normal/:workid/${this.props.match.params.type}`}
render={
(props) => {
return (<Generaljobdetails {...this.props} {...props} {...this.state} datas={datas} />)
}
}></Route>
</Switch>
</div>
</React.Fragment>
</Switch>
</div>
</React.Fragment>
)
}
}

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../../Loading';
import TPMIndexHOC from '../../tpm/TPMIndexHOC';

@ -6,7 +6,7 @@ import axios from 'axios';
import './index.less';
import CustomLoadable from "../../../CustomLoadable";
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from "../../../Loading";
const { Step } = Steps;
const steps = ["培养目标", "毕业要求", "培养目标VS毕业要求", "毕业要求VS通用标准", "学生", "课程体系", "课程体系VS毕业要求", "达成度评价结果"];

@ -1,6 +1,6 @@
import React, { Component } from 'react';
import {getRandomNumber} from 'educoder';
import { getRandomNumber } from 'educoder';
import 'antd/dist/antd.css';
@ -11,22 +11,22 @@ import {
Route,
Switch
} from 'react-router-dom';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from "../../../Loading";
const $ = window.$;
const Curriculumtwo = Loadable({
loader: () => import('./Curriculumtwo'),
loading: Loading,
})
const EcCourseEvaluationsbottom =Loadable({
const EcCourseEvaluationsbottom = Loadable({
loader: () => import('../subroute/ecCourseEvaluations/EcCourseEvaluationsbottom'),
loading: Loading,
});
const EcCompletionCalculation =Loadable({
const EcCompletionCalculation = Loadable({
loader: () => import('../subroute/ecCompletion_calculation/EcCompletionCalculation'),
loading: Loading,
});
const EcCourseSupportSetting =Loadable({
const EcCourseSupportSetting = Loadable({
loader: () => import('../subroute/ecCourseSupportSetting/index'),
loading: Loading,
});
@ -35,24 +35,24 @@ class Curriculum extends Component {
//课程体系
constructor(props) {
super(props)
this.state= {
classcalue:5,
newec_course_idbottom:"",
course_name:undefined,
course_url:"a",
ecmanager:true,
titine:1,
}
this.state = {
classcalue: 5,
newec_course_idbottom: "",
course_name: undefined,
course_url: "a",
ecmanager: true,
titine: 1,
}
}
componentWillMount(){
componentWillMount() {
// window.document.title = '课程达成评价结果';
}
componentDidMount(){
componentDidMount() {
console.log("Curriculum");
console.log(this.props);
}
sync_course_data=()=>{
sync_course_data = () => {
// this.setState({listSpin:true})
// let ec_course_id=this.props.match.params.ec_course_id;
// let Url ='/ec_course_achievement_methods/sync_course_data';
@ -90,167 +90,169 @@ class Curriculum extends Component {
// console.log("调用了子对象1");
this.child = ref
};
newrightcalculatebuttonysl=(child)=>{
newrightcalculatebuttonysl = (child) => {
// console.log("调用了子对象2");
// console.log(child);
child.newrightcalculatebutton();
}
onAclick=(i)=>{
onAclick = (i) => {
console.log("onAclick");
console.log(i);
if(i===1){
this.props.history.push(this.props.match.url+"/ec_course_support_setting/1");
}else if(i===2){
this.props.history.push(this.props.match.url+"/ec_course_reach_setting/2");
}else if(i===3){
this.props.history.push(this.props.match.url+"/score_level/3");
}else if(i===4){
this.props.history.push(this.props.match.url+"/evaluation_methods/4");
}else{
this.props.history.push(this.props.match.url+"/competition_calculation_info/5");
if (i === 1) {
this.props.history.push(this.props.match.url + "/ec_course_support_setting/1");
} else if (i === 2) {
this.props.history.push(this.props.match.url + "/ec_course_reach_setting/2");
} else if (i === 3) {
this.props.history.push(this.props.match.url + "/score_level/3");
} else if (i === 4) {
this.props.history.push(this.props.match.url + "/evaluation_methods/4");
} else {
this.props.history.push(this.props.match.url + "/competition_calculation_info/5");
}
this.setState({
titine:i,
titine: i,
})
};
Ontitine=(s)=>{
Ontitine = (s) => {
console.log("CurriculumCurriculum");
console.log(s);
if(s==="ec_course_support_setting"){
if (s === "ec_course_support_setting") {
this.setState({
titine:1,
titine: 1,
})
}else if(s==="ec_course_reach_setting"){
} else if (s === "ec_course_reach_setting") {
this.setState({
titine:2,
titine: 2,
})
}else if(s==="score_level"){
} else if (s === "score_level") {
this.setState({
titine:3,
titine: 3,
})
}else if(s==="evaluation_methods"){
} else if (s === "evaluation_methods") {
this.setState({
titine:4,
titine: 4,
})
}else if(s==="competition_calculation_info"){
} else if (s === "competition_calculation_info") {
this.setState({
titine:5,
titine: 5,
})
}
};
associatedclass=()=>{
associatedclass = () => {
};
deleteassociatedclass=()=>{
deleteassociatedclass = () => {
}
render() {
let {newec_course_idbottom,titine,classcalue,course_name,course_url,ecmanager,Spintype,calculatesetype,ec_course_id,course_total_scoreaverage,ec_course_targets_count,schooldata,ecComponentState,course_total_score,total_rate_data,ec_course_targets,graduation_list,target_list,target_score,evaluate_result,morelisttype,titlemessage,completiontype,completionlist,ismanager} = this.state;
// console.log("Curriculum");
// console.log(this.props);
let { newec_course_idbottom, titine, classcalue, course_name, course_url, ecmanager, Spintype, calculatesetype, ec_course_id, course_total_scoreaverage, ec_course_targets_count, schooldata, ecComponentState, course_total_score, total_rate_data, ec_course_targets, graduation_list, target_list, target_score, evaluate_result, morelisttype, titlemessage, completiontype, completionlist, ismanager } = this.state;
// console.log("Curriculum");
// console.log(this.props);
// console.log(titine);
return (
<div className="educontent">
<div className="newMain clearfix">
<div className="edu-back-white eacourse">
<div className="newMain clearfix">
<div className="edu-back-white eacourse">
<div className="clearfix padding20-30 bor-bottom-greyE">
<a href={schooldata&&schooldata.course_setting_url} className="color-grey-9 TrainingLecturer">课程体系</a> >
<a className="TrainingTheory major_name"> {schooldata&&schooldata.ec_course_name} 达成评价详情</a>
{/* <a href="javascript:void(0)" className="fr white-btn edu-blueback-btn mt4">导出培养目标</a> */}
<div className="color-grey-9 mr10">系统根据课程目标课程考核方式与课程目标评价方法一键计算评价课程目标的达成情况 <a className={"color-blue"} target="_blank" href={'/forums/3533'}>查看详情</a></div>
{
titine === 4 ?
<span className="Importclassroomdatas" style={{top: '22px'}}>
<a className="white-btn edu-blueback-btn fr mb10 mr10 mt7" target="_blank"
href={'/ec_courses/' + newec_course_idbottom + '/export_ec_course_targets?format=xls'}>导出评价方法</a>
</span>
:titine === 1 ?
<span className="Importclassroomdatas" style={{top: '22px'}}>
<a className="white-btn edu-blueback-btn fr mb10 mr10 mt7"
href={`/ec_courses/${this.props.match.params.ec_course_id}/export_ec_course_targets?format=xls`}
>导出课程目标</a>
</span>
:titine===2?
<div className={"Importclassroomdatas"}>
<span className="" >
<a className="white-btn edu-blueback-btn fr mr10 mt7" style={{top: '22px',display:ecmanager===false?"none":"block"}} target="_blank" href={'/ec_courses/'+ec_course_id+'/export_ec_course_targets?format=xls'}>导出考核方法</a>
</span>
<a className="white-btn edu-blueline-btn fr mr10 mt7 mr20"
onClick={this.associatedclass}
style={{display: course_url === "" && ecmanager === true ? "block" : "none"}}
>关联课堂</a>
<a className="white-btn edu-blueline-btn fr mr10 mt7 mr20"
onClick={this.deleteassociatedclass}
style={{display:course_url!=""&&ecmanager===true?"block":"none"}}
>取消关联</a>
</div>
:""
}
</div>
<div className="clearfix padding20-30 bor-bottom-greyE">
<a href={schooldata && schooldata.course_setting_url} className="color-grey-9 TrainingLecturer">课程体系</a> >
<a className="TrainingTheory major_name"> {schooldata && schooldata.ec_course_name} 达成评价详情</a>
{/* <a href="javascript:void(0)" className="fr white-btn edu-blueback-btn mt4">导出培养目标</a> */}
<div className="color-grey-9 mr10">系统根据课程目标课程考核方式与课程目标评价方法一键计算评价课程目标的达成情况 <a className={"color-blue"} target="_blank" href={'/forums/3533'}>查看详情</a></div>
{
titine === 4 ?
<span className="Importclassroomdatas" style={{ top: '22px' }}>
<a className="white-btn edu-blueback-btn fr mb10 mr10 mt7" target="_blank"
href={'/ec_courses/' + newec_course_idbottom + '/export_ec_course_targets?format=xls'}>导出评价方法</a>
</span>
: titine === 1 ?
<span className="Importclassroomdatas" style={{ top: '22px' }}>
<a className="white-btn edu-blueback-btn fr mb10 mr10 mt7"
href={`/ec_courses/${this.props.match.params.ec_course_id}/export_ec_course_targets?format=xls`}
>导出课程目标</a>
</span>
: titine === 2 ?
<div className={"Importclassroomdatas"}>
<span className="" >
<a className="white-btn edu-blueback-btn fr mr10 mt7" style={{ top: '22px', display: ecmanager === false ? "none" : "block" }} target="_blank" href={'/ec_courses/' + ec_course_id + '/export_ec_course_targets?format=xls'}>导出考核方法</a>
</span>
<a className="white-btn edu-blueline-btn fr mr10 mt7 mr20"
onClick={this.associatedclass}
style={{ display: course_url === "" && ecmanager === true ? "block" : "none" }}
>关联课堂</a>
<a className="white-btn edu-blueline-btn fr mr10 mt7 mr20"
onClick={this.deleteassociatedclass}
style={{ display: course_url != "" && ecmanager === true ? "block" : "none" }}
>取消关联</a>
</div>
: ""
}
</div>
<div className="padding20-30"style={titine===2||titine===3?{height:"100px"}:{height:"80px"}}
>
<a className="fl SystemParameters" style={titine===1?{display:schooldata&&schooldata.ec_course_support_setting_url===null?"none":"block",color:'#4CACFF'}:{display:schooldata&&schooldata.ec_course_support_setting_url===null?"none":"block",color:'#4D4D4D'}}
onClick={()=>this.onAclick(1)}>1.课程目标</a>
<a className="fl SystemParameters ml40"
style={titine===2?{display:schooldata&&schooldata.ec_course_reach_setting_url===null?"none":"block",color:'#4CACFF'}:{display:schooldata&&schooldata.ec_course_reach_setting_url===null?"none":"block",color:'#4D4D4D'}}
onClick={()=>this.onAclick(2)}>2.课程考核方式与数据来源</a>
<a className="fl SystemParameters4CACFF ml40 "
style={titine===3?{color:'#4CACFF'}:{display:"block",color:'#4D4D4D'}}
onClick={()=>this.onAclick(3)}>3.成绩等级设置</a>
<a className="fl SystemParameters ml40"
style={titine===4?{display:schooldata&&schooldata.evaluation_methods_url===null?"none":"block",color:'#4CACFF'}:{display:schooldata&&schooldata.evaluation_methods_url===null?"none":"block",color:'#4D4D4D'}}
onClick={()=>this.onAclick(4)}
>4.课程目标评价方法</a>
<a className="fl SystemParameters ml40 "
style={titine===5?{display:schooldata&&schooldata.competition_calculation_info_url===null?"none":"block",color:'#4CACFF'}:{display:schooldata&&schooldata.competition_calculation_info_url===null?"none":"block",color:'#4D4D4D'}}
onClick={()=>this.onAclick(5)}
>5.课程达成评价结果</a>
{
titine===5?
<span>
<span className={ismanager===false?"none":""} style={{top: "26px"}}>
<a className="white-btn edu-blueback-btn fr mb10 mr10 mt9" target="_blank" href={`/ec_courses/${ec_course_id}/course_targets.xlsx${getRandomNumber()}`}>导出评价详情</a>
</span>
<span className={ismanager===false?"none":"right newrightcalculatebuttons fr mb10 mr20 "}
onClick={()=>this.newrightcalculatebuttonysl(this.child)}>计算</span>
</span>
:titine===4?
<span className="fr ml20 SystemParameters" style={{color: '#989898'}}>各环节平均得分*占比之和/各环节总分*占比之和</span>
:titine===3?
<span className="fl SystemParametersysls" style={{display:course_name===null||course_name===undefined?"block":"none",
padding: '0px 0px 0px 0px',textAlign: 'left',width: '100%',color:'#989898'}}>将学生的成绩转换成对应的等级</span>
:titine===2?
<span>
<span className="fl" style={{display:course_name===null||course_name===undefined?"block":"none",padding: '0px 0px 0px 0px',textAlign: 'left',width: '100%',color: '#989898'}}>请在完成配置后使用各项成绩导入模板将本学年所有参与的学生成绩数据导入系统</span>
<span className="Importclassroomdatass" style={{display:course_url===""||ecmanager===false?"none":"block",}}><a onClick={this.sync_course_data} className="white-btn edu-orangeback-btn fr mt2 mr10" style={{width:'112px'}}>导入课堂数据</a></span>
</span>
:""
}
<div className="padding20-30" style={titine === 2 || titine === 3 ? { height: "100px" } : { height: "80px" }}
>
<a className="fl SystemParameters" style={titine === 1 ? { display: schooldata && schooldata.ec_course_support_setting_url === null ? "none" : "block", color: '#4CACFF' } : { display: schooldata && schooldata.ec_course_support_setting_url === null ? "none" : "block", color: '#4D4D4D' }}
onClick={() => this.onAclick(1)}>1.课程目标</a>
<a className="fl SystemParameters ml40"
style={titine === 2 ? { display: schooldata && schooldata.ec_course_reach_setting_url === null ? "none" : "block", color: '#4CACFF' } : { display: schooldata && schooldata.ec_course_reach_setting_url === null ? "none" : "block", color: '#4D4D4D' }}
onClick={() => this.onAclick(2)}>2.课程考核方式与数据来源</a>
<a className="fl SystemParameters4CACFF ml40 "
style={titine === 3 ? { color: '#4CACFF' } : { display: "block", color: '#4D4D4D' }}
onClick={() => this.onAclick(3)}>3.成绩等级设置</a>
<a className="fl SystemParameters ml40"
style={titine === 4 ? { display: schooldata && schooldata.evaluation_methods_url === null ? "none" : "block", color: '#4CACFF' } : { display: schooldata && schooldata.evaluation_methods_url === null ? "none" : "block", color: '#4D4D4D' }}
onClick={() => this.onAclick(4)}
>4.课程目标评价方法</a>
<a className="fl SystemParameters ml40 "
style={titine === 5 ? { display: schooldata && schooldata.competition_calculation_info_url === null ? "none" : "block", color: '#4CACFF' } : { display: schooldata && schooldata.competition_calculation_info_url === null ? "none" : "block", color: '#4D4D4D' }}
onClick={() => this.onAclick(5)}
>5.课程达成评价结果</a>
{
titine === 5 ?
<span>
<span className={ismanager === false ? "none" : ""} style={{ top: "26px" }}>
<a className="white-btn edu-blueback-btn fr mb10 mr10 mt9" target="_blank" href={`/ec_courses/${ec_course_id}/course_targets.xlsx${getRandomNumber()}`}>导出评价详情</a>
</span>
<span className={ismanager === false ? "none" : "right newrightcalculatebuttons fr mb10 mr20 "}
onClick={() => this.newrightcalculatebuttonysl(this.child)}>计算</span>
</span>
: titine === 4 ?
<span className="fr ml20 SystemParameters" style={{ color: '#989898' }}>各环节平均得分*占比之和/各环节总分*占比之和</span>
: titine === 3 ?
<span className="fl SystemParametersysls" style={{
display: course_name === null || course_name === undefined ? "block" : "none",
padding: '0px 0px 0px 0px', textAlign: 'left', width: '100%', color: '#989898'
}}>将学生的成绩转换成对应的等级</span>
: titine === 2 ?
<span>
<span className="fl" style={{ display: course_name === null || course_name === undefined ? "block" : "none", padding: '0px 0px 0px 0px', textAlign: 'left', width: '100%', color: '#989898' }}>请在完成配置后使用各项成绩导入模板将本学年所有参与的学生成绩数据导入系统</span>
<span className="Importclassroomdatass" style={{ display: course_url === "" || ecmanager === false ? "none" : "block", }}><a onClick={this.sync_course_data} className="white-btn edu-orangeback-btn fr mt2 mr10" style={{ width: '112px' }}>导入课堂数据</a></span>
</span>
: ""
}
</div>
</div>
<Switch>
{/*Curriculumtwo 测试用*/}
{/*课程目标*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/1'
render={(props) => (<EcCourseSupportSetting {...this.props} {...props} {...this.state} Ontitine={(i) => this.Ontitine(i)} />)}></Route>
{/*课程考核方式与数据来源*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/2'
render={(props) => (<Curriculumtwo {...this.props} {...props} {...this.state} Ontitine={(i) => this.Ontitine(i)} />)}></Route>
{/*成绩等级设置*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/3'
render={(props) => (<Curriculumtwo {...this.props} {...props} {...this.state} Ontitine={(i) => this.Ontitine(i)} />)}></Route>
{/*4课程目标评价方法*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/4'
render={(props) => (<EcCourseEvaluationsbottom {...this.props} {...props} {...this.state} Ontitine={(i) => this.Ontitine(i)} />)}></Route>
{/*5课程达成评价结果*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/5'
render={(props) => (<EcCompletionCalculation {...this.props} {...props} {...this.state} Ontitine={(i) => this.Ontitine(i)} triggerRef={this.bindRef} />)}></Route>
</Switch>
</div>
<Switch>
{/*Curriculumtwo 测试用*/}
{/*课程目标*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/1'
render={ (props) => (<EcCourseSupportSetting {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)} />) }></Route>
{/*课程考核方式与数据来源*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/2'
render={ (props) => (<Curriculumtwo {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route>
{/*成绩等级设置*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/3'
render={ (props) => (<Curriculumtwo {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route>
{/*4课程目标评价方法*/ }
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/4'
render={ (props) => (<EcCourseEvaluationsbottom {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)}/>) }></Route>
{/*5课程达成评价结果*/}
<Route extra path='/ecs/major_schools/:majorId/years/:yearId/courses/subpage/:type/5'
render={ (props) => (<EcCompletionCalculation {...this.props} {...props} {...this.state} Ontitine={(i)=>this.Ontitine(i)} triggerRef={this.bindRef}/>) }></Route>
</Switch>
</div>
</div>
)
}

@ -5,7 +5,7 @@ import axios from 'axios';
import "../css/messagemy.css"
import { Route, Switch } from "react-router-dom";
import Loading from '../../../Loading'
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
// MessagSub 消息自路由
// MessagePrivate 私信

@ -9,7 +9,7 @@ import CNotificationHOC from '../courses/common/CNotificationHOC'
import { Route, Switch } from 'react-router-dom';
import Loading from '../../Loading';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import axios from 'axios';

@ -216,7 +216,6 @@ class TPICodeMirror extends Component {
onCodeModeChange = (value) => {
toStore('cmCodeMode', value);
this.setState({ cmCodeMode: value });
window.monaco.editor.setTheme(value);
}
render() {

@ -4,7 +4,7 @@ import { SnackbarHOC, CNotificationHOC } from 'educoder';
import { Route, Switch } from 'react-router-dom';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../Loading';
import TPMIndexHOC from '../tpm/TPMIndexHOC';

@ -6,7 +6,7 @@ import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import Loading from '../../Loading'
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import TPMIndexHOC from '../tpm/TPMIndexHOC'
import { SnackbarHOC } from 'educoder'

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { Route, Switch } from "react-router-dom";
import Loading from '../../Loading'
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import TPMIndexHOC from '../tpm/TPMIndexHOC'
import { SnackbarHOC } from 'educoder'

@ -1,6 +1,5 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import { List,Typography,Tag,Modal,Radio} from 'antd';
import { List, Tag, Modal, Radio } from 'antd';
import TPMRightSection from './component/TPMRightSection';
import TPMNav from './component/TPMNav';
@ -10,8 +9,8 @@ class Audit_situationComponent extends Component {
constructor(props) {
super(props)
this.state = {
datas:undefined,
value:undefined,
datas: undefined,
value: undefined,
}
}
@ -21,82 +20,82 @@ class Audit_situationComponent extends Component {
}
getdatas=()=>{
getdatas = () => {
let url=`/shixuns/${this.props.match.params.shixunId}/review_newest_record.json`;
let url = `/shixuns/${this.props.match.params.shixunId}/review_newest_record.json`;
axios.get(url).then((response) => {
if(response.data===undefined||JSON.stringify(response.data) == "{}"||response.data===null){
if (response.data === undefined || JSON.stringify(response.data) == "{}" || response.data === null) {
this.setState({
datas:[
datas: [
{
name: '内容审核情况',
id:"Content",
id: "Content",
},
{
name: '性能审核情况',
id:"Performance",
id: "Performance",
},
]
})
}else{
let newlist=[]
if(response.data.content_info!=undefined&&response.data.perference_info===undefined){
let arr=[
} else {
let newlist = []
if (response.data.content_info != undefined && response.data.perference_info === undefined) {
let arr = [
{
name: '内容审核情况',
id:"Content",
status:response.data.content_info.status,
username:response.data.content_info.username,
time:response.data.content_info.time,
id: "Content",
status: response.data.content_info.status,
username: response.data.content_info.username,
time: response.data.content_info.time,
},
{
name: '性能审核情况',
id:"Performance",
id: "Performance",
},
]
newlist=arr
newlist = arr
}
if(response.data.content_info===undefined&&response.data.perference_info!=undefined){
let arr=[
if (response.data.content_info === undefined && response.data.perference_info != undefined) {
let arr = [
{
name: '内容审核情况',
id:"Content",
id: "Content",
},
{
name: '性能审核情况',
id:"Performance",
status:response.data.perference_info.status,
username:response.data.perference_info.username,
time:response.data.perference_info.time,
id: "Performance",
status: response.data.perference_info.status,
username: response.data.perference_info.username,
time: response.data.perference_info.time,
},
]
newlist=arr
newlist = arr
}
if(response.data.content_info!=undefined&&response.data.perference_info!=undefined){
let arr=[
{
name: '内容审核情况',
id:"Content",
status:response.data.content_info.status,
username:response.data.content_info.username,
time:response.data.content_info.time,
},
{
name: '性能审核情况',
id:"Performance",
status:response.data.perference_info.status,
username:response.data.perference_info.username,
time:response.data.perference_info.time,
},
]
newlist=arr
if (response.data.content_info != undefined && response.data.perference_info != undefined) {
let arr = [
{
name: '内容审核情况',
id: "Content",
status: response.data.content_info.status,
username: response.data.content_info.username,
time: response.data.content_info.time,
},
{
name: '性能审核情况',
id: "Performance",
status: response.data.perference_info.status,
username: response.data.perference_info.username,
time: response.data.perference_info.time,
},
]
newlist = arr
}
this.setState({
datas:newlist
datas: newlist
})
}
@ -105,22 +104,22 @@ class Audit_situationComponent extends Component {
});
}
showModal = (id,status) => {
showModal = (id, status) => {
debugger
this.setState({
visible: true,
editid:id,
value:status
editid: id,
value: status
});
};
handleOk=(id,editid)=>{
handleOk = (id, editid) => {
let url = `/shixuns/${this.props.match.params.shixunId}/review_shixun.json`;
axios.post(url, {
status: id===undefined?1:id,
status: id === undefined ? 1 : id,
review_type: editid,
}).then((response) => {
if(response.data.status===0){
if (response.data.status === 0) {
this.props.showNotification(response.data.message);
this.setState({
visible: false,
@ -144,14 +143,14 @@ class Audit_situationComponent extends Component {
});
};
render() {
const { tpmLoading, shixun, user, match } = this.props;
let {value,editid,datas}=this.state;
const { tpmLoading, shixun, user, match } = this.props;
let { value, editid, datas } = this.state;
console.log(this.props)
console.log(this.props)
return (
<React.Fragment>
{this.state.visible===true?<Modal
{this.state.visible === true ? <Modal
title="审核情况更改"
visible={this.state.visible}
keyboard={false}
@ -161,7 +160,7 @@ class Audit_situationComponent extends Component {
centered={true}
>
<div>
<style>
<style>
{
`
body{
@ -175,19 +174,19 @@ class Audit_situationComponent extends Component {
}
</style>
<Radio.Group onChange={this.onChange} value={this.state.value===undefined?1:this.state.value}>
<Radio.Group onChange={this.onChange} value={this.state.value === undefined ? 1 : this.state.value}>
<Radio value={1}>已完成</Radio>
<Radio value={0}>未完成</Radio>
</Radio.Group>
<div className={"mt30"}>
<a className="pop_close task-btn mr20 margin-tp26" onClick={()=>this.handleCancel()}>取消</a>
<a className="task-btn task-btn-orange margin-tp26" onClick={()=>this.handleOk(value,editid)}>确定</a>
<a className="pop_close task-btn mr20 margin-tp26" onClick={() => this.handleCancel()}>取消</a>
<a className="task-btn task-btn-orange margin-tp26" onClick={() => this.handleOk(value, editid)}>确定</a>
</div>
</div>
</Modal>:""}
</Modal> : ""}
<style>
{
@ -201,57 +200,57 @@ class Audit_situationComponent extends Component {
}
</style>
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
<div className="tpmComment educontent clearfix mt30 mb80">
<div className="with65 fl edu-back-white commentsDelegateParent" >
<TPMNav
match={match}
user={user}
shixun={shixun}
{...this.props}
is_jupyter={this.props.is_jupyter}
></TPMNav>
<div className="padding20 edu-back-white mt20" style={{minHeight: '640px'}}>
{this.props.identity >2||this.props.identity===undefined?"":<List
dataSource={datas}
bordered
renderItem={(item,key) => (
<List.Item
key={item.id}
actions={[
<a onClick={()=>this.showModal(item.id,item.status)} key={key}>
<i className="iconfont icon-bianjidaibeijing font-22 color-green"></i>
</a>,
]}
>
<List.Item.Meta
title={<div className={"font-16"}>
<div className={"Itemtitle"}>{item.name}</div>
{item.status===undefined?"":item.status===1?<Tag color="#FF6800">已完成</Tag>:<Tag color="#bcbcbc"></Tag>}
</div>}
description={
<div>
{item.time===undefined?"":<span>审核时间: {item.time}</span>}
{item.username===undefined?"":<span className={"ml30"}>审核人: {item.username}</span>}
</div>
}
/>
</List.Item>
)}
/>}
</div>
{tpmLoading ? <div style={{ minHeight: '886px' }}></div> :
<div className="tpmComment educontent clearfix mt30 mb80">
<div className="with65 fl edu-back-white commentsDelegateParent" >
<TPMNav
match={match}
user={user}
shixun={shixun}
{...this.props}
is_jupyter={this.props.is_jupyter}
></TPMNav>
<div className="padding20 edu-back-white mt20" style={{ minHeight: '640px' }}>
{this.props.identity > 2 || this.props.identity === undefined ? "" : <List
dataSource={datas}
bordered
renderItem={(item, key) => (
<List.Item
key={item.id}
actions={[
<a onClick={() => this.showModal(item.id, item.status)} key={key}>
<i className="iconfont icon-bianjidaibeijing font-22 color-green"></i>
</a>,
]}
>
<List.Item.Meta
title={<div className={"font-16"}>
<div className={"Itemtitle"}>{item.name}</div>
{item.status === undefined ? "" : item.status === 1 ? <Tag color="#FF6800">已完成</Tag> : <Tag color="#bcbcbc"></Tag>}
</div>}
description={
<div>
{item.time === undefined ? "" : <span>审核时间: {item.time}</span>}
{item.username === undefined ? "" : <span className={"ml30"}>审核人: {item.username}</span>}
</div>
}
/>
</List.Item>
)}
/>}
</div>
<div className="with35 fr pl20">
<TPMRightSection {...this.props}></TPMRightSection>
</div>
</div>
<div className="with35 fr pl20">
<TPMRightSection {...this.props}></TPMRightSection>
</div>
</div>
}
</React.Fragment>
);

@ -1,12 +1,6 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import PropTypes from 'prop-types';
import TPMCollaborators from './TPMCollaborators'
import axios from 'axios';
class TPMChallengeContainer extends Component {
constructor(props) {
super(props)
@ -14,34 +8,25 @@ class TPMChallengeContainer extends Component {
}
}
componentWillReceiveProps(newProps, newContext) {
}
componentDidMount() {
// this.props.showShixun();
}
render() {
const { tpmLoading } = this.props;
const user = this.props.current_user;
return (
<React.Fragment>
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
render() {
const { tpmLoading } = this.props;
const user = this.props.current_user;
return (
<React.Fragment>
{tpmLoading ? <div style={{ minHeight: '886px' }}></div> :
<TPMCollaborators
{...this.props}
{...this.state}
user={user}
aboutFocus={this.props.aboutFocus}
is_jupyter={this.props.is_jupyter}
{...this.props}
{...this.state}
user={user}
aboutFocus={this.props.aboutFocus}
is_jupyter={this.props.is_jupyter}
>
</TPMCollaborators>
}
</React.Fragment>
);
}
}
</React.Fragment>
);
}
}
export default TPMChallengeContainer;

@ -1,21 +1,20 @@
import React, {Component} from 'react';
import {Redirect} from 'react-router';
import {List, Typography, Tag, Modal, Radio, Checkbox, Table,message, Pagination,Upload,Button} from 'antd';
import { NoneData } from 'educoder'
import React, { Component } from 'react';
import { Modal, Checkbox, Table, message, Pagination, Upload, Button } from 'antd';
import { NoneData } from 'educoder'
import TPMRightSection from './component/TPMRightSection';
import TPMNav from './component/TPMNav';
import axios from 'axios';
import './tpmmodel/tpmmodel.css'
import {getUploadActionUrltwo,appendFileSizeToUploadFileAll} from 'educoder';
import { getUploadActionUrltwo, appendFileSizeToUploadFileAll } from 'educoder';
import moment from 'moment';
import Tpmdatasetmodel from "./tpmmodel/Tpmdatasetmodel";
const confirm = Modal.confirm;
function clearSlct() {
if("getSelection" in window){
if ("getSelection" in window) {
window.getSelection().removeAllRanges();
}else{
} else {
document.selection.empty();
};
}
@ -23,12 +22,12 @@ function jsCopy(s) {
clearSlct();
const copyEle = document.getElementById(s);
copyEle.select();
const copyStatus=document.execCommand("Copy");
const copyStatus = document.execCommand("Copy");
// 对成功与否定进行提示
copyStatuss(copyStatus)
}
function copyStatuss(copyStatus){
function copyStatuss(copyStatus) {
if (copyStatus) {
message.success('复制成功');
} else {
@ -99,12 +98,12 @@ class TPMDataset extends Component {
className: "edu-txt-center font-14 ",
render: (text, record) => (
<div style={{
cursor:"pointer",
cursor: "pointer",
}} onClick={() => {
jsCopy("file_path"+record.id)
jsCopy("file_path" + record.id)
}}>
<i className="iconfont icon-fuzhi3 font-18 ml2 questiontype" style={{
color:"#A0A7B4"
color: "#A0A7B4"
}} ></i>
<div
style={{
@ -113,7 +112,7 @@ class TPMDataset extends Component {
width: "1px"
}}
>
<input id={"file_path"+record.id} value={record.file_path}/>
<input id={"file_path" + record.id} value={record.file_path} />
</div>
</div>
)
@ -122,25 +121,25 @@ class TPMDataset extends Component {
page: 1,
limit: 10,
selectedRowKeys: [],
mylistansum:30,
collaboratorList:[],
fileList:[],
fileListimgs:[],
file:null,
datalist:[],
data_sets_count:0,
selectedRowKeysdata:[],
loadingstate:false,
mylistansum: 30,
collaboratorList: [],
fileList: [],
fileListimgs: [],
file: null,
datalist: [],
data_sets_count: 0,
selectedRowKeysdata: [],
loadingstate: false,
checked: false,
showmodel:false,
itemtypebool:false,
Buttonloading:false
showmodel: false,
itemtypebool: false,
Buttonloading: false
}
}
componentDidMount() {
this.setState({
loadingstate:true,
loadingstate: true,
})
this.getdatas()
@ -149,25 +148,25 @@ class TPMDataset extends Component {
mysonChange = (e) => {
// console.log(`全选checked = ${e.target.checked}`);
if (e.target.checked === true) {
let mydata=[];
let datas=[];
for(let i=0;i<this.state.collaboratorList.data_sets.length;i++){
let mydata = [];
let datas = [];
for (let i = 0; i < this.state.collaboratorList.data_sets.length; i++) {
mydata.push(this.state.collaboratorList.data_sets[i].id);
datas.push(i);
}
this.setState({
selectedRowKeysdata:mydata,
selectedRowKeysdata: mydata,
selectedRowKeys: datas,
checked:true,
checked: true,
})
// console.log(mydata);
// console.log(mydata);
// console.log(datas);
} else {
this.setState({
selectedRowKeysdata:[],
selectedRowKeysdata: [],
selectedRowKeys: [],
checked:false,
checked: false,
})
@ -176,38 +175,40 @@ class TPMDataset extends Component {
getdatas = () => {
let id=this.props.match.params.shixunId;
let collaborators=`/shixuns/${id}/get_data_sets.json`;
axios.get(collaborators,{params:{
page:1,
limit:10,
}}).then((response)=> {
if(response.status===200){
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
}else{
let datalists=[];
for(let i=0;i<response.data.data_sets.length;i++){
const datas=response.data.data_sets;
let id = this.props.match.params.shixunId;
let collaborators = `/shixuns/${id}/get_data_sets.json`;
axios.get(collaborators, {
params: {
page: 1,
limit: 10,
}
}).then((response) => {
if (response.status === 200) {
if (response.data.status === 403 || response.data.status === 401 || response.data.status === 500) {
} else {
let datalists = [];
for (let i = 0; i < response.data.data_sets.length; i++) {
const datas = response.data.data_sets;
var timedata = moment(datas[i].created_on).format('YYYY-MM-DD HH:mm');
datalists.push({
timedata:timedata,
author:datas[i].author,
filesize:datas[i].filesize,
id:datas[i].id,
title:datas[i].title,
file_path:datas[i].file_path,
timedata: timedata,
author: datas[i].author,
filesize: datas[i].filesize,
id: datas[i].id,
title: datas[i].title,
file_path: datas[i].file_path,
})
}
this.setState({
collaboratorList: response.data,
data_sets_count:response.data.data_sets_count,
datalist:datalists,
selectedRowKeysdata:[],
data_sets_count: response.data.data_sets_count,
datalist: datalists,
selectedRowKeysdata: [],
selectedRowKeys: [],
checked:false,
page:1,
checked: false,
page: 1,
});
@ -216,14 +217,14 @@ class TPMDataset extends Component {
}
setTimeout(() => {
this.setState({
loadingstate:false,
loadingstate: false,
})
}, 500)
}).catch((error)=>{
}).catch((error) => {
setTimeout(() => {
this.setState({
loadingstate:false,
loadingstate: false,
})
}, 500)
console.log(error)
@ -231,52 +232,54 @@ class TPMDataset extends Component {
}
getdatastwo = (page,limit) => {
let id=this.props.match.params.shixunId;
let collaborators=`/shixuns/${id}/get_data_sets.json`;
axios.get(collaborators,{params:{
page:page,
limit:limit,
}}).then((response)=> {
if(response.status===200){
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
}else{
let datalists=[];
for(let i=0;i<response.data.data_sets.length;i++){
const datas=response.data.data_sets;
getdatastwo = (page, limit) => {
let id = this.props.match.params.shixunId;
let collaborators = `/shixuns/${id}/get_data_sets.json`;
axios.get(collaborators, {
params: {
page: page,
limit: limit,
}
}).then((response) => {
if (response.status === 200) {
if (response.data.status === 403 || response.data.status === 401 || response.data.status === 500) {
} else {
let datalists = [];
for (let i = 0; i < response.data.data_sets.length; i++) {
const datas = response.data.data_sets;
var timedata = moment(datas[i].created_on).format('YYYY-MM-DD HH:mm');
datalists.push({
timedata:timedata,
author:datas[i].author,
filesize:datas[i].filesize,
id:datas[i].id,
title:datas[i].title,
file_path:datas[i].file_path,
timedata: timedata,
author: datas[i].author,
filesize: datas[i].filesize,
id: datas[i].id,
title: datas[i].title,
file_path: datas[i].file_path,
})
}
this.setState({
collaboratorList: response.data,
data_sets_count:response.data.data_sets_count,
datalist:datalists,
selectedRowKeysdata:[],
data_sets_count: response.data.data_sets_count,
datalist: datalists,
selectedRowKeysdata: [],
selectedRowKeys: [],
checked:false,
page:page,
checked: false,
page: page,
});
}
}
setTimeout(() => {
this.setState({
loadingstate:false,
loadingstate: false,
})
}, 500)
}).catch((error)=>{
}).catch((error) => {
setTimeout(() => {
this.setState({
loadingstate:false,
loadingstate: false,
})
}, 500)
console.log(error)
@ -285,25 +288,27 @@ class TPMDataset extends Component {
}
getdatasthree = (page,limit) => {
let id=this.props.match.params.shixunId;
getdatasthree = (page, limit) => {
let id = this.props.match.params.shixunId;
let collaborators=`/shixuns/${id}/get_data_sets.json`;
axios.get(collaborators,{params:{
page:page,
limit:limit,
}}).then((response)=> {
if(response.status===200){
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
let collaborators = `/shixuns/${id}/get_data_sets.json`;
axios.get(collaborators, {
params: {
page: page,
limit: limit,
}
}).then((response) => {
if (response.status === 200) {
if (response.data.status === 403 || response.data.status === 401 || response.data.status === 500) {
}else{
} else {
}
}
}).catch((error)=>{
}).catch((error) => {
});
@ -313,10 +318,10 @@ class TPMDataset extends Component {
// //console.log('Page: ');
this.setState({
page: pageNumber,
loadingstate:true,
loadingstate: true,
})
this.getdatastwo(pageNumber,10);
this.getdatastwo(pageNumber, 10);
}
onSelectChange = (selectedRowKeys, selectedRows) => {
@ -326,13 +331,13 @@ class TPMDataset extends Component {
selectedRowKeys
}
);
let mydata=[];
for(let i=0;i<selectedRows.length;i++){
let mydata = [];
for (let i = 0; i < selectedRows.length; i++) {
mydata.push(selectedRows[i].id);
}
this.setState({
selectedRowKeysdata:mydata,
selectedRowKeysdata: mydata,
})
// console.log(mydata);
@ -347,67 +352,67 @@ class TPMDataset extends Component {
handleChange = (info) => {
// console.log("handleChange123123");
// console.log(info);
//debugger
//debugger
this.setState({
Buttonloading:true
Buttonloading: true
})
if(!info.file.status){
if (!info.file.status) {
this.setState({
Buttonloading:false
Buttonloading: false
})
}
if(info.file.status == "done" || info.file.status == "uploading" || info.file.status === 'removed'){
if (info.file.status == "done" || info.file.status == "uploading" || info.file.status === 'removed') {
let fileList = info.fileList;
this.setState({
fileList: appendFileSizeToUploadFileAll(fileList),
});
if(info.file.status === 'done'){
if (info.file.status === 'done') {
//done 成功就会调用这个方法
if(info.file.response){
if(info.file.response.status===-1||info.file.response.status==="-1"){
if (info.file.response) {
if (info.file.response.status === -1 || info.file.response.status === "-1") {
this.setState({
Buttonloading:false
Buttonloading: false
})
}else{
} else {
this.getdatas();
this.setState({
Buttonloading:false
Buttonloading: false
})
// this.props.showNotification(`上传成功`);
}
}
}else{
} else {
// this.setState({
// Buttonloading:false
// })
}
if(info.file.response){
if(info.file.response.status===-1||info.file.response.status==="-1"){
// console.log("准备显示弹框了");
// console.log(info);false
let itemtype=-1;
try {
itemtype=info.file.response.message.indexOf('文件名已经存在'.toLowerCase());
}catch (e) {
}
this.setState({
showmodel:true,
tittest:info.file.response.message,
itemtypebool:itemtype>-1?true:itemtype<=-1?false:false,
Buttonloading:false
})
}else{
this.setState({
Buttonloading:false
if (info.file.response) {
if (info.file.response.status === -1 || info.file.response.status === "-1") {
// console.log("准备显示弹框了");
// console.log(info);false
let itemtype = -1;
try {
itemtype = info.file.response.message.indexOf('文件名已经存在'.toLowerCase());
} catch (e) {
}
this.setState({
showmodel: true,
tittest: info.file.response.message,
itemtypebool: itemtype > -1 ? true : itemtype <= -1 ? false : false,
Buttonloading: false
})
} else {
this.setState({
Buttonloading: false
})
}
}
}
}
}
}
@ -415,7 +420,7 @@ class TPMDataset extends Component {
onAttachmentRemove = (file) => {
// debugger
if(!file.percent || file.percent == 100){
if (!file.percent || file.percent == 100) {
confirm({
title: '确定要删除这个附件吗?',
okText: '确定',
@ -434,15 +439,15 @@ class TPMDataset extends Component {
}
deleteRemovedata(){
deleteRemovedata() {
if(this.state.selectedRowKeysdata===undefined || this.state.selectedRowKeysdata===null ||this.state.selectedRowKeysdata.length===0){
if (this.state.selectedRowKeysdata === undefined || this.state.selectedRowKeysdata === null || this.state.selectedRowKeysdata.length === 0) {
this.props.showNotification(`请选择要删除的文件`);
return
}
let id=this.props.match.params.shixunId;
let id = this.props.match.params.shixunId;
confirm({
title: '确定要删除文件吗?',
@ -452,10 +457,12 @@ class TPMDataset extends Component {
onOk: () => {
const url = `/shixuns/${id}/destroy_data_sets.json`;
axios.delete(url,
{ params: {
id:this.state.selectedRowKeysdata,
}}
)
{
params: {
id: this.state.selectedRowKeysdata,
}
}
)
.then((response) => {
if (response.data) {
const { status } = response.data;
@ -478,11 +485,11 @@ class TPMDataset extends Component {
}
deleteAttachment = (file) => {
// console.log(file);
let id=file.response ==undefined ? file.id : file.response.id
let id = file.response == undefined ? file.id : file.response.id
const url = `/attachements/destroy_files.json`
axios.delete(url, {
id:[id],
})
id: [id],
})
.then((response) => {
if (response.data) {
const { status } = response.data;
@ -496,7 +503,7 @@ class TPMDataset extends Component {
newFileList.splice(index, 1);
return {
fileList: newFileList,
deleteisnot:true
deleteisnot: true
};
});
}
@ -514,20 +521,20 @@ class TPMDataset extends Component {
})
}
ModalSave=()=>{
ModalSave = () => {
this.setState({
showmodel: false,
})
}
ButtonloadinghandleChange=()=>{
ButtonloadinghandleChange = () => {
// this.props.showNotification(`zhzzzzz`);
// this.setState({
// Buttonloading:false
// })
}
render() {
const {tpmLoading, shixun, user, match} = this.props;
const {columns, page, limit, selectedRowKeys,mylistansum,fileList,datalist,data_sets_count,loadingstate} = this.state;
const { tpmLoading, shixun, user, match } = this.props;
const { columns, page, limit, selectedRowKeys, mylistansum, fileList, datalist, data_sets_count, loadingstate } = this.state;
const rowSelection = {
selectedRowKeys,
onChange: this.onSelectChange,
@ -536,7 +543,7 @@ class TPMDataset extends Component {
// disabled: record.name === 'Disabled User', // Column configuration not to be checked
// name: record.name,
// }),
let id=this.props.match.params.shixunId;
let id = this.props.match.params.shixunId;
const uploadProps = {
width: 600,
fileList,
@ -546,12 +553,12 @@ class TPMDataset extends Component {
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
// showUploadList: false,
action: `${getUploadActionUrltwo(id)}`,
showUploadList:false,
showUploadList: false,
onChange: this.handleChange,
onRemove: this.onAttachmentRemove,
beforeUpload: (file) => {
//上传前的操作
console.log('beforeUpload', file);
console.log('beforeUpload', file);
// this.props.showNotification(`文件上传中`);
const isLt400M = file.size / 1024 / 1024 <= 400;
@ -569,9 +576,9 @@ class TPMDataset extends Component {
<div className="with65 fl edu-back-white commentsDelegateParent">
{
this.state.showmodel===true?
<Tpmdatasetmodel itemtypebool={this.state.itemtypebool} modalCancel={()=>this.ModalSave()} tittest={this.state.tittest} modalsType={this.state.showmodel}></Tpmdatasetmodel>
:""
this.state.showmodel === true ?
<Tpmdatasetmodel itemtypebool={this.state.itemtypebool} modalCancel={() => this.ModalSave()} tittest={this.state.tittest} modalsType={this.state.showmodel}></Tpmdatasetmodel>
: ""
}
<TPMNav
match={match}
@ -581,12 +588,12 @@ class TPMDataset extends Component {
is_jupyter={this.props.is_jupyter}
></TPMNav>
<div className="padding20 edu-back-white mt20 " style={{minHeight: '463px'}}>
<div className="padding20 edu-back-white mt20 " style={{ minHeight: '463px' }}>
<div className="sortinxdirection">
<div className="tpmwidth">
<Checkbox checked={this.state.checked} onChange={this.mysonChange}>全选</Checkbox>
</div>
<div className="tpmwidth">
<Checkbox checked={this.state.checked} onChange={this.mysonChange}>全选</Checkbox>
</div>
<div className="tpmwidth xaxisreverseorder">
<style>
@ -606,15 +613,15 @@ class TPMDataset extends Component {
}
</style>
<div className="intermediatecenter deletebuttom">
<Upload {...uploadProps}>
<Button className={"deletebuttom"} loading={this.state.Buttonloading}>{this.state.Buttonloading===true?"上传中":"上传文件"}</Button>
</Upload></div>
<Upload {...uploadProps}>
<Button className={"deletebuttom"} loading={this.state.Buttonloading}>{this.state.Buttonloading === true ? "上传中" : "上传文件"}</Button>
</Upload></div>
{
data_sets_count>0?
data_sets_count > 0 ?
<div
className={selectedRowKeys.length > 0 ? "deletebutomtextcode intermediatecenter mr21" : "deletebutom intermediatecenter mr21"} onClick={()=>this.deleteRemovedata()}>
className={selectedRowKeys.length > 0 ? "deletebutomtextcode intermediatecenter mr21" : "deletebutom intermediatecenter mr21"} onClick={() => this.deleteRemovedata()}>
<p className="deletebutomtext" >删除</p></div>
:""
: ""
}
</div>
</div>
@ -658,7 +665,7 @@ class TPMDataset extends Component {
border-right: 1px solid #eeeeee;
}
`}</style>
{data_sets_count===0?
{data_sets_count === 0 ?
<div className="edu-table edu-back-white ysltableowss">
<style>
{
@ -677,12 +684,12 @@ class TPMDataset extends Component {
}
</style>
<Table
columns={columns}
pagination={false}
className="mysjysltable4"
rowSelection={rowSelection}
rowClassName={this.rowClassName}
/>
columns={columns}
pagination={false}
className="mysjysltable4"
rowSelection={rowSelection}
rowClassName={this.rowClassName}
/>
</div>
:
<div className="edu-table edu-back-white ysltableowss">
@ -700,18 +707,18 @@ class TPMDataset extends Component {
}
{
data_sets_count>=11?
<div className="edu-txt-center mt40 mb20">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={data_sets_count}
></Pagination>
</div>
:""
data_sets_count >= 11 ?
<div className="edu-txt-center mt40 mb20">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={data_sets_count}
></Pagination>
</div>
: ""
}
{ data_sets_count===0?
<NoneData style={{width: '100%'}}></NoneData>:""
{data_sets_count === 0 ?
<NoneData style={{ width: '100%' }}></NoneData> : ""
}
</div>

@ -1,12 +1,12 @@
import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import { Route, Link, Switch } from "react-router-dom";
import { Row, Col, Menu, Popover, Button } from 'antd';
import { Row, Col, Menu } from 'antd';
import Loading from '../../Loading';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import TPMIndexHOC from './TPMIndexHOC';
@ -30,7 +30,6 @@ import TPMRanking_listComponent from './TPMRanking_listContainer';
import TPMCollaboratorsComponent from './TPMCollaboratorsContainer';
import Audit_situationComponent from './Audit_situationComponent';
import TPMDataset from './TPMDataset';
import TPMNav from './component/TPMNav';
import '../page/tpiPage.css';
@ -453,20 +452,6 @@ class TPMIndex extends Component {
{this.state.is_jupyter === false ? <Menu.Item key="8" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>排行榜</span>
</Menu.Item> : ""}
{/*{this.state.identity >4||this.state.identity===undefined ? "":this.state.openknows===true?<span>*/}
{/* <Popover*/}
{/* content={*/}
{/* <pre className={"bannerpd201"}>*/}
{/* <div>更多设置在这里,点击“配置”看一看~</div>*/}
{/* <div className={"wechatcenter mt15"}><Button type="primary" onClick={this.openknow} >我知道了</Button></div>*/}
{/* </pre>*/}
{/* }*/}
{/* trigger="click"*/}
{/* placement="top"*/}
{/* visible={this.state.openknows}*/}
{/* >*/}
{/* </Popover>*/}
{/*</span>:""}*/}
{this.state.identity > 4 || this.state.identity === undefined ? "" :
<Menu.Item key="9" className={"competitionmr50"}>

@ -1,40 +1,30 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import PropTypes from 'prop-types';
import TPMPropaedeutics from './TPMPropaedeutics'
import axios from 'axios';
class TPMPropaedeuticsComponent extends Component {
constructor(props) {
super(props)
this.state = {
// tpmLoading: true,
// creator: {
// owner_id: ''
// }
}
}
render() {
const { tpmLoading } = this.props;
return (
<React.Fragment>
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
<TPMPropaedeutics
constructor(props) {
super(props)
}
render() {
const { tpmLoading } = this.props;
return (
<React.Fragment>
{tpmLoading ? <div style={{ minHeight: '886px' }}></div> :
<TPMPropaedeutics
{...this.props}
is_jupyter={this.props.is_jupyter}
>
</TPMPropaedeutics>
is_jupyter={this.props.is_jupyter}
>
</TPMPropaedeutics>
}
</React.Fragment>
</React.Fragment>
);
}
);
}
}
export default TPMPropaedeuticsComponent ;
export default TPMPropaedeuticsComponent;

@ -1,13 +1,7 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import PropTypes from 'prop-types';
import TPMRanking_list from './TPMRanking_list'
import axios from 'axios';
import TPMNav from "./component/TPMNav";
class TPMRanking_listContainer extends Component {
constructor(props) {
super(props)
@ -16,24 +10,24 @@ class TPMRanking_listContainer extends Component {
}
render() {
const { tpmLoading } = this.props;
const user = this.props.current_user;
const { tpmLoading } = this.props;
const user = this.props.current_user;
return (
<React.Fragment>
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
<TPMRanking_list
return (
<React.Fragment>
{tpmLoading ? <div style={{ minHeight: '886px' }}></div> :
<TPMRanking_list
{...this.props}
{...this.state}
user={user}
aboutFocus={this.props.aboutFocus}
is_jupyter={this.props.is_jupyter}
is_jupyter={this.props.is_jupyter}
>
</TPMRanking_list>
>
</TPMRanking_list>
}
</React.Fragment>
);
</React.Fragment>
);
}
}

@ -1,11 +1,7 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import PropTypes from 'prop-types';
import TPMShixunDiscuss from './TPMShixunDiscuss'
import axios from 'axios';
class TPMShixunDiscussContainer extends Component {
constructor(props) {
@ -14,32 +10,25 @@ class TPMShixunDiscussContainer extends Component {
}
}
componentWillReceiveProps(newProps, newContext) {
}
componentDidMount() {
}
render() {
const { tpmLoading } = this.props;
const user = this.props.current_user;
return (
<React.Fragment>
{ tpmLoading ? <div style={{ minHeight: '886px'}}></div> :
render() {
const { tpmLoading } = this.props;
const user = this.props.current_user;
return (
<React.Fragment>
{tpmLoading ? <div style={{ minHeight: '886px' }}></div> :
<TPMShixunDiscuss
{...this.props}
{...this.state}
user={user}
aboutFocus={this.props.aboutFocus}
is_jupyter={this.props.is_jupyter}
{...this.props}
{...this.state}
user={user}
aboutFocus={this.props.aboutFocus}
is_jupyter={this.props.is_jupyter}
>
</TPMShixunDiscuss>
}
</React.Fragment>
);
}
}
</React.Fragment>
);
}
}
export default TPMShixunDiscussContainer;

@ -1,8 +1,8 @@
import React, {Component} from 'react';
import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from "../../../../Loading";
@ -10,8 +10,8 @@ import Bottomsubmit from "../../../modals/Bottomsubmit";
const TPMchallengestask = Loadable({
loader: () => import('../../challengesnew/TPMchallengesnew'),
loading: Loading,
loader: () => import('../../challengesnew/TPMchallengesnew'),
loading: Loading,
})
export default class TpmTaskIndex extends Component {
@ -38,7 +38,7 @@ export default class TpmTaskIndex extends Component {
<Switch {...this.props}>
{/*新建关卡*/}
<Route path="/shixuns/:shixunId/challenges/new" render={
(props) => (<TPMchallengestask {...this.props} {...props} {...this.state}/>)
(props) => (<TPMchallengestask {...this.props} {...props} {...this.state} />)
}></Route>
{/*编辑关卡*/}

@ -4,7 +4,7 @@ import { Route, Switch } from "react-router-dom";
import CNotificationHOC from '../courses/common/CNotificationHOC'
import Loading from '../../Loading';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import TPMIndexHOC from '../tpm/TPMIndexHOC';

@ -1,13 +1,13 @@
import React, { Component } from 'react';
import {Link} from 'react-router-dom';
import {Tooltip,Menu} from 'antd';
import Loadable from 'react-loadable';
import { Link } from 'react-router-dom';
import { Tooltip, Menu } from 'antd';
import { Loadable } from 'educoder';
import Loading from '../../../Loading';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import UpgradeModals from '../../modals/UpgradeModals';
import axios from 'axios';
import {getImageUrl} from 'educoder';
import { getImageUrl } from 'educoder';
import InfosBanner from './InfosBanner'
import "./usersInfo.css"
@ -19,73 +19,73 @@ import Trialapplication from '../../login/Trialapplication'
const InfosPackage = Loadable({
loader: () => import('./InfosPackage'),
loading:Loading,
loader: () => import('./InfosPackage'),
loading: Loading,
})
const InfosCourse = Loadable({
loader: () => import('./InfosCourse'),
loading:Loading,
loading: Loading,
})
const InfosShixun = Loadable({
loader: () => import('./InfosShixun'),
loading:Loading,
loading: Loading,
})
const InfosPath = Loadable({
loader: () => import('./InfosPath'),
loading:Loading,
loading: Loading,
})
const InfosProject = Loadable({
loader: () => import('./InfosProject'),
loading:Loading,
loading: Loading,
})
const InfosVideo = Loadable({
loader: () => import('./video/InfosVideo'),
loading:Loading,
loading: Loading,
})
const InfosTopics=Loadable({
loader: () => import('./InfosTopics'),
loading:Loading,
const InfosTopics = Loadable({
loader: () => import('./InfosTopics'),
loading: Loading,
})
const $ = window.$;
class Infos extends Component{
constructor(props){
class Infos extends Component {
constructor(props) {
super(props);
this.state={
data:undefined,
is_current:undefined,
is_edit:false,
sign:undefined,
type:0,
login:undefined,
isRenders:false,
moduleName:"courses",
next_gold:undefined
this.state = {
data: undefined,
is_current: undefined,
is_edit: false,
sign: undefined,
type: 0,
login: undefined,
isRenders: false,
moduleName: "courses",
next_gold: undefined
}
}
componentDidMount =()=>{
let upsystem=`/users/system_update.json`;
axios.get(upsystem).then((response)=>{
let updata=response.data;
this.setState({
updata:updata
})
}).catch((error)=>{
console.log(error);
})
this.getInfo(this.props.match.params.username);
componentDidMount = () => {
let upsystem = `/users/system_update.json`;
axios.get(upsystem).then((response) => {
let updata = response.data;
this.setState({
updata: updata
})
}).catch((error) => {
console.log(error);
})
this.getInfo(this.props.match.params.username);
}
//判断是否看的是当前用户的个人主页
componentDidUpdate =(prevProps)=> {
if(this.props.current_user && prevProps.current_user != this.props.current_user){
if(this.props.current_user.login != this.props.match.params.username){
componentDidUpdate = (prevProps) => {
if (this.props.current_user && prevProps.current_user != this.props.current_user) {
if (this.props.current_user.login != this.props.match.params.username) {
this.setState({
is_current:false,
login:this.props.current_user.login
is_current: false,
login: this.props.current_user.login
})
}
} else {
@ -98,72 +98,72 @@ class Infos extends Component{
//获取个人主页信息
getInfo = (user_login) =>{
let url =`/users/${user_login}/homepage_info.json`;
axios.get(url).then((result)=>{
if(result){
if (result.data.status === 403||result.data.status === 401||result.data.status === 500||result.data.status === 404) {
}else{
this.setState({
data:result.data,
followed:result.data.followed,
sign:result.data.brief_introduction,
id:result.data.id,
next_gold:result.data.tomorrow_attendance_gold
})
}
getInfo = (user_login) => {
let url = `/users/${user_login}/homepage_info.json`;
axios.get(url).then((result) => {
if (result) {
if (result.data.status === 403 || result.data.status === 401 || result.data.status === 500 || result.data.status === 404) {
} else {
this.setState({
data: result.data,
followed: result.data.followed,
sign: result.data.brief_introduction,
id: result.data.id,
next_gold: result.data.tomorrow_attendance_gold
})
}
}
}).catch((error)=>{
}).catch((error) => {
console.log(error);
})
}
// 编辑签名
editmysign=()=>{
editmysign = () => {
this.setState({
is_edit:true
},()=>{
is_edit: true
}, () => {
$("#mysign").focus();
})
}
// 输入签名
inputSign=(e)=>{
inputSign = (e) => {
this.setState({
sign:e.target.value
sign: e.target.value
})
}
//取消编辑签名
savemysign=()=>{
let { sign } =this.state;
let url=`/users/brief_introduction.json`;
axios.post((url),{
content:sign
}).then((result)=>{
if(result){
savemysign = () => {
let { sign } = this.state;
let url = `/users/brief_introduction.json`;
axios.post((url), {
content: sign
}).then((result) => {
if (result) {
this.setState({
is_edit:false
is_edit: false
})
}
}).catch((error)=>{
}).catch((error) => {
console.log(error)
})
}
changeType=(e)=>{
changeType = (e) => {
this.setState({
type:e.key
type: e.key
})
}
turnTo=(url)=>{
turnTo = (url) => {
this.props.history.push(url);
}
//签到
signFor=()=>{
let url=`/users/attendance.json`
axios.post(url).then((result)=>{
if(result){
signFor = () => {
let url = `/users/attendance.json`
axios.post(url).then((result) => {
if (result) {
// this.setState(
// (prevState) => ({
// data : update(prevState.data, {attendance_signed: {$set: true} })
@ -174,35 +174,35 @@ class Infos extends Component{
// })
this.getInfo(this.props.match.params.username);
}
}).catch((error)=>{
}).catch((error) => {
console.log(error);
})
}
// 关注
followPerson=()=>{
let{followed,id}=this.state;
let url=`/users/${id}/watch.json`;
followPerson = () => {
let { followed, id } = this.state;
let url = `/users/${id}/watch.json`;
// 取消关注
if(followed){
axios.delete(url).then((result)=>{
if(result){
if (followed) {
axios.delete(url).then((result) => {
if (result) {
this.setState({
followed:false
followed: false
})
}
}).catch((error)=>{
}).catch((error) => {
console.log(error)
})
}else{
} else {
// 关注
axios.post(url).then((result)=>{
if(result){
axios.post(url).then((result) => {
if (result) {
this.setState({
followed:true
followed: true
})
}
}).catch((error)=>{
}).catch((error) => {
console.log(error);
})
}
@ -215,18 +215,18 @@ class Infos extends Component{
// showTrial:true
// })
// }
cancelModulationModels=()=>{
cancelModulationModels = () => {
this.setState({
isRenders: false
})
}
ToBank=(url)=>{
window.location.href=url;
ToBank = (url) => {
window.location.href = url;
}
render(){
render() {
let {
data ,
data,
is_edit,
sign,
type,
@ -235,93 +235,93 @@ class Infos extends Component{
isRenders,
moduleName,
next_gold
}=this.state;
} = this.state;
let isCurrent = true;
let currentLogin;
if(this.props.current_user && this.props.current_user.login != this.props.match.params.username){
isCurrent=false;
if (this.props.current_user && this.props.current_user.login != this.props.match.params.username) {
isCurrent = false;
currentLogin = this.props.current_user.login;
}
const _commonProps = {
is_current: isCurrent,
login: currentLogin
}
return(
return (
<div className="newMain">
{this.state.updata===undefined?"":<UpgradeModals
{...this.state}
/>}
{this.state.updata === undefined ? "" : <UpgradeModals
{...this.state}
/>}
{
isRenders && <Trialapplication {...this.props} {...this.state} Cancel={() => this.cancelModulationModels()}/>
isRenders && <Trialapplication {...this.props} {...this.state} Cancel={() => this.cancelModulationModels()} />
}
<InfosBanner
{...this.props}
{...this.state}
{..._commonProps}
signFor={this.signFor}
followPerson={this.followPerson}
{..._commonProps}
signFor={this.signFor}
followPerson={this.followPerson}
></InfosBanner>
<Switch {...this.props}>
{/* --------------------------------------------------------------------- */}
{/* 题库 */}
<Route exact path="/users/:username/topics/:topicstype"
render={
(props) => (<InfosTopics {...this.props} {...props} {...this.state} {..._commonProps}/>)
}
></Route>
{/* --------------------------------------------------------------------- */}
{/* 题库 */}
<Route exact path="/users/:username/topics/:topicstype"
render={
(props) => (<InfosTopics {...this.props} {...props} {...this.state} {..._commonProps} />)
}
></Route>
{/* 课堂 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */}
{/* 课堂 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */}
<Route exact path="/users/:username/courses"
render={
(props) => (<InfosCourse {...this.props} {...props} {...this.state} {..._commonProps}/>)
}
></Route>
render={
(props) => (<InfosCourse {...this.props} {...props} {...this.state} {..._commonProps} />)
}
></Route>
{/* 实训项目 */}
<Route exact path="/users/:username/shixuns"
render={
(props) => (<InfosShixun {...this.props} {...props} {...this.state} {..._commonProps}/>)
}
></Route>
<Route exact path="/users/:username/shixuns"
render={
(props) => (<InfosShixun {...this.props} {...props} {...this.state} {..._commonProps} />)
}
></Route>
{/* 实践课程 */}
<Route exact path="/users/:username/paths"
render={
(props) => (<InfosPath {...this.props} {...props} {...this.state} {..._commonProps}/>)
}
></Route>
<Route exact path="/users/:username/paths"
render={
(props) => (<InfosPath {...this.props} {...props} {...this.state} {..._commonProps} />)
}
></Route>
{/* 开发项目 */}
<Route exact path="/users/:username/projects"
render={
(props) => (<InfosProject {...this.props} {...props} {...this.state} {..._commonProps}/>)
}
></Route>
{/* 众包 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */}
<Route exact path="/users/:username/package"
render={
(props) => (<InfosPackage {...this.props} {...props} {...this.state} {..._commonProps}/>)
}
></Route>
{/* 视频 */}
<Route exact path="/users/:username/videos"
render={
(props) => (<InfosVideo {...this.props} {...props} {...this.state} {..._commonProps}/>)
}
></Route>
<Route exact path="/users/:username/projects"
render={
(props) => (<InfosProject {...this.props} {...props} {...this.state} {..._commonProps} />)
}
></Route>
{/* 众包 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */}
<Route exact path="/users/:username/package"
render={
(props) => (<InfosPackage {...this.props} {...props} {...this.state} {..._commonProps} />)
}
></Route>
{/* 视频 */}
<Route exact path="/users/:username/videos"
render={
(props) => (<InfosVideo {...this.props} {...props} {...this.state} {..._commonProps} />)
}
></Route>
<Route exact path="/users/:username"
render={
(props) => (<InfosCourse {...this.props} {...props} {...this.state} {..._commonProps}/>)
}
></Route>
render={
(props) => (<InfosCourse {...this.props} {...props} {...this.state} {..._commonProps} />)
}
></Route>
</Switch>
</div>
@ -329,4 +329,4 @@ class Infos extends Component{
}
}
// CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC))
export default (Infos) ;
export default (Infos);

@ -5,7 +5,7 @@ import { SnackbarHOC } from 'educoder';
import TPMIndexHOC from '../../tpm/TPMIndexHOC';
import CNotificationHOC from '../../courses/common/CNotificationHOC'
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../../Loading';

@ -10,7 +10,7 @@ import "../usersInfo.css"
import "../../../courses/css/members.css"
import "../../../courses/css/Courses.css"
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../../../Loading';
// 毕设选题

@ -1,62 +1,62 @@
import React, { Component } from 'react';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import Loadable from 'react-loadable';
import { Loadable } from 'educoder';
import Loading from '../../../../Loading';
import BanksMenu from './banksMenu'
// 毕设选题
const GtopicBanks = Loadable({
loader: () => import('./GtopicBanks'),
loading: Loading,
loader: () => import('./GtopicBanks'),
loading: Loading,
})
// 问卷内容
const PollBanks = Loadable({
loader: () => import('./PollBanksContent'),
loading: Loading,
loader: () => import('./PollBanksContent'),
loading: Loading,
})
// 试卷详情
const ExerciseBanksDetail = Loadable({
loader: () => import('./ExerciseBanksDetail'),
loading: Loading,
loader: () => import('./ExerciseBanksDetail'),
loading: Loading,
});
class BanksTabIndex extends Component{
constructor(props){
class BanksTabIndex extends Component {
constructor(props) {
super(props);
this.state={
banksMenu:undefined
this.state = {
banksMenu: undefined
}
}
initPublic = (crumbData,menuData,data) =>{
initPublic = (crumbData, menuData, data) => {
this.setState({
banksMenu:menuData
banksMenu: menuData
})
this.props.initPublic(crumbData,data);
this.props.initPublic(crumbData, data);
}
render(){
let{
banksMenu
}=this.state
render() {
let {
banksMenu
} = this.state
const common={
initPublic:this.initPublic,
const common = {
initPublic: this.initPublic,
};
console.log("BanksTabIndex");
console.log(banksMenu);
console.log(this.props);
return(
return (
<React.Fragment>
{
banksMenu &&
<BanksMenu
banksMenu &&
<BanksMenu
banksMenu={banksMenu}
{...this.props}
{...this.state}
{...this.state}
{...common}
></BanksMenu>
}
@ -67,20 +67,20 @@ class BanksTabIndex extends Component{
return (<ExerciseBanksDetail {...this.props} {...props} {...this.state} {...common}
/>)
}
}></Route>
}></Route>
<Route path={`/banks/gtopic/:bankId/:type`}
render={
(props) => {
return (<GtopicBanks {...this.props} {...props} {...this.state} {...common} />)
}
}></Route>
}></Route>
<Route path={`/banks/poll/:bankId/:type`}
render={
(props) => {
return (<PollBanks {...this.props} {...props} {...this.state} {...common} />)
}
}></Route>
}></Route>
</Switch>
</React.Fragment>

Loading…
Cancel
Save