dev_aliyun2
harry 5 years ago
parent 3ebfa74a18
commit 15ba6bc50a

@ -57,141 +57,141 @@ class CoursesWorkIndex extends Component {
render() { render() {
return ( return (
<div> <div>
<Switch {...this.props}> <Switch {...this.props}>
{/* --------------------------------------------------------------------- */} {/* --------------------------------------------------------------------- */}
{/* 作业设置 */} {/* 作业设置 */}
{/* http://localhost:3007/classrooms/1309/homework/9300/setting */} {/* http://localhost:3007/classrooms/1309/homework/9300/setting */}
<Route exact path="/classrooms/:coursesId/common_homeworks/:workId/setting" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/setting"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/common_homework/:workId/setting" <Route exact path="/classrooms/:coursesId/common_homework/:workId/setting"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作品列表 */} {/* 作品列表 */}
<Route exact path="/classrooms/:coursesId/common_homeworks/:workId/list" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/list"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作品列表 */} {/* 作品列表 */}
<Route exact path="/classrooms/:coursesId/common_homework/:workId/list" <Route exact path="/classrooms/:coursesId/common_homework/:workId/list"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作业问答 */} {/* 作业问答 */}
<Route exact path="/classrooms/:coursesId/common_homeworks/:workId/question" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/question"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/common_homework/:workId/question" <Route exact path="/classrooms/:coursesId/common_homework/:workId/question"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/common_homeworks/:workId/answer" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/answer"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/common_homework/:workId/answer" <Route exact path="/classrooms/:coursesId/common_homework/:workId/answer"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 评阅 */} {/* 评阅 */}
<Route exact path="/classrooms/:coursesId/common_homeworks/:workId/:studentWorkId/appraise" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/:studentWorkId/appraise"
render={ render={
(props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/common_homework/:workId/:studentWorkId/appraise" <Route exact path="/classrooms/:coursesId/common_homework/:workId/:studentWorkId/appraise"
render={ render={
(props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 提交作品 */} {/* 提交作品 */}
<Route exact path="/classrooms/:coursesId/common_homeworks/:workId/post" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/post"
render={ render={
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/common_homework/:workId/post" <Route exact path="/classrooms/:coursesId/common_homework/:workId/post"
render={ render={
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/common_homeworks/:workId/:studentWorkId/post_edit" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/:studentWorkId/post_edit"
render={ render={
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/common_homework/:workId/:studentWorkId/post_edit" <Route exact path="/classrooms/:coursesId/common_homework/:workId/:studentWorkId/post_edit"
render={ render={
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 新建 */} {/* 新建 */}
{/* http://localhost:3007/classrooms/1309/common_homeworks/9299/edit/1 */} {/* http://localhost:3007/classrooms/1309/common_homeworks/9299/edit/1 */}
<Route exact path="/classrooms/:coursesId/common_homeworks/:workId/:pageType" <Route exact path="/classrooms/:coursesId/common_homeworks/:workId/:pageType"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/common_homework/:workId/:pageType" <Route exact path="/classrooms/:coursesId/common_homework/:workId/:pageType"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/common_homeworks/:categroy_id/new" <Route exact path="/classrooms/:coursesId/common_homeworks/:categroy_id/new"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/common_homework/:categroy_id/new" <Route exact path="/classrooms/:coursesId/common_homework/:categroy_id/new"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作业列表 */} {/* 作业列表 */}
<Route path="/classrooms/:coursesId/common_homeworks" <Route path="/classrooms/:coursesId/common_homeworks"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route path="/classrooms/:coursesId/common_homework" <Route path="/classrooms/:coursesId/common_homework"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* --------------------------------------------------------------------- */} {/* --------------------------------------------------------------------- */}
</Switch> </Switch>
</div> </div>
) )
} }

@ -58,131 +58,131 @@ class CoursesWorkIndex extends Component {
render() { render() {
return ( return (
<div> <div>
<Switch {...this.props}> <Switch {...this.props}>
{/* --------------------------------------------------------------------- */} {/* --------------------------------------------------------------------- */}
{/* --------------------------------------------------------------------- */} {/* --------------------------------------------------------------------- */}
{/* 作业设置 */} {/* 作业设置 */}
<Route exact path="/classrooms/:coursesId/group_homeworks/:workId/setting" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/setting"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/group_homework/:workId/setting" <Route exact path="/classrooms/:coursesId/group_homework/:workId/setting"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作品列表 */} {/* 作品列表 */}
<Route exact path="/classrooms/:coursesId/group_homeworks/:workId/list" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/list"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/group_homework/:workId/list" <Route exact path="/classrooms/:coursesId/group_homework/:workId/list"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作业问答 */} {/* 作业问答 */}
<Route exact path="/classrooms/:coursesId/group_homeworks/:workId/question" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/question"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/group_homework/:workId/question" <Route exact path="/classrooms/:coursesId/group_homework/:workId/question"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 参考答案 */} {/* 参考答案 */}
<Route exact path="/classrooms/:coursesId/group_homeworks/:workId/answer" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/answer"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/group_homework/:workId/answer" <Route exact path="/classrooms/:coursesId/group_homework/:workId/answer"
render={ render={
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 评阅 */} {/* 评阅 */}
<Route exact path="/classrooms/:coursesId/group_homeworks/:workId/:studentWorkId/appraise" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/:studentWorkId/appraise"
render={ render={
(props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/group_homework/:workId/:studentWorkId/appraise" <Route exact path="/classrooms/:coursesId/group_homework/:workId/:studentWorkId/appraise"
render={ render={
(props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkAppraise {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/group_homeworks/:workId/post" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/post"
render={ render={
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/group_homework/:workId/post" <Route exact path="/classrooms/:coursesId/group_homework/:workId/post"
render={ render={
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/group_homeworks/:workId/:studentWorkId/post_edit" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/:studentWorkId/post_edit"
render={ render={
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/group_homework/:workId/:studentWorkId/post_edit" <Route exact path="/classrooms/:coursesId/group_homework/:workId/:studentWorkId/post_edit"
render={ render={
(props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkPost {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 新建 */} {/* 新建 */}
{/* http://localhost:3007/classrooms/1309/group_homeworks/9299/edit/1 */} {/* http://localhost:3007/classrooms/1309/group_homeworks/9299/edit/1 */}
<Route exact path="/classrooms/:coursesId/group_homeworks/:workId/:pageType" <Route exact path="/classrooms/:coursesId/group_homeworks/:workId/:pageType"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/group_homework/:workId/:pageType" <Route exact path="/classrooms/:coursesId/group_homework/:workId/:pageType"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/group_homeworks/:categroy_id/new" <Route exact path="/classrooms/:coursesId/group_homeworks/:categroy_id/new"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/classrooms/:coursesId/group_homework/:categroy_id/new" <Route exact path="/classrooms/:coursesId/group_homework/:categroy_id/new"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作业列表 */} {/* 作业列表 */}
<Route path="/classrooms/:coursesId/group_homeworks" <Route path="/classrooms/:coursesId/group_homeworks"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/* 作业列表 */} {/* 作业列表 */}
<Route path="/classrooms/:coursesId/group_homework" <Route path="/classrooms/:coursesId/group_homework"
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
</Switch> </Switch>
</div> </div>
) )
} }

@ -1,46 +1,19 @@
import React, { Component } from "react"; import React, { Component } from "react";
import { Link, NavLink } from 'react-router-dom'; import { getImageUrl } from 'educoder';
import { WordsBtn, ActionBtn, SnackbarHOC, getImageUrl } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import { import {
notification,
Spin,
Table,
Pagination,
Radio, Radio,
Checkbox,
Form, Form,
Input, Input,
Select, Select,
Cascader, Cascader,
Col, Row, InputNumber, DatePicker, AutoComplete, Button, Tag InputNumber, AutoComplete
} from "antd"; } from "antd";
import './../questioncss/questioncom.css'; import './../questioncss/questioncom.css'
import Newknledpots from '../component/Newknledpots' import Newknledpots from '../component/Newknledpots'
const InputGroup = Input.Group; const InputGroup = Input.Group;
const { Option } = Select; const { Option } = Select;
const options = [
{
value: '方向',
label: '方向',
children: [
{
value: '课程',
label: '课程',
},
],
},
{
value: 'jiangsu',
label: 'Jiangsu',
children: [
{
value: 'nanjing',
label: 'Nanjing',
},
],
},
];
//Itembankstop Intelligentcomponents 题库的 //Itembankstop Intelligentcomponents 题库的
class Comthetestpaperst extends Component { class Comthetestpaperst extends Component {
constructor(props) { constructor(props) {
@ -475,6 +448,7 @@ class Comthetestpaperst extends Component {
//////console.log('Clicked! But prevent default.'); //////console.log('Clicked! But prevent default.');
} }
deletesobject = (item, index) => { deletesobject = (item, index) => {
var tmp = this.state.Knowpoints; var tmp = this.state.Knowpoints;
for (var i = 0; i < tmp.length; i++) { for (var i = 0; i < tmp.length; i++) {
if (i === index) { if (i === index) {
@ -749,22 +723,21 @@ class Comthetestpaperst extends Component {
) )
})} })}
</div> </div>
</div> :
)} ""
</Form.Item> }
</div > <style>
<style> {
{ `
`
.ml19{ .ml19{
margin-left:19px; margin-left:19px;
} }
` `
} }
</style> </style>
<div className="stud-class-set "> <div className="stud-class-set ">
<style>{ <style>{
` `
.yslzxueshis .ant-input{ .yslzxueshis .ant-input{
border-right: none !important; border-right: none !important;
height: 38px !important; height: 38px !important;
@ -780,51 +753,51 @@ class Comthetestpaperst extends Component {
} }
` `
}</style> }</style>
<div className="sjmc"> <div className="sjmc">
<Form.Item label="试卷名称:"> <Form.Item label="试卷名称:">
{getFieldDecorator('classroom', { {getFieldDecorator('classroom', {
rules: [{ required: true, message: "不能为空" }], rules: [{ required: true, message: "不能为空" }],
})( })(
<AutoComplete <AutoComplete
onSearch={this.handleSearch} onSearch={this.handleSearch}
className={"fl construction yslzxueshis "} className={"fl construction yslzxueshis "}
dataSource={optionss} dataSource={optionss}
> >
<Input className="yslzxueshisy " placeholder="请输入名称最大限制60个字符" onInput={this.handleChange} addonAfter={String(addonAfteronelens3) + "/60"} maxLength={60} /> <Input className="yslzxueshisy " placeholder="请输入名称最大限制60个字符" onInput={this.handleChange} addonAfter={String(addonAfteronelens3) + "/60"} maxLength={60} />
</AutoComplete> </AutoComplete>
)} )}
<div id='isclassroom'></div> <div id='isclassroom'></div>
</Form.Item> </Form.Item>
</div> </div>
</div> </div>
<style> <style>
{ {
` `
.kssc .ant-form-item-label{ .kssc .ant-form-item-label{
line-height: 38px !important; line-height: 38px !important;
} }
` `
} }
</style> </style>
<div className="kssc"> <div className="kssc">
<Form.Item label="考试时长:"> <Form.Item label="考试时长:">
{getFieldDecorator('kssc')(<InputNumber {getFieldDecorator('kssc')(<InputNumber
min={0} min={0}
step={0.1} step={0.1}
></InputNumber>)} ></InputNumber>)}
<span className="ant-form-text"> 分钟</span> <span className="ant-form-text"> 分钟</span>
</Form.Item> </Form.Item>
</div> </div>
<style> <style>
{ {
` `
.rbndclass .ant-radio-button-wrapper{ .rbndclass .ant-radio-button-wrapper{
width:106px !important; width:106px !important;
height:33px !important; height:33px !important;
@ -873,28 +846,28 @@ class Comthetestpaperst extends Component {
} }
` `
}
</style>
<div className="rbndclass">
<Form.Item label="难度">
{getFieldDecorator('rbnd'
,
{
initialValue: this.state.rbnd,
rules: [{ required: true, message: '请选择难度' }],
} }
)( </style>
<Radio.Group onChange={this.handleFormLayoutChange}> <div className="rbndclass">
<Radio.Button value="1">简单</Radio.Button> <Form.Item label="难度">
<Radio.Button value="2">适中</Radio.Button> {getFieldDecorator('rbnd'
<Radio.Button value="3">困难</Radio.Button> ,
</Radio.Group>, {
)} initialValue: this.state.rbnd,
</Form.Item> rules: [{ required: true, message: '请选择难度' }],
}
)(
<Radio.Group onChange={this.handleFormLayoutChange}>
<Radio.Button value="1">简单</Radio.Button>
<Radio.Button value="2">适中</Radio.Button>
<Radio.Button value="3">困难</Radio.Button>
</Radio.Group>,
)}
</Form.Item>
</div>
</Form>
<div className="h20"></div>
</div> </div>
</Form >
<div className="h20"></div>
</div >
) )
} }

Loading…
Cancel
Save