From 3090fb2928a3e0c450c118bf1ebe072377e7df0d Mon Sep 17 00:00:00 2001 From: p31729568 Date: Tue, 3 Sep 2019 14:16:48 +0800 Subject: [PATCH 1/4] get online user count method --- app/libs/util/redis.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/libs/util/redis.rb diff --git a/app/libs/util/redis.rb b/app/libs/util/redis.rb new file mode 100644 index 000000000..3acd1cef7 --- /dev/null +++ b/app/libs/util/redis.rb @@ -0,0 +1,9 @@ +module Util::Redis + class << self + def online_user_count + if Rails.cache.is_a?(ActiveSupport::Cache::RedisStore) + Rails.cache.data.scan(0, match: 'cache:_session_id:*', count: 100000).last.size + end + end + end +end \ No newline at end of file From 4d90ed752b7dde749fae6797ee3eb4c8d2cafafc Mon Sep 17 00:00:00 2001 From: p31729568 Date: Tue, 3 Sep 2019 14:21:58 +0800 Subject: [PATCH 2/4] fix --- app/libs/util/redis.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/libs/util/redis.rb b/app/libs/util/redis.rb index 3acd1cef7..f240406f5 100644 --- a/app/libs/util/redis.rb +++ b/app/libs/util/redis.rb @@ -2,7 +2,7 @@ module Util::Redis class << self def online_user_count if Rails.cache.is_a?(ActiveSupport::Cache::RedisStore) - Rails.cache.data.scan(0, match: 'cache:_session_id:*', count: 100000).last.size + Rails.cache.data.scan(0, match: 'cache:_session_id:*', count: 100000).last.uniq.size end end end From adbf182644c0d8a34e12199e9610e64b9f80cb67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 3 Sep 2019 14:29:23 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=97=A7=E7=89=88?= =?UTF-8?q?=E9=A2=98=E5=BA=93=E8=AF=AF=E6=93=8D=E4=BD=9C=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E5=88=B0=E9=98=BF=E9=87=8C=E4=BA=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Index.js | 44 ----- .../Completetaskdetails.js | 84 --------- .../completetaskdetails/Completetaskpage.js | 138 -------------- .../completetaskdetails.css | 58 ------ .../comtopicdetails/CompletetopicdePage.js | 141 -------------- .../comtopicdetails/Completetopicdetails.js | 115 ------------ .../comtopicdetails/completetopicde.css | 58 ------ .../courses/groupjobbank/GroupPackage.js | 87 --------- .../courses/groupjobbank/GroupPackage2.js | 73 -------- .../groupjobbank/Groupjobbandetails.js | 84 --------- .../courses/groupjobbank/GroupjobbankPage.js | 175 ------------------ .../groupjobbank/Groupjobquesanswer.js | 82 -------- .../courses/groupjobbank/questionbanks.css | 41 ---- .../courses/questionbank/Generaljobanswer.js | 79 -------- .../questionbank/Generaljobbankdetails.js | 173 ----------------- .../courses/questionbank/Generaljobdetails.js | 81 -------- .../courses/questionbank/questionbank.css | 26 --- 17 files changed, 1539 deletions(-) delete mode 100644 public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js delete mode 100644 public/react/src/modules/courses/completetaskdetails/Completetaskpage.js delete mode 100644 public/react/src/modules/courses/completetaskdetails/completetaskdetails.css delete mode 100644 public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js delete mode 100644 public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js delete mode 100644 public/react/src/modules/courses/comtopicdetails/completetopicde.css delete mode 100644 public/react/src/modules/courses/groupjobbank/GroupPackage.js delete mode 100644 public/react/src/modules/courses/groupjobbank/GroupPackage2.js delete mode 100644 public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js delete mode 100644 public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js delete mode 100644 public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js delete mode 100644 public/react/src/modules/courses/groupjobbank/questionbanks.css delete mode 100644 public/react/src/modules/courses/questionbank/Generaljobanswer.js delete mode 100644 public/react/src/modules/courses/questionbank/Generaljobbankdetails.js delete mode 100644 public/react/src/modules/courses/questionbank/Generaljobdetails.js delete mode 100644 public/react/src/modules/courses/questionbank/questionbank.css diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index 7da04dd0e..30eff83d4 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -263,26 +263,6 @@ const GraduationTasksSubmitnewApp=Loadable({ const GraduationTasksSubmiteditApp=Loadable({ loader: () => import('./graduation/tasks/GraduationTasksSubmitedit'), loading: Loading, -}) -//普通作业题库详情 -const Generaljobbankdetails =Loadable({ - loader: () => import('../../modules/courses/questionbank/Generaljobbankdetails'), - loading: Loading, -}); -//分组作业题库详情 -const GroupjobbankPage =Loadable({ - loader: () => import('../../modules/courses/groupjobbank/GroupjobbankPage'), - loading: Loading, -}); -//毕设选题详情 -const CompletetopicdePage =Loadable({ - loader: () => import('../../modules/courses/comtopicdetails/CompletetopicdePage'), - loading: Loading, -}); -//毕设任务详情 -const Completetaskpage =Loadable({ - loader: () => import('../../modules/courses/completetaskdetails/Completetaskpage'), - loading: Loading, }); class CoursesIndex extends Component{ constructor(props) { @@ -470,30 +450,6 @@ class CoursesIndex extends Component{ // console.log(commons) return ( - {/*毕设任务题库详情*/} - () - } - > - {/*毕设内容题库详情*/} - () - } - > - {/*分组作业题库详情*/} - () - } - > - {/* 普通作业题库详情*/} - () - } - > {/* 资源列表页 */} { - var homeworkid = this.props.match.params.homeworkid; - } - - //跳转道描点的地方 - scrollToAnchor = (anchorName) => { - if (anchorName) { - // 找到锚点 - let anchorElement = document.getElementById(anchorName); - // 如果对应id的锚点存在,就跳转到锚点 - if(anchorElement) { anchorElement.scrollIntoView(); } - } - }; - - - - render() { - - return ( -
-
- -
- - - - -
- - -
- - - ) - } -} - -export default Groupjobbandetails; \ No newline at end of file diff --git a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js deleted file mode 100644 index d7cd7a62c..000000000 --- a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js +++ /dev/null @@ -1,138 +0,0 @@ -import React, {Component} from "react"; -import {Link, NavLink} from 'react-router-dom'; -import {WordsBtn, ActionBtn} from 'educoder'; -import axios from 'axios'; -import { - notification -} from "antd"; -import CoursesListType from '../coursesPublic/CoursesListType'; -import Completetaskdetails from './Completetaskdetails'; -import '../css/members.css'; -import "../common/formCommon.css"; -import '../css/Courses.css'; -import '../css/busyWork.css'; -import '../poll/pollStyle.css'; - -class Completetaskpage extends Component { - //分组作业内容详情 - constructor(props) { - super(props); - // this.answerMdRef = React.createRef(); - this.setState({ - workid:1, - isSpin:false, - datas:[], - }) - } - - - - componentDidMount() { - // console.log("父组件加载框"); - if( this.props.match.params.workid){ - this.setState({ - workid: this.props.match.params.workid, - }) - } - this.getdata(this.props.match.params.workid); - } - // 获取数据的地方 - getdata=(workid)=>{ - var workids= workid; - if(workids){ - - }else{ - workids=this.state.workid; - } - this.setState({ - isSpin:true, - }) - let url = `/homework_banks/${workids}.json`; - // - axios.get(url).then((response) => { - if(response){ - if(response.data){ - this.setState({ - datas:response.data.informs, - }) - }else { - this.setState({ - datas:[], - - }) - - } - }else { - this.setState({ - datas:[], - }) - - } - this.setState({ - isSpin:false, - }) - }).catch((error) => { - console.log(error) - this.setState({ - datas:[], - isSpin:false, - }) - }); - } - - - - bindRef = ref => { this.child = ref } -///////////////教师截止 - - render() { - - const isAdmin = this.props.isAdmin(); - // console.log(119) - - - return ( -
- - -
- -
-

- 题库 - > - 详情 -

-
-
-

- MySQL数据库编程开发实训(基础篇) -

- -
- -
- -
- - - -
-
- ) - } -} - -export default Completetaskpage; - diff --git a/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css b/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css deleted file mode 100644 index fd1b10f51..000000000 --- a/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css +++ /dev/null @@ -1,58 +0,0 @@ -.yslquestionbank1{ - padding-top: 30px !important; - padding-right: 30px !important; - padding-left: 30px !important; -} -.yslquesHeigth{ - min-height: 500px !important; - -} -.yslquesmarkdowntext{ - font-size: 16px; - color: #707070; - -} -.yslquesmat26{ - margin-top: 26px; - padding-bottom: 33px !important; -} -.ysltextcolor9999{ - color: #999999; - font-size: 14px; -} -.ysltextcolor66{ - color: #666666; - font-size: 14px; -} -.ysltextcolor05{ - color: #05101A; - font-size: 14px; -} -.ml47text{ - margin-left: 17px; - padding-bottom: 37px; -} -.ysltextcolor99999{ - color: #999999; - font-size: 16px; -} -.yslboomdivs{ - - display: flex; - justify-content:flex-start; -} -.yslboomdivs p{ - width: 282px; -} -.yslboomdivs p span { - text-align: left; -} -.yslboomdivsy{ - color: #999999; - font-size: 14px; - -} -.yslboomdivsys{ - color: #666666; - font-size: 14px; -} \ No newline at end of file diff --git a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js deleted file mode 100644 index cde4f5f5e..000000000 --- a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js +++ /dev/null @@ -1,141 +0,0 @@ -import React, {Component} from "react"; -import {Link, NavLink} from 'react-router-dom'; -import {WordsBtn, ActionBtn} from 'educoder'; -import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; -import axios from 'axios'; -import { - notification -} from "antd"; -import CoursesListType from '../coursesPublic/CoursesListType'; -import Completetopicdetails from './Completetopicdetails'; -import '../css/members.css'; -import "../common/formCommon.css"; -import '../css/Courses.css'; -import '../css/busyWork.css'; -import '../poll/pollStyle.css'; - -class CompletetopicdePage extends Component { - //毕设选题内容详情 - constructor(props) { - super(props); - // this.answerMdRef = React.createRef(); - this.setState({ - workid:1, - isSpin:false, - datas:[], - }) - } - - - - - componentDidMount() { - if( this.props.match.params.workid){ - this.setState({ - workid: this.props.match.params.workid, - }) - } - this.getdata(this.props.match.params.workid); - } - //获取数据的地方 - getdata=(workid)=>{ - var workids= workid; - if(workids){ - - }else{ - workids=this.state.workid; - } - this.setState({ - isSpin:true, - }) - let url = `/homework_banks/${workids}.json`; - // - axios.get(url).then((response) => { - if(response){ - if(response.data){ - this.setState({ - datas:response.data.informs, - }) - }else { - this.setState({ - datas:[], - - }) - - } - }else { - this.setState({ - datas:[], - }) - - } - this.setState({ - isSpin:false, - }) - }).catch((error) => { - console.log(error) - this.setState({ - datas:[], - isSpin:false, - }) - }); - } - - /// 确认是否下载 - - - bindRef = ref => { this.child = ref } -///////////////教师截止 - - render() { - - const isAdmin = this.props.isAdmin(); - // console.log(119) - - - return ( -
- - -
- -
-

- 题库 - > - 详情 -

-
-
-

- MySQL数据库编程开发实训(基础篇) -

- -
- -
- -
- - - {/*{parseInt(tab) === 1 ? :""}*/} - -
-
- ) - } -} - -export default CompletetopicdePage; - diff --git a/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js b/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js deleted file mode 100644 index 15b4c24cf..000000000 --- a/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js +++ /dev/null @@ -1,115 +0,0 @@ -import React, {Component} from "react"; -import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; -import { - Button, - Checkbox, - message, - InputNumber, - DatePicker, - Radio, - Tooltip, - notification, -} from "antd"; -import GroupPackage from '../groupjobbank/GroupPackage' -import './completetopicde.css'; - - -class Completetopicdetails extends Component { - - constructor(props) { - super(props); - - this.state = { - - } - } - - componentDidMount() { - console.log("Generaljobdetails"); - console.log("componentDidMount"); - // let query = this.props.location.pathname; - // const type = query.split('/'); - // this.setState({ - // shixuntypes:type[3] - // }) - // this.props.triggerRef(this); - - - - - } - // 获取数据地方 - getTrainingjobsetting = () => { - var homeworkid = this.props.match.params.homeworkid; - } - - //跳转道描点的地方 - scrollToAnchor = (anchorName) => { - if (anchorName) { - // 找到锚点 - let anchorElement = document.getElementById(anchorName); - // 如果对应id的锚点存在,就跳转到锚点 - if(anchorElement) { anchorElement.scrollIntoView(); } - } - }; - - - - render() { - - return ( -
-
-
- -
- - -
-
-
-
-

- 课题类型: - 设计 -

-

- 课题来源: - 生产/社会实践 -

-

- 课题性质1: - 设计 -

-

- 课题性质2: - 设计 -

-
-
-

- 课题重复情况: - 新需求 -

-

- 调研或实习地点: - 长沙 -

-

- 课题单位来源: - 湖南省据C++创始人Stroustrup有限公司 -

-
-
-
- - - ) - } -} - -export default Completetopicdetails; \ No newline at end of file diff --git a/public/react/src/modules/courses/comtopicdetails/completetopicde.css b/public/react/src/modules/courses/comtopicdetails/completetopicde.css deleted file mode 100644 index fd566ffdc..000000000 --- a/public/react/src/modules/courses/comtopicdetails/completetopicde.css +++ /dev/null @@ -1,58 +0,0 @@ -.yslquestionbank1{ - padding-top: 30px !important; - padding-right: 30px !important; - padding-left: 30px !important; -} -.yslquesHeigth{ - min-height: 500px !important; - -} -.yslquesmarkdowntext{ - font-size: 16px; - color: #707070; - -} -.yslquesmat26{ - margin-top: 26px; - padding-bottom: 33px !important; -} -.ysltextcolor9999{ - color: #999999; - font-size: 14px; -} -.ysltextcolor66{ - color: #666666; - font-size: 14px; -} -.ysltextcolor05{ - color: #05101A; - font-size: 14px; -} -.ml47text{ - margin-left: 17px; - padding-bottom: 37px; -} -.ysltextcolor99999{ - color: #999999; - font-size: 16px; -} -.yslboomdivs{ - - display: flex; - justify-content:flex-start; -} -.yslboomdivs p{ - width: 282px; -} -.yslboomdivs p span { - text-align: left; -} -.yslboomdivsy{ - color: #999999; - font-size: 14px; - -} -.yslboomdivsys{ - color: #666666; - font-size: 14px; -} \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/GroupPackage.js b/public/react/src/modules/courses/groupjobbank/GroupPackage.js deleted file mode 100644 index 8014585d1..000000000 --- a/public/react/src/modules/courses/groupjobbank/GroupPackage.js +++ /dev/null @@ -1,87 +0,0 @@ -import React, {Component} from "react"; -import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; -import { - Button, - Checkbox, - message, - InputNumber, - DatePicker, - Radio, - Tooltip, - notification, -} from "antd"; -import './questionbanks.css'; - -class GroupPackage extends Component { - - constructor(props) { - super(props); - - this.state = { - - } - } - - componentDidMount() { - console.log("Groupjobquesanswer"); - console.log("componentDidMount"); - // let query = this.props.location.pathname; - // const type = query.split('/'); - // this.setState({ - // shixuntypes:type[3] - // }) - // this.props.triggerRef(this); - - - - - } - // 获取数据地方 - getTrainingjobsetting = () => { - var homeworkid = this.props.match.params.homeworkid; - } - - //跳转道描点的地方 - scrollToAnchor = (anchorName) => { - if (anchorName) { - // 找到锚点 - let anchorElement = document.getElementById(anchorName); - // 如果对应id的锚点存在,就跳转到锚点 - if(anchorElement) { anchorElement.scrollIntoView(); } - } - }; - - - - render() { - - return ( -
- - - - - - 清除浏览器缓存或换个浏览器操作指南更新版本.zip - - {2} - -
- ) - } -} - -export default GroupPackage; \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/GroupPackage2.js b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js deleted file mode 100644 index 6a48a51c8..000000000 --- a/public/react/src/modules/courses/groupjobbank/GroupPackage2.js +++ /dev/null @@ -1,73 +0,0 @@ -import React, {Component} from "react"; -import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; -import { - Button, - Checkbox, - message, - InputNumber, - DatePicker, - Radio, - Tooltip, - notification, -} from "antd"; -import './questionbanks.css'; - -class GroupPackage extends Component { - - constructor(props) { - super(props); - - this.state = { - - } - } - - componentDidMount() { - console.log("Groupjobquesanswer"); - console.log("componentDidMount"); - // let query = this.props.location.pathname; - // const type = query.split('/'); - // this.setState({ - // shixuntypes:type[3] - // }) - // this.props.triggerRef(this); - - - - - } - // 获取数据地方 - getTrainingjobsetting = () => { - var homeworkid = this.props.match.params.homeworkid; - } - - //跳转道描点的地方 - scrollToAnchor = (anchorName) => { - if (anchorName) { - // 找到锚点 - let anchorElement = document.getElementById(anchorName); - // 如果对应id的锚点存在,就跳转到锚点 - if(anchorElement) { anchorElement.scrollIntoView(); } - } - }; - - - - render() { - - return ( -
-

- 分组要求: - 2~ 5(学生提交作品时需要关联同组成员,组内成员作品共享) -

-

- 基于项目实施 - (学生必须在本平台创建项目,项目管理员可以提交作品) -

-
- ) - } -} - -export default GroupPackage; \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js b/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js deleted file mode 100644 index 772752def..000000000 --- a/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js +++ /dev/null @@ -1,84 +0,0 @@ -import React, {Component} from "react"; -import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; -import { - Button, - Checkbox, - message, - InputNumber, - DatePicker, - Radio, - Tooltip, - notification, -} from "antd"; -import './questionbanks.css'; -import GroupPackage from "./GroupPackage"; -import GroupPackage2 from "./GroupPackage2"; - - -class Groupjobbandetails extends Component { - - constructor(props) { - super(props); - - this.state = { - - } - } - - componentDidMount() { - console.log("Groupjobbandetails"); - console.log("componentDidMount"); - // let query = this.props.location.pathname; - // const type = query.split('/'); - // this.setState({ - // shixuntypes:type[3] - // }) - // this.props.triggerRef(this); - - - - - } - // 获取数据地方 - getTrainingjobsetting = () => { - var homeworkid = this.props.match.params.homeworkid; - } - - //跳转道描点的地方 - scrollToAnchor = (anchorName) => { - if (anchorName) { - // 找到锚点 - let anchorElement = document.getElementById(anchorName); - // 如果对应id的锚点存在,就跳转到锚点 - if(anchorElement) { anchorElement.scrollIntoView(); } - } - }; - - - - render() { - - return ( -
-
- -
- - - - -
- - -
- - - ) - } -} - -export default Groupjobbandetails; \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js deleted file mode 100644 index 27827eb28..000000000 --- a/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js +++ /dev/null @@ -1,175 +0,0 @@ -import React, {Component} from "react"; -import {Link, NavLink} from 'react-router-dom'; -import {WordsBtn, ActionBtn} from 'educoder'; -import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; -import axios from 'axios'; -import { - notification -} from "antd"; -import CoursesListType from '../coursesPublic/CoursesListType'; -import Groupjobbandetails from './Groupjobbandetails'; -import Groupjobquesanswer from './Groupjobquesanswer'; -import '../css/members.css'; -import "../common/formCommon.css"; -import '../css/Courses.css'; -import '../css/busyWork.css'; -import '../poll/pollStyle.css'; - -class GroupjobbankPage extends Component { - //分组作业内容详情 - constructor(props) { - super(props); - // this.answerMdRef = React.createRef(); - this.state = { - tab: ["0"], - workid:1, - isSpin:false, - datas:[], - } - - } - - //切换tab - ChangeTab = (e) => { - // console.log(e); - this.setState({ - tab: e - }) - try { - var currenturl = window.location.href; - var newUrl = (currenturl.split("?"))[0]; - window.history.pushState('','',newUrl+'?tab='+e); - }catch (e) { - console.log(e); - console.log("44"); - } - - } - - - componentDidMount() { - // console.log("父组件加载框"); - const query = this.props.location.search; - const type = query.split('?tab='); - // let sum = [] - // sum.push(type[1]) - // console.log("componentDidMountcomponentDidMount"); - // console.log(type); - this.setState({ - tab: type[1], - }) - let querys = this.props.location.pathname; - const types = querys.split('/'); - // console.log(types); - this.setState({ - shixuntypes: types[3] - }) - if( this.props.match.params.workid){ - this.setState({ - workid: this.props.match.params.workid, - }) - } - this.getdata(this.props.match.params.workid); - } - ///获取数据的地方 - getdata=(workid)=>{ - var workids= workid; - if(workids){ - - }else{ - workids=this.state.workid; - } - this.setState({ - isSpin:true, - }) - let url = `/homework_banks/${workids}.json`; - // - axios.get(url).then((response) => { - if(response){ - if(response.data){ - this.setState({ - datas:response.data.informs, - }) - }else { - this.setState({ - datas:[], - - }) - - } - }else { - this.setState({ - datas:[], - }) - - } - this.setState({ - isSpin:false, - }) - }).catch((error) => { - console.log(error) - this.setState({ - datas:[], - isSpin:false, - }) - }); - } - - - bindRef = ref => { this.child = ref } -///////////////教师截止 - - render() { - let {tab} = this.state; - - const isAdmin = this.props.isAdmin(); - // console.log(119) - - - return ( -
- - -
- -
-

- 题库 - > - 详情 -

-
-
-

- MySQL数据库编程开发实训(基础篇) -

- -
- - - - {parseInt(tab) === 0 ? :""} - {parseInt(tab) === 1 ? :""} - -
-
- ) - } -} - -export default GroupjobbankPage; - diff --git a/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js b/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js deleted file mode 100644 index c6a0f787f..000000000 --- a/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js +++ /dev/null @@ -1,82 +0,0 @@ -import React, {Component} from "react"; -import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; -import { - Button, - Checkbox, - message, - InputNumber, - DatePicker, - Radio, - Tooltip, - notification, -} from "antd"; -import GroupPackage from './GroupPackage'; -import GroupPackage2 from './GroupPackage2'; -import './questionbanks.css'; - -class Groupjobquesanswer extends Component { - - constructor(props) { - super(props); - - this.state = { - - } - } - - componentDidMount() { - console.log("Groupjobquesanswer"); - console.log("componentDidMount"); - // let query = this.props.location.pathname; - // const type = query.split('/'); - // this.setState({ - // shixuntypes:type[3] - // }) - // this.props.triggerRef(this); - - - - - } - // 获取数据地方 - getTrainingjobsetting = () => { - var homeworkid = this.props.match.params.homeworkid; - } - - //跳转道描点的地方 - scrollToAnchor = (anchorName) => { - if (anchorName) { - // 找到锚点 - let anchorElement = document.getElementById(anchorName); - // 如果对应id的锚点存在,就跳转到锚点 - if(anchorElement) { anchorElement.scrollIntoView(); } - } - }; - - - - render() { - - return ( -
-
- -
- - - - -
- - -
- - ) - } -} - -export default Groupjobquesanswer; \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/questionbanks.css b/public/react/src/modules/courses/groupjobbank/questionbanks.css deleted file mode 100644 index aae0c979f..000000000 --- a/public/react/src/modules/courses/groupjobbank/questionbanks.css +++ /dev/null @@ -1,41 +0,0 @@ -.yslquestionbank1{ - padding-top: 30px !important; - padding-right: 30px !important; - padding-left: 30px !important; -} -.yslquesHeigth{ - min-height: 500px !important; - -} -.yslquesmarkdowntext{ - font-size: 16px; - color: #707070; - -} -.yslquesmat26{ - margin-top: 26px; - padding-bottom: 33px !important; -} -.ysltextcolor9999{ - color: #999999; - font-size: 14px; -} -.ysltextcolor66{ - color: #666666; - font-size: 14px; -} -.ysltextcolor05{ - color: #05101A; - font-size: 14px; -} -.ml47text{ - margin-left: 17px; - padding-bottom: 37px; -} -.ysltextcolor99999{ - color: #999999; - font-size: 16px; -} -.yslahover { - color: #999999 ; -} \ No newline at end of file diff --git a/public/react/src/modules/courses/questionbank/Generaljobanswer.js b/public/react/src/modules/courses/questionbank/Generaljobanswer.js deleted file mode 100644 index 3bfc6cd36..000000000 --- a/public/react/src/modules/courses/questionbank/Generaljobanswer.js +++ /dev/null @@ -1,79 +0,0 @@ -import React, {Component} from "react"; -import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; -import { - Button, - Checkbox, - message, - InputNumber, - DatePicker, - Radio, - Tooltip, - notification, -} from "antd"; -import GroupPackage from '../groupjobbank/GroupPackage' -import './questionbank.css'; - -class Generaljobanswer extends Component { - - constructor(props) { - super(props); - - this.state = { - - } - } - - componentDidMount() { - console.log("Generaljobanswer"); - console.log("componentDidMount"); - // let query = this.props.location.pathname; - // const type = query.split('/'); - // this.setState({ - // shixuntypes:type[3] - // }) - // this.props.triggerRef(this); - - - - - } - // 获取数据地方 - getTrainingjobsetting = () => { - var homeworkid = this.props.match.params.homeworkid; - } - - //跳转道描点的地方 - scrollToAnchor = (anchorName) => { - if (anchorName) { - // 找到锚点 - let anchorElement = document.getElementById(anchorName); - // 如果对应id的锚点存在,就跳转到锚点 - if(anchorElement) { anchorElement.scrollIntoView(); } - } - }; - - - - render() { - - return ( -
-
- -
- - -
- - -
- - ) - } -} - -export default Generaljobanswer; \ No newline at end of file diff --git a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js deleted file mode 100644 index 29453a7b5..000000000 --- a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js +++ /dev/null @@ -1,173 +0,0 @@ -import React, {Component} from "react"; -import {Link, NavLink} from 'react-router-dom'; -import {WordsBtn, ActionBtn} from 'educoder'; -import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; -import axios from 'axios'; -import { - notification -} from "antd"; -import CoursesListType from '../coursesPublic/CoursesListType'; -import Generaljobdetails from './Generaljobdetails'; -import Generaljobanswer from './Generaljobanswer'; -import '../css/members.css'; -import "../common/formCommon.css"; -import '../css/Courses.css'; -import '../css/busyWork.css'; -import '../poll/pollStyle.css'; - -class Generaljobbankdetails extends Component { - //普通作业内容详情 - constructor(props) { - super(props); - // this.answerMdRef = React.createRef(); - this.state = { - tab: ["0"], - workid:1, - isSpin:false, - datas:[], - } - - } - - //切换tab - ChangeTab = (e) => { - // console.log(e); - this.setState({ - tab: e - }) - try { - var currenturl = window.location.href; - var newUrl = (currenturl.split("?"))[0]; - window.history.pushState('','',newUrl+'?tab='+e); - }catch (e) { - console.log(e); - console.log("44"); - } - - } - - - componentDidMount() { - // console.log("父组件加载框"); - const query = this.props.location.search; - const type = query.split('?tab='); - // let sum = [] - // sum.push(type[1]) - // console.log("componentDidMountcomponentDidMount"); - // console.log(type); - this.setState({ - tab: type[1], - }); - - - console.log("Generaljobbankdetails"); - console.log(this.props); - if( this.props.match.params.workid){ - this.setState({ - workid: this.props.match.params.workid, - }) - } - this.getdata(this.props.match.params.workid); - } - //获取数据的地方 - getdata=(workid)=>{ - var workids= workid; - if(workids){ - - }else{ - workids=this.state.workid; - } - this.setState({ - isSpin:true, - }) - let url = `/homework_banks/${workids}.json`; - // - axios.get(url).then((response) => { - if(response){ - if(response.data){ - this.setState({ - datas:response.data.informs, - }) - }else { - this.setState({ - datas:[], - - }) - - } - }else { - this.setState({ - datas:[], - }) - - } - this.setState({ - isSpin:false, - }) - }).catch((error) => { - console.log(error) - this.setState({ - datas:[], - isSpin:false, - }) - }); - } - - - bindRef = ref => { this.child = ref } -///////////////教师截止 - - render() { - let {tab} = this.state; - - const isAdmin = this.props.isAdmin(); - // console.log(119) - - - return ( -
- - -
- -
-

- 题库 - > - 详情 -

-
-
-

- MySQL数据库编程开发实训(基础篇) -

- -
- - - - {parseInt(tab) === 0 ? :""} - {parseInt(tab) === 1 ? :""} - -
-
- ) - } -} - -export default Generaljobbankdetails; - diff --git a/public/react/src/modules/courses/questionbank/Generaljobdetails.js b/public/react/src/modules/courses/questionbank/Generaljobdetails.js deleted file mode 100644 index 9de444123..000000000 --- a/public/react/src/modules/courses/questionbank/Generaljobdetails.js +++ /dev/null @@ -1,81 +0,0 @@ -import React, {Component} from "react"; -import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; -import { - Button, - Checkbox, - message, - InputNumber, - DatePicker, - Radio, - Tooltip, - notification, -} from "antd"; -import GroupPackage from '../groupjobbank/GroupPackage' -import './questionbank.css'; - - -class Generaljobdetails extends Component { - - constructor(props) { - super(props); - - this.state = { - - } - } - - componentDidMount() { - console.log("Generaljobdetails"); - console.log("componentDidMount"); - // let query = this.props.location.pathname; - // const type = query.split('/'); - // this.setState({ - // shixuntypes:type[3] - // }) - // this.props.triggerRef(this); - - - - - } - // 获取数据地方 - getTrainingjobsetting = () => { - var homeworkid = this.props.match.params.homeworkid; - } - - //跳转道描点的地方 - scrollToAnchor = (anchorName) => { - if (anchorName) { - // 找到锚点 - let anchorElement = document.getElementById(anchorName); - // 如果对应id的锚点存在,就跳转到锚点 - if(anchorElement) { anchorElement.scrollIntoView(); } - } - }; - - - - render() { - - return ( -
-
- -
- - -
- - -
- - - ) - } -} - -export default Generaljobdetails; \ No newline at end of file diff --git a/public/react/src/modules/courses/questionbank/questionbank.css b/public/react/src/modules/courses/questionbank/questionbank.css deleted file mode 100644 index 43dcfa9c6..000000000 --- a/public/react/src/modules/courses/questionbank/questionbank.css +++ /dev/null @@ -1,26 +0,0 @@ -.yslquestionbank1{ - padding-top: 30px !important; - padding-right: 30px !important; - padding-left: 30px !important; -} -.yslquesHeigth{ - min-height: 500px !important; - -} -.yslquesmarkdowntext{ - font-size: 16px; - color: #707070; - -} -.yslquesmat26{ - margin-top: 26px; - padding-bottom: 44px !important; -} -.ysltextcolor9999{ - color: #999999; - font-size: 14px; -} -.ysltextcolor99999{ - color: #999999; - font-size: 16px; -} \ No newline at end of file From d7b1c3421213efa54254d9efede1851d99b63fdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 3 Sep 2019 15:09:17 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Index.js | 44 +++++ .../Completetaskdetails.js | 84 +++++++++ .../completetaskdetails/Completetaskpage.js | 138 ++++++++++++++ .../completetaskdetails.css | 58 ++++++ .../comtopicdetails/CompletetopicdePage.js | 141 ++++++++++++++ .../comtopicdetails/Completetopicdetails.js | 115 ++++++++++++ .../comtopicdetails/completetopicde.css | 58 ++++++ .../courses/groupjobbank/GroupPackage.js | 87 +++++++++ .../courses/groupjobbank/GroupPackage2.js | 73 ++++++++ .../groupjobbank/Groupjobbandetails.js | 84 +++++++++ .../courses/groupjobbank/GroupjobbankPage.js | 175 ++++++++++++++++++ .../groupjobbank/Groupjobquesanswer.js | 82 ++++++++ .../courses/groupjobbank/questionbanks.css | 41 ++++ .../courses/questionbank/Generaljobanswer.js | 79 ++++++++ .../questionbank/Generaljobbankdetails.js | 173 +++++++++++++++++ .../courses/questionbank/Generaljobdetails.js | 81 ++++++++ .../courses/questionbank/questionbank.css | 26 +++ 17 files changed, 1539 insertions(+) create mode 100644 public/react/src/modules/courses/completetaskdetails/Completetaskdetails.js create mode 100644 public/react/src/modules/courses/completetaskdetails/Completetaskpage.js create mode 100644 public/react/src/modules/courses/completetaskdetails/completetaskdetails.css create mode 100644 public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js create mode 100644 public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js create mode 100644 public/react/src/modules/courses/comtopicdetails/completetopicde.css create mode 100644 public/react/src/modules/courses/groupjobbank/GroupPackage.js create mode 100644 public/react/src/modules/courses/groupjobbank/GroupPackage2.js create mode 100644 public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js create mode 100644 public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js create mode 100644 public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js create mode 100644 public/react/src/modules/courses/groupjobbank/questionbanks.css create mode 100644 public/react/src/modules/courses/questionbank/Generaljobanswer.js create mode 100644 public/react/src/modules/courses/questionbank/Generaljobbankdetails.js create mode 100644 public/react/src/modules/courses/questionbank/Generaljobdetails.js create mode 100644 public/react/src/modules/courses/questionbank/questionbank.css diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index 30eff83d4..7da04dd0e 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -263,6 +263,26 @@ const GraduationTasksSubmitnewApp=Loadable({ const GraduationTasksSubmiteditApp=Loadable({ loader: () => import('./graduation/tasks/GraduationTasksSubmitedit'), loading: Loading, +}) +//普通作业题库详情 +const Generaljobbankdetails =Loadable({ + loader: () => import('../../modules/courses/questionbank/Generaljobbankdetails'), + loading: Loading, +}); +//分组作业题库详情 +const GroupjobbankPage =Loadable({ + loader: () => import('../../modules/courses/groupjobbank/GroupjobbankPage'), + loading: Loading, +}); +//毕设选题详情 +const CompletetopicdePage =Loadable({ + loader: () => import('../../modules/courses/comtopicdetails/CompletetopicdePage'), + loading: Loading, +}); +//毕设任务详情 +const Completetaskpage =Loadable({ + loader: () => import('../../modules/courses/completetaskdetails/Completetaskpage'), + loading: Loading, }); class CoursesIndex extends Component{ constructor(props) { @@ -450,6 +470,30 @@ class CoursesIndex extends Component{ // console.log(commons) return ( + {/*毕设任务题库详情*/} + () + } + > + {/*毕设内容题库详情*/} + () + } + > + {/*分组作业题库详情*/} + () + } + > + {/* 普通作业题库详情*/} + () + } + > {/* 资源列表页 */} { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
+
+ +
+ + + + +
+ + +
+ + + ) + } +} + +export default Groupjobbandetails; \ No newline at end of file diff --git a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js new file mode 100644 index 000000000..d7cd7a62c --- /dev/null +++ b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js @@ -0,0 +1,138 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn} from 'educoder'; +import axios from 'axios'; +import { + notification +} from "antd"; +import CoursesListType from '../coursesPublic/CoursesListType'; +import Completetaskdetails from './Completetaskdetails'; +import '../css/members.css'; +import "../common/formCommon.css"; +import '../css/Courses.css'; +import '../css/busyWork.css'; +import '../poll/pollStyle.css'; + +class Completetaskpage extends Component { + //分组作业内容详情 + constructor(props) { + super(props); + // this.answerMdRef = React.createRef(); + this.setState({ + workid:1, + isSpin:false, + datas:[], + }) + } + + + + componentDidMount() { + // console.log("父组件加载框"); + if( this.props.match.params.workid){ + this.setState({ + workid: this.props.match.params.workid, + }) + } + this.getdata(this.props.match.params.workid); + } + // 获取数据的地方 + getdata=(workid)=>{ + var workids= workid; + if(workids){ + + }else{ + workids=this.state.workid; + } + this.setState({ + isSpin:true, + }) + let url = `/homework_banks/${workids}.json`; + // + axios.get(url).then((response) => { + if(response){ + if(response.data){ + this.setState({ + datas:response.data.informs, + }) + }else { + this.setState({ + datas:[], + + }) + + } + }else { + this.setState({ + datas:[], + }) + + } + this.setState({ + isSpin:false, + }) + }).catch((error) => { + console.log(error) + this.setState({ + datas:[], + isSpin:false, + }) + }); + } + + + + bindRef = ref => { this.child = ref } +///////////////教师截止 + + render() { + + const isAdmin = this.props.isAdmin(); + // console.log(119) + + + return ( +
+ + +
+ +
+

+ 题库 + > + 详情 +

+
+
+

+ MySQL数据库编程开发实训(基础篇) +

+ +
+ +
+ +
+ + + +
+
+ ) + } +} + +export default Completetaskpage; + diff --git a/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css b/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css new file mode 100644 index 000000000..fd1b10f51 --- /dev/null +++ b/public/react/src/modules/courses/completetaskdetails/completetaskdetails.css @@ -0,0 +1,58 @@ +.yslquestionbank1{ + padding-top: 30px !important; + padding-right: 30px !important; + padding-left: 30px !important; +} +.yslquesHeigth{ + min-height: 500px !important; + +} +.yslquesmarkdowntext{ + font-size: 16px; + color: #707070; + +} +.yslquesmat26{ + margin-top: 26px; + padding-bottom: 33px !important; +} +.ysltextcolor9999{ + color: #999999; + font-size: 14px; +} +.ysltextcolor66{ + color: #666666; + font-size: 14px; +} +.ysltextcolor05{ + color: #05101A; + font-size: 14px; +} +.ml47text{ + margin-left: 17px; + padding-bottom: 37px; +} +.ysltextcolor99999{ + color: #999999; + font-size: 16px; +} +.yslboomdivs{ + + display: flex; + justify-content:flex-start; +} +.yslboomdivs p{ + width: 282px; +} +.yslboomdivs p span { + text-align: left; +} +.yslboomdivsy{ + color: #999999; + font-size: 14px; + +} +.yslboomdivsys{ + color: #666666; + font-size: 14px; +} \ No newline at end of file diff --git a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js new file mode 100644 index 000000000..cde4f5f5e --- /dev/null +++ b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js @@ -0,0 +1,141 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn} from 'educoder'; +import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; +import axios from 'axios'; +import { + notification +} from "antd"; +import CoursesListType from '../coursesPublic/CoursesListType'; +import Completetopicdetails from './Completetopicdetails'; +import '../css/members.css'; +import "../common/formCommon.css"; +import '../css/Courses.css'; +import '../css/busyWork.css'; +import '../poll/pollStyle.css'; + +class CompletetopicdePage extends Component { + //毕设选题内容详情 + constructor(props) { + super(props); + // this.answerMdRef = React.createRef(); + this.setState({ + workid:1, + isSpin:false, + datas:[], + }) + } + + + + + componentDidMount() { + if( this.props.match.params.workid){ + this.setState({ + workid: this.props.match.params.workid, + }) + } + this.getdata(this.props.match.params.workid); + } + //获取数据的地方 + getdata=(workid)=>{ + var workids= workid; + if(workids){ + + }else{ + workids=this.state.workid; + } + this.setState({ + isSpin:true, + }) + let url = `/homework_banks/${workids}.json`; + // + axios.get(url).then((response) => { + if(response){ + if(response.data){ + this.setState({ + datas:response.data.informs, + }) + }else { + this.setState({ + datas:[], + + }) + + } + }else { + this.setState({ + datas:[], + }) + + } + this.setState({ + isSpin:false, + }) + }).catch((error) => { + console.log(error) + this.setState({ + datas:[], + isSpin:false, + }) + }); + } + + /// 确认是否下载 + + + bindRef = ref => { this.child = ref } +///////////////教师截止 + + render() { + + const isAdmin = this.props.isAdmin(); + // console.log(119) + + + return ( +
+ + +
+ +
+

+ 题库 + > + 详情 +

+
+
+

+ MySQL数据库编程开发实训(基础篇) +

+ +
+ +
+ +
+ + + {/*{parseInt(tab) === 1 ? :""}*/} + +
+
+ ) + } +} + +export default CompletetopicdePage; + diff --git a/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js b/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js new file mode 100644 index 000000000..15b4c24cf --- /dev/null +++ b/public/react/src/modules/courses/comtopicdetails/Completetopicdetails.js @@ -0,0 +1,115 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import GroupPackage from '../groupjobbank/GroupPackage' +import './completetopicde.css'; + + +class Completetopicdetails extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Generaljobdetails"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
+
+
+ +
+ + +
+
+
+
+

+ 课题类型: + 设计 +

+

+ 课题来源: + 生产/社会实践 +

+

+ 课题性质1: + 设计 +

+

+ 课题性质2: + 设计 +

+
+
+

+ 课题重复情况: + 新需求 +

+

+ 调研或实习地点: + 长沙 +

+

+ 课题单位来源: + 湖南省据C++创始人Stroustrup有限公司 +

+
+
+
+ + + ) + } +} + +export default Completetopicdetails; \ No newline at end of file diff --git a/public/react/src/modules/courses/comtopicdetails/completetopicde.css b/public/react/src/modules/courses/comtopicdetails/completetopicde.css new file mode 100644 index 000000000..fd566ffdc --- /dev/null +++ b/public/react/src/modules/courses/comtopicdetails/completetopicde.css @@ -0,0 +1,58 @@ +.yslquestionbank1{ + padding-top: 30px !important; + padding-right: 30px !important; + padding-left: 30px !important; +} +.yslquesHeigth{ + min-height: 500px !important; + +} +.yslquesmarkdowntext{ + font-size: 16px; + color: #707070; + +} +.yslquesmat26{ + margin-top: 26px; + padding-bottom: 33px !important; +} +.ysltextcolor9999{ + color: #999999; + font-size: 14px; +} +.ysltextcolor66{ + color: #666666; + font-size: 14px; +} +.ysltextcolor05{ + color: #05101A; + font-size: 14px; +} +.ml47text{ + margin-left: 17px; + padding-bottom: 37px; +} +.ysltextcolor99999{ + color: #999999; + font-size: 16px; +} +.yslboomdivs{ + + display: flex; + justify-content:flex-start; +} +.yslboomdivs p{ + width: 282px; +} +.yslboomdivs p span { + text-align: left; +} +.yslboomdivsy{ + color: #999999; + font-size: 14px; + +} +.yslboomdivsys{ + color: #666666; + font-size: 14px; +} \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/GroupPackage.js b/public/react/src/modules/courses/groupjobbank/GroupPackage.js new file mode 100644 index 000000000..8014585d1 --- /dev/null +++ b/public/react/src/modules/courses/groupjobbank/GroupPackage.js @@ -0,0 +1,87 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import './questionbanks.css'; + +class GroupPackage extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Groupjobquesanswer"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
+ + + + + + 清除浏览器缓存或换个浏览器操作指南更新版本.zip + + {2} + +
+ ) + } +} + +export default GroupPackage; \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/GroupPackage2.js b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js new file mode 100644 index 000000000..6a48a51c8 --- /dev/null +++ b/public/react/src/modules/courses/groupjobbank/GroupPackage2.js @@ -0,0 +1,73 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import './questionbanks.css'; + +class GroupPackage extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Groupjobquesanswer"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
+

+ 分组要求: + 2~ 5(学生提交作品时需要关联同组成员,组内成员作品共享) +

+

+ 基于项目实施 + (学生必须在本平台创建项目,项目管理员可以提交作品) +

+
+ ) + } +} + +export default GroupPackage; \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js b/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js new file mode 100644 index 000000000..772752def --- /dev/null +++ b/public/react/src/modules/courses/groupjobbank/Groupjobbandetails.js @@ -0,0 +1,84 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import './questionbanks.css'; +import GroupPackage from "./GroupPackage"; +import GroupPackage2 from "./GroupPackage2"; + + +class Groupjobbandetails extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Groupjobbandetails"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
+
+ +
+ + + + +
+ + +
+ + + ) + } +} + +export default Groupjobbandetails; \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js new file mode 100644 index 000000000..27827eb28 --- /dev/null +++ b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js @@ -0,0 +1,175 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn} from 'educoder'; +import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; +import axios from 'axios'; +import { + notification +} from "antd"; +import CoursesListType from '../coursesPublic/CoursesListType'; +import Groupjobbandetails from './Groupjobbandetails'; +import Groupjobquesanswer from './Groupjobquesanswer'; +import '../css/members.css'; +import "../common/formCommon.css"; +import '../css/Courses.css'; +import '../css/busyWork.css'; +import '../poll/pollStyle.css'; + +class GroupjobbankPage extends Component { + //分组作业内容详情 + constructor(props) { + super(props); + // this.answerMdRef = React.createRef(); + this.state = { + tab: ["0"], + workid:1, + isSpin:false, + datas:[], + } + + } + + //切换tab + ChangeTab = (e) => { + // console.log(e); + this.setState({ + tab: e + }) + try { + var currenturl = window.location.href; + var newUrl = (currenturl.split("?"))[0]; + window.history.pushState('','',newUrl+'?tab='+e); + }catch (e) { + console.log(e); + console.log("44"); + } + + } + + + componentDidMount() { + // console.log("父组件加载框"); + const query = this.props.location.search; + const type = query.split('?tab='); + // let sum = [] + // sum.push(type[1]) + // console.log("componentDidMountcomponentDidMount"); + // console.log(type); + this.setState({ + tab: type[1], + }) + let querys = this.props.location.pathname; + const types = querys.split('/'); + // console.log(types); + this.setState({ + shixuntypes: types[3] + }) + if( this.props.match.params.workid){ + this.setState({ + workid: this.props.match.params.workid, + }) + } + this.getdata(this.props.match.params.workid); + } + ///获取数据的地方 + getdata=(workid)=>{ + var workids= workid; + if(workids){ + + }else{ + workids=this.state.workid; + } + this.setState({ + isSpin:true, + }) + let url = `/homework_banks/${workids}.json`; + // + axios.get(url).then((response) => { + if(response){ + if(response.data){ + this.setState({ + datas:response.data.informs, + }) + }else { + this.setState({ + datas:[], + + }) + + } + }else { + this.setState({ + datas:[], + }) + + } + this.setState({ + isSpin:false, + }) + }).catch((error) => { + console.log(error) + this.setState({ + datas:[], + isSpin:false, + }) + }); + } + + + bindRef = ref => { this.child = ref } +///////////////教师截止 + + render() { + let {tab} = this.state; + + const isAdmin = this.props.isAdmin(); + // console.log(119) + + + return ( +
+ + +
+ +
+

+ 题库 + > + 详情 +

+
+
+

+ MySQL数据库编程开发实训(基础篇) +

+ +
+ + + + {parseInt(tab) === 0 ? :""} + {parseInt(tab) === 1 ? :""} + +
+
+ ) + } +} + +export default GroupjobbankPage; + diff --git a/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js b/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js new file mode 100644 index 000000000..c6a0f787f --- /dev/null +++ b/public/react/src/modules/courses/groupjobbank/Groupjobquesanswer.js @@ -0,0 +1,82 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import GroupPackage from './GroupPackage'; +import GroupPackage2 from './GroupPackage2'; +import './questionbanks.css'; + +class Groupjobquesanswer extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Groupjobquesanswer"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
+
+ +
+ + + + +
+ + +
+ + ) + } +} + +export default Groupjobquesanswer; \ No newline at end of file diff --git a/public/react/src/modules/courses/groupjobbank/questionbanks.css b/public/react/src/modules/courses/groupjobbank/questionbanks.css new file mode 100644 index 000000000..aae0c979f --- /dev/null +++ b/public/react/src/modules/courses/groupjobbank/questionbanks.css @@ -0,0 +1,41 @@ +.yslquestionbank1{ + padding-top: 30px !important; + padding-right: 30px !important; + padding-left: 30px !important; +} +.yslquesHeigth{ + min-height: 500px !important; + +} +.yslquesmarkdowntext{ + font-size: 16px; + color: #707070; + +} +.yslquesmat26{ + margin-top: 26px; + padding-bottom: 33px !important; +} +.ysltextcolor9999{ + color: #999999; + font-size: 14px; +} +.ysltextcolor66{ + color: #666666; + font-size: 14px; +} +.ysltextcolor05{ + color: #05101A; + font-size: 14px; +} +.ml47text{ + margin-left: 17px; + padding-bottom: 37px; +} +.ysltextcolor99999{ + color: #999999; + font-size: 16px; +} +.yslahover { + color: #999999 ; +} \ No newline at end of file diff --git a/public/react/src/modules/courses/questionbank/Generaljobanswer.js b/public/react/src/modules/courses/questionbank/Generaljobanswer.js new file mode 100644 index 000000000..3bfc6cd36 --- /dev/null +++ b/public/react/src/modules/courses/questionbank/Generaljobanswer.js @@ -0,0 +1,79 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import GroupPackage from '../groupjobbank/GroupPackage' +import './questionbank.css'; + +class Generaljobanswer extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Generaljobanswer"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
+
+ +
+ + +
+ + +
+ + ) + } +} + +export default Generaljobanswer; \ No newline at end of file diff --git a/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js new file mode 100644 index 000000000..29453a7b5 --- /dev/null +++ b/public/react/src/modules/courses/questionbank/Generaljobbankdetails.js @@ -0,0 +1,173 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn} from 'educoder'; +import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; +import axios from 'axios'; +import { + notification +} from "antd"; +import CoursesListType from '../coursesPublic/CoursesListType'; +import Generaljobdetails from './Generaljobdetails'; +import Generaljobanswer from './Generaljobanswer'; +import '../css/members.css'; +import "../common/formCommon.css"; +import '../css/Courses.css'; +import '../css/busyWork.css'; +import '../poll/pollStyle.css'; + +class Generaljobbankdetails extends Component { + //普通作业内容详情 + constructor(props) { + super(props); + // this.answerMdRef = React.createRef(); + this.state = { + tab: ["0"], + workid:1, + isSpin:false, + datas:[], + } + + } + + //切换tab + ChangeTab = (e) => { + // console.log(e); + this.setState({ + tab: e + }) + try { + var currenturl = window.location.href; + var newUrl = (currenturl.split("?"))[0]; + window.history.pushState('','',newUrl+'?tab='+e); + }catch (e) { + console.log(e); + console.log("44"); + } + + } + + + componentDidMount() { + // console.log("父组件加载框"); + const query = this.props.location.search; + const type = query.split('?tab='); + // let sum = [] + // sum.push(type[1]) + // console.log("componentDidMountcomponentDidMount"); + // console.log(type); + this.setState({ + tab: type[1], + }); + + + console.log("Generaljobbankdetails"); + console.log(this.props); + if( this.props.match.params.workid){ + this.setState({ + workid: this.props.match.params.workid, + }) + } + this.getdata(this.props.match.params.workid); + } + //获取数据的地方 + getdata=(workid)=>{ + var workids= workid; + if(workids){ + + }else{ + workids=this.state.workid; + } + this.setState({ + isSpin:true, + }) + let url = `/homework_banks/${workids}.json`; + // + axios.get(url).then((response) => { + if(response){ + if(response.data){ + this.setState({ + datas:response.data.informs, + }) + }else { + this.setState({ + datas:[], + + }) + + } + }else { + this.setState({ + datas:[], + }) + + } + this.setState({ + isSpin:false, + }) + }).catch((error) => { + console.log(error) + this.setState({ + datas:[], + isSpin:false, + }) + }); + } + + + bindRef = ref => { this.child = ref } +///////////////教师截止 + + render() { + let {tab} = this.state; + + const isAdmin = this.props.isAdmin(); + // console.log(119) + + + return ( +
+ + +
+ +
+

+ 题库 + > + 详情 +

+
+
+

+ MySQL数据库编程开发实训(基础篇) +

+ +
+ + + + {parseInt(tab) === 0 ? :""} + {parseInt(tab) === 1 ? :""} + +
+
+ ) + } +} + +export default Generaljobbankdetails; + diff --git a/public/react/src/modules/courses/questionbank/Generaljobdetails.js b/public/react/src/modules/courses/questionbank/Generaljobdetails.js new file mode 100644 index 000000000..9de444123 --- /dev/null +++ b/public/react/src/modules/courses/questionbank/Generaljobdetails.js @@ -0,0 +1,81 @@ +import React, {Component} from "react"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import { + Button, + Checkbox, + message, + InputNumber, + DatePicker, + Radio, + Tooltip, + notification, +} from "antd"; +import GroupPackage from '../groupjobbank/GroupPackage' +import './questionbank.css'; + + +class Generaljobdetails extends Component { + + constructor(props) { + super(props); + + this.state = { + + } + } + + componentDidMount() { + console.log("Generaljobdetails"); + console.log("componentDidMount"); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes:type[3] + // }) + // this.props.triggerRef(this); + + + + + } + // 获取数据地方 + getTrainingjobsetting = () => { + var homeworkid = this.props.match.params.homeworkid; + } + + //跳转道描点的地方 + scrollToAnchor = (anchorName) => { + if (anchorName) { + // 找到锚点 + let anchorElement = document.getElementById(anchorName); + // 如果对应id的锚点存在,就跳转到锚点 + if(anchorElement) { anchorElement.scrollIntoView(); } + } + }; + + + + render() { + + return ( +
+
+ +
+ + +
+ + +
+ + + ) + } +} + +export default Generaljobdetails; \ No newline at end of file diff --git a/public/react/src/modules/courses/questionbank/questionbank.css b/public/react/src/modules/courses/questionbank/questionbank.css new file mode 100644 index 000000000..43dcfa9c6 --- /dev/null +++ b/public/react/src/modules/courses/questionbank/questionbank.css @@ -0,0 +1,26 @@ +.yslquestionbank1{ + padding-top: 30px !important; + padding-right: 30px !important; + padding-left: 30px !important; +} +.yslquesHeigth{ + min-height: 500px !important; + +} +.yslquesmarkdowntext{ + font-size: 16px; + color: #707070; + +} +.yslquesmat26{ + margin-top: 26px; + padding-bottom: 44px !important; +} +.ysltextcolor9999{ + color: #999999; + font-size: 14px; +} +.ysltextcolor99999{ + color: #999999; + font-size: 16px; +} \ No newline at end of file