yslnewtiku
parent
699a3d35be
commit
75408005fb
@ -0,0 +1,159 @@
|
||||
import React, {Component} from "react";
|
||||
import {Link, NavLink} from 'react-router-dom';
|
||||
import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder';
|
||||
import axios from 'axios';
|
||||
import {
|
||||
notification,
|
||||
Spin,
|
||||
Table,
|
||||
Pagination,
|
||||
Drawer,
|
||||
Input
|
||||
} from "antd";
|
||||
import Headplugselection from "./component/Headplugselection";
|
||||
import Contentpart from "./component/Contentpart";
|
||||
import {TPMIndexHOC} from "../tpm/TPMIndexHOC";
|
||||
import NoneData from './../courses/coursesPublic/NoneData';
|
||||
import './questioncss/questioncom.css';
|
||||
import SiderBar from "../tpm/SiderBar";
|
||||
class Question extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
page:1,
|
||||
limit:20,
|
||||
count:50,
|
||||
defaultActiveKey:1,
|
||||
Headertop:"",
|
||||
Footerdown:"",
|
||||
visible: false,
|
||||
placement: 'right'
|
||||
}
|
||||
}
|
||||
//初始化
|
||||
componentDidMount(){
|
||||
let {defaultActiveKey}= this.state;
|
||||
var data={
|
||||
public:defaultActiveKey
|
||||
};
|
||||
this.getdata(data);
|
||||
|
||||
let url=`/users/get_navigation_info.json`;
|
||||
axios.get(url, {
|
||||
|
||||
}).then((response) => {
|
||||
// console.log("开始请求/get_navigation_info.json");
|
||||
// console.log(response);
|
||||
if(response!=undefined){
|
||||
if(response.status===200){
|
||||
this.setState({
|
||||
Headertop:response.data.top,
|
||||
Footerdown:response.data.down
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
callback=(key)=>{
|
||||
this.setState({
|
||||
defaultActiveKey:key,
|
||||
})
|
||||
|
||||
}
|
||||
getdata =(data)=>{
|
||||
const url=`/item_banks.json`;
|
||||
axios.get((url),{params:data}).then((response) => {
|
||||
if(response===null||response===undefined){
|
||||
|
||||
return
|
||||
}
|
||||
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
console.log("item_banks");
|
||||
console.log(response);
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
paginationonChange=()=>{
|
||||
|
||||
}
|
||||
showDrawer = () => {
|
||||
this.setState({
|
||||
visible: true,
|
||||
});
|
||||
};
|
||||
|
||||
onClose = () => {
|
||||
this.setState({
|
||||
visible: false,
|
||||
});
|
||||
};
|
||||
|
||||
onChange = e => {
|
||||
this.setState({
|
||||
placement: e.target.value,
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
let {page,limit,count,Headertop,visible,placement}=this.state;
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
<SiderBar
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
showDrawer={()=>this.showDrawer()}
|
||||
Headertop={Headertop}/>
|
||||
{/*顶部*/}
|
||||
<Headplugselection ></Headplugselection>
|
||||
{/*头部*/}
|
||||
<Contentpart {...this.state} {...this.props} callback={(e)=>this.callback(e)}></Contentpart>
|
||||
{/*分页*/}
|
||||
{/*<div className="clearfix mt5">*/}
|
||||
{/*<div className="educontent mt10 pb20 w1200s">*/}
|
||||
{/* fenye*/}
|
||||
<div className="mb30 clearfix educontent mt40 intermediatecenter">
|
||||
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
|
||||
pageSize={limit}
|
||||
total={count}></Pagination>
|
||||
</div>
|
||||
|
||||
{/*抽屉效果*/}
|
||||
<Drawer
|
||||
placement={placement}
|
||||
closable={false}
|
||||
onClose={()=>this.onClose()}
|
||||
visible={visible}
|
||||
>
|
||||
<div>
|
||||
<Input placeholder="未命名试卷" />
|
||||
</div>
|
||||
<div className="sortinxdirection">
|
||||
<p className="w50s ">单选题</p>
|
||||
<p className="w50s"><i className="iconfont icon-shanchu1 font-12 lg lh30 icontianjiadaohangcolor "></i></p>
|
||||
</div>
|
||||
|
||||
<div className="intermediatecenter verticallayout mt42">
|
||||
<div className="drawerbutton">
|
||||
试卷预览
|
||||
</div>
|
||||
</div>
|
||||
</Drawer>
|
||||
|
||||
|
||||
</div>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
export default SnackbarHOC() (TPMIndexHOC ( Question ));
|
@ -0,0 +1,207 @@
|
||||
import React, {Component} from "react";
|
||||
import {Link, NavLink} from 'react-router-dom';
|
||||
import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder';
|
||||
import axios from 'axios';
|
||||
import {
|
||||
notification,
|
||||
Spin,
|
||||
Table,
|
||||
Pagination,
|
||||
Tabs,
|
||||
Input,
|
||||
Popover
|
||||
} from "antd";
|
||||
import './../questioncss/questioncom.css';
|
||||
import Contentquestionbank from "./Contentquestionbank";
|
||||
import Listjihe from "./Listjihe";
|
||||
const { TabPane } = Tabs;
|
||||
const Search = Input.Search;
|
||||
class Contentpart extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
page:1,
|
||||
}
|
||||
}
|
||||
//初始化
|
||||
componentDidMount(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
setdatafuns=(value)=>{
|
||||
|
||||
}
|
||||
|
||||
setdatafunsval=(e)=>{
|
||||
|
||||
}
|
||||
render() {
|
||||
let {page}=this.state;
|
||||
let {defaultActiveKey}=this.props;
|
||||
const content = (
|
||||
<div className="questiontypes" style={{
|
||||
width:'93px',
|
||||
height:'161px',
|
||||
}}>
|
||||
<p className="questiontype ">单选题</p>
|
||||
<p className="questiontypeheng"></p>
|
||||
<p className="questiontype ">多选题</p>
|
||||
<p className="questiontypeheng"></p>
|
||||
<p className="questiontype ">判断题</p>
|
||||
<p className="questiontypeheng"></p>
|
||||
<p className="questiontype ">编程题</p>
|
||||
<p className="questiontypeheng"></p>
|
||||
|
||||
</div>
|
||||
);
|
||||
const contents = (
|
||||
<div className="questiontypes" style={{
|
||||
width:'93px',
|
||||
height:'120px',
|
||||
}}>
|
||||
<p className="questiontype ">简单</p>
|
||||
<p className="questiontypeheng"></p>
|
||||
<p className="questiontype ">适中</p>
|
||||
<p className="questiontypeheng"></p>
|
||||
<p className="questiontype ">困难</p>
|
||||
<p className="questiontypeheng"></p>
|
||||
</div>
|
||||
);
|
||||
|
||||
const buttonWidth = 70;
|
||||
return (
|
||||
<div className=" clearfix mt5">
|
||||
<div className="educontent mt10 pb20 w1200s">
|
||||
<div className="w1200ms contentparttit" style={{
|
||||
position: "relative",
|
||||
}}>
|
||||
<style>
|
||||
{
|
||||
`
|
||||
.contentparttit .ant-tabs-nav .ant-tabs-tab{
|
||||
margin: 10px 10px 10px 0 !important;
|
||||
}
|
||||
.contentparttit .ant-tabs-nav .ant-tabs-ink-bar{
|
||||
width: 31px !important;
|
||||
left: 14px;
|
||||
}
|
||||
`
|
||||
}
|
||||
</style>
|
||||
<Tabs defaultActiveKey={defaultActiveKey} onChange={(e)=>this.props.callback(e)}>
|
||||
<TabPane tab="公共" key="1">
|
||||
</TabPane>
|
||||
<TabPane tab="我的" key="0">
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
||||
<div className=" mt19" style={{
|
||||
position:"absolute",
|
||||
top: "0px",
|
||||
right:" 0px",
|
||||
paddingRight: "20px",
|
||||
}}>
|
||||
<style>
|
||||
{
|
||||
`
|
||||
.xaxisreverseorder .ant-input-group-addon{
|
||||
width: 60px !important;
|
||||
|
||||
}
|
||||
|
||||
.xaxisreverseorder .ant-input-lg {
|
||||
height: 41px;}
|
||||
|
||||
.ant-popover{
|
||||
top: 348px !important;
|
||||
}
|
||||
|
||||
|
||||
.ant-popover-inner-content {
|
||||
padding:0px !important;
|
||||
}
|
||||
|
||||
`
|
||||
}
|
||||
</style>
|
||||
<div className="xaxisreverseorder">
|
||||
|
||||
<Popover placement="bottom" content={contents} trigger="click">
|
||||
<div className=" sortinxdirection mr10">
|
||||
|
||||
<div className="subjecttit">
|
||||
难度
|
||||
</div>
|
||||
<i className="iconfont icon-sanjiaoxing-down font-12 lg ml7 icondowncolor"></i>
|
||||
</div>
|
||||
</Popover>
|
||||
|
||||
|
||||
|
||||
<Popover placement="bottom" content={content} trigger="click">
|
||||
<div className="sortinxdirection mr40">
|
||||
<div className="subjecttit">
|
||||
题型
|
||||
</div>
|
||||
<i className="iconfont icon-sanjiaoxing-down font-12 lg ml7 icondowncolor"></i>
|
||||
</div>
|
||||
</Popover>
|
||||
<Search
|
||||
style={{ width: "347px",marginRight:"60px",}}
|
||||
placeholder="请输入题目名称、内容"
|
||||
enterButton
|
||||
size="large"
|
||||
onInput={(e)=>this.setdatafunsval(e)}
|
||||
onSearch={ (value)=>this.setdatafuns(value)} />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/*内容*/}
|
||||
<div className=" w100s mb10">
|
||||
{
|
||||
defaultActiveKey===1||defaultActiveKey==="1"?
|
||||
<Contentquestionbank {...this.props} {...this.state} ></Contentquestionbank>
|
||||
:""
|
||||
}
|
||||
{
|
||||
defaultActiveKey===0||defaultActiveKey==="0"?
|
||||
<Contentquestionbank {...this.props} {...this.state} ></Contentquestionbank>
|
||||
:""
|
||||
}
|
||||
</div>
|
||||
{/*列表集合*/}
|
||||
<div className=" w100s">
|
||||
<Listjihe>
|
||||
|
||||
</Listjihe>
|
||||
<Listjihe>
|
||||
|
||||
</Listjihe>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
export default Contentpart
|
@ -0,0 +1,70 @@
|
||||
import React, {Component} from "react";
|
||||
import {Link, NavLink} from 'react-router-dom';
|
||||
import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder';
|
||||
import axios from 'axios';
|
||||
import {
|
||||
notification,
|
||||
Spin,
|
||||
Table,
|
||||
Pagination,
|
||||
Radio,
|
||||
Checkbox
|
||||
} from "antd";
|
||||
import './../questioncss/questioncom.css';
|
||||
class Contentquestionbank extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
page:1,
|
||||
}
|
||||
}
|
||||
//初始化
|
||||
componentDidMount(){
|
||||
console.log("componentDidMount");
|
||||
console.log(this.state);
|
||||
console.log(this.props);
|
||||
// let homeworkid = this.props.match.params.homeworkid;
|
||||
// let url = "/homework_commons/" + homeworkid + "/end_groups.json";
|
||||
// axios.get(url).then((response) => {
|
||||
// if (response.status === 200) {
|
||||
// this.setState({})
|
||||
// }
|
||||
// }).catch((error) => {
|
||||
// console.log(error)
|
||||
// });
|
||||
|
||||
}
|
||||
onChange=(e)=> {
|
||||
console.log(`checked = ${e.target.checked}`);
|
||||
}
|
||||
|
||||
render() {
|
||||
let {page}=this.state;
|
||||
|
||||
return (
|
||||
|
||||
<div className=" clearfix mt5 Contentquestionbankstyle">
|
||||
<div className="educontent mt10 w100s">
|
||||
<div className="sortinxdirection w100s" >
|
||||
<div className="sortinxdirection w50s">
|
||||
<Checkbox onChange={()=>this.onChange()}></Checkbox>
|
||||
<p className="setequesbank ml20">选用本页全部试题</p>
|
||||
</div>
|
||||
<div className="xaxisreverseorder testpaper w50s">
|
||||
共123个试题
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
export default Contentquestionbank ;
|
@ -0,0 +1,324 @@
|
||||
.w1200{
|
||||
width:1062px;
|
||||
height:177px;
|
||||
background:rgba(255,255,255,1);
|
||||
box-shadow:0px 6px 8px 0px rgba(0,0,0,0.03);
|
||||
border-radius:2px;
|
||||
}
|
||||
.w1200ms{
|
||||
width:1062px;
|
||||
}
|
||||
.w1200s{
|
||||
width:1062px;
|
||||
background:rgba(255,255,255,1);
|
||||
box-shadow:0px 6px 8px 0px rgba(0,0,0,0.03);
|
||||
border-radius:2px;
|
||||
}
|
||||
.h177{
|
||||
height: 177px;
|
||||
}
|
||||
/* 中间居中 */
|
||||
.intermediatecenter{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
/* 简单居中 */
|
||||
.intermediatecenterysls{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.spacearound{
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
||||
}
|
||||
.spacebetween{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
/* 头顶部居中 */
|
||||
.topcenter{
|
||||
display: -webkit-flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* x轴正方向排序 */
|
||||
/* 一 二 三 四 五 六 七 八 */
|
||||
.sortinxdirection{
|
||||
display: flex;
|
||||
flex-direction:row;
|
||||
}
|
||||
/* x轴反方向排序 */
|
||||
/* 八 七 六 五 四 三 二 一 */
|
||||
.xaxisreverseorder{
|
||||
display: flex;
|
||||
flex-direction:row-reverse;
|
||||
}
|
||||
/* 垂直布局 正方向*/
|
||||
/* 一
|
||||
二
|
||||
三
|
||||
四
|
||||
五
|
||||
六
|
||||
七
|
||||
八 */
|
||||
.verticallayout{
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
}
|
||||
/* 垂直布局 反方向*/
|
||||
.reversedirection{
|
||||
display: flex;
|
||||
flex-direction:column-reverse;
|
||||
}
|
||||
.w100{
|
||||
width: 100px;
|
||||
}
|
||||
.mt21{
|
||||
margin-top: 21px;
|
||||
}
|
||||
.mt23{
|
||||
margin-top: 23px;
|
||||
}
|
||||
.mt19{
|
||||
margin-top: 19px;
|
||||
}
|
||||
.mt15{
|
||||
margin-top: 10px;
|
||||
}
|
||||
.h40{
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.tophom{
|
||||
padding-top: 33px;
|
||||
padding-bottom: 40px;
|
||||
padding-left: 26px;
|
||||
padding-right: 26px;
|
||||
}
|
||||
.borderwd{
|
||||
border: 1px solid #000000;
|
||||
}
|
||||
.borderwds{
|
||||
width: 1020px !important;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #DDDDDD;
|
||||
margin-left: 20px;
|
||||
height: 150px;
|
||||
}
|
||||
.borderwds283{
|
||||
width: 1020px !important;
|
||||
height: 283px;
|
||||
background:#F9F9F9;
|
||||
border:1px solid #DDDDDD;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.w64{
|
||||
width: 64px;
|
||||
}
|
||||
.w70{
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
.tophomsembold{
|
||||
height:21px;
|
||||
font-size:16px;
|
||||
color:#333333;
|
||||
line-height:21px;
|
||||
}
|
||||
|
||||
/*Contentpart*/
|
||||
.contentparttit{
|
||||
padding-top: 10px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.subjecttit{
|
||||
width:28px;
|
||||
height:19px;
|
||||
font-size:14px;
|
||||
color:rgba(51,51,51,1);
|
||||
line-height: 42px;
|
||||
cursor:pointer;
|
||||
|
||||
}
|
||||
.ml55{
|
||||
margin-right: 55px;
|
||||
|
||||
}
|
||||
|
||||
.lg{
|
||||
line-height: 42px;
|
||||
}
|
||||
.ml7{
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
.icondowncolor{
|
||||
color:#9E9E9E;
|
||||
|
||||
}
|
||||
.questiontype{
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
color: #333333;
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
padding: 11px;
|
||||
cursor:pointer;
|
||||
|
||||
}
|
||||
.questiontypes{
|
||||
width:37px;
|
||||
height:17px;
|
||||
font-size:12px;
|
||||
color:rgba(51,51,51,1);
|
||||
line-height:17px;
|
||||
cursor:pointer;
|
||||
|
||||
}
|
||||
.questiontypeheng{
|
||||
width:100%;
|
||||
height:1px;
|
||||
background: #EEEEEE;
|
||||
}
|
||||
.questiontype:hover{
|
||||
color: #4CACFF;
|
||||
}
|
||||
.questiontype:active{
|
||||
color: #4CACFF;
|
||||
}
|
||||
|
||||
.w100s{
|
||||
width:100%;
|
||||
}
|
||||
.w70s{
|
||||
width:70%;
|
||||
}
|
||||
.w30s{
|
||||
width:70%;
|
||||
}
|
||||
.w50s{
|
||||
width: 50%;
|
||||
}
|
||||
.testpaper{
|
||||
font-size:12px;
|
||||
color:#888888;
|
||||
line-height:28px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.setequesbank{
|
||||
font-size:14px;
|
||||
color:#333333;
|
||||
line-height:28px;
|
||||
}
|
||||
|
||||
.Contentquestionbankstyle{
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.pd20{
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
padding-left: 30px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
/*listjihe*/
|
||||
.listjihetixing{
|
||||
color: #888888;
|
||||
font-size: 12px;
|
||||
line-height: 17px;
|
||||
}
|
||||
|
||||
.listjihetixings{
|
||||
color: #333333;
|
||||
font-size: 12px;
|
||||
line-height: 17px;
|
||||
}
|
||||
.listjihetixingstit{
|
||||
color: #333333;
|
||||
font-size: 14px;
|
||||
line-height: 17px;
|
||||
|
||||
}
|
||||
.listjihetixingstits{
|
||||
color: #333333;
|
||||
font-size: 14px;
|
||||
line-height:19px;
|
||||
margin-top: 19px;
|
||||
}
|
||||
|
||||
.updatetimes{
|
||||
color: #BBBBBB;
|
||||
font-size: 12px;
|
||||
}
|
||||
.mt22{
|
||||
margin-top: 22px;
|
||||
}
|
||||
.viewparsings{
|
||||
color:#4CACFF;
|
||||
font-size:12px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.selection{
|
||||
width:88px;
|
||||
height:30px;
|
||||
background:#33BD8C;
|
||||
border-radius:4px;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.lh30{
|
||||
line-height: 30px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.analysis{
|
||||
height:19px;
|
||||
font-size:14px;
|
||||
color:#333333;
|
||||
line-height:19px;
|
||||
}
|
||||
|
||||
.testfondex{
|
||||
color: #808080;
|
||||
font-size: 14px;
|
||||
}
|
||||
.pb20{
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.icontianjiadaohangcolor{
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.xiaoshou{
|
||||
cursor:pointer
|
||||
}
|
||||
.mt40{
|
||||
margin-top: 40px;
|
||||
}
|
||||
.mt42{
|
||||
margin-top: 42px;
|
||||
}
|
||||
.drawerbutton{
|
||||
width:88px;
|
||||
height:30px;
|
||||
background:#4CACFF;
|
||||
border-radius:4px;
|
||||
font-size:14px;
|
||||
color:#ffffff;
|
||||
line-height:30px;
|
||||
text-align: center;
|
||||
}
|
Loading…
Reference in new issue