Merge branch 'dev_item_bank' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_item_bank

dev_jupyter
cxt 5 years ago
commit a5ffa9fa1e

@ -1,5 +1,5 @@
class GitsController < ApplicationController
skip_before_action :check_sign
# 说明:
# 以下Git认证只针对新版gitGitlab的Git认证不走该控制器
# 思路:
@ -39,7 +39,7 @@ class GitsController < ApplicationController
# 用户是否对对象拥有权限
system_user = User.find_by_login(input_username) || User.find_by_mail(input_username) || User.find_by_phone(input_username)
# 如果用户名密码错误
if system_user && !system_user.check_password?(input_password)
if system_user.blank? || system_user && !system_user.check_password?(input_password)
uid_logger_error("git start: password is wrong")
result = false
else

@ -19,7 +19,7 @@ class ShixunsController < ApplicationController
:add_file, :jupyter_exec]
before_action :allowed, only: [:update, :close, :update_propaedeutics, :settings, :publish, :apply_public,
:shixun_members_added, :change_manager, :collaborators_delete,
:shixun_members_added, :change_manager, :collaborators_delete, :upload_git_file,
:cancel_apply_public, :cancel_publish, :add_collaborators, :add_file]
before_action :portion_allowed, only: [:copy]
@ -885,6 +885,17 @@ class ShixunsController < ApplicationController
@content = update_file_content content, @repo_path, @path, author_email, author_name, "Edit by browser"
end
def upload_git_file
upload_file = params["file"]
uid_logger("#########################file_params####{params["#{params[:file]}"]}")
raise "未上传文件" unless upload_file
content = upload_file.tempfile.read
author_name = current_user.real_name
author_email = current_user.git_mail
update_file_content(content, @repo_path, author_email, author_name, "upload by browser")
render_ok
end
def add_collaborators
member_ids = "(" + @shixun.shixun_members.map(&:user_id).join(',') + ")"
user_name = "%#{params[:user_name].to_s.strip}%"

@ -302,6 +302,7 @@ Rails.application.routes.draw do
post :set_secret_dir
post :commits
post :file_content
post :upload_git_file
post :update_file
post :close
post :add_file

@ -755,6 +755,10 @@ class App extends Component {
(props) => (<RecordDetail {...this.props} {...props} {...this.state} />)
}
/>
<Route path="/myproblems/:id/:tab?"
render={
(props) => (<StudentStudy {...this.props} {...props} {...this.state} />)
} />
<Route path="/question/edit/:id"
render={
(props) => (<Questionitem_banks {...this.props} {...props} {...this.state} />)
@ -768,15 +772,6 @@ class App extends Component {
render={
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)
} />
<Route path="/myproblems/:id/:tab?"
render={
(props) => (<StudentStudy {...this.props} {...props} {...this.state} />)
} />
<Route path="/problems"
render={
(props) => (<Developer {...this.props} {...props} {...this.state} />)
}/>
<Route path="/paperreview"
render={
@ -786,6 +781,11 @@ class App extends Component {
render={
(props) => (<Testpaperlibrary {...this.props} {...props} {...this.state} />)
}/>
<Route path="/problems"
render={
(props) => (<Developer {...this.props} {...props} {...this.state} />)
}/>
<Route path="/question"
render={
(props) => (<Headplugselection {...this.props} {...props} {...this.state} />)

@ -1,4 +1,8 @@
import React from "react";
import md5 from 'md5';
import {Input} from "antd";
const { Search } = Input;
const $ = window.$;
const isDev = window.location.port == 3007;
export const TEST_HOST = "https://test-newweb.educoder.net"
@ -128,7 +132,13 @@ export function getTaskUrlById(id) {
export function getRandomcode(url) {
Railsgettimes()
let anewopens=md5(newopens+newtimestamp);
if (url.indexOf('?') == -1) {
return `${url}?randomcode=${newtimestamp}&client_key=${anewopens}`
}else {
return `${url}&randomcode=${newtimestamp}&client_key=${anewopens}`
}
}
export function htmlEncode(str) {
@ -144,3 +154,15 @@ export function htmlEncode(str) {
s = s.replace(/\"/g, "&quot;");
return s;
}
export function publicSearchs(Placeholder,onSearch,onInputs,onChanges,loadings) {
return(<Search
placeholder= { Placeholder || "请输入内容进行搜索" }
onSearch={onSearch}
// value={searchValue}
onInput={onInputs}
onChange={onChanges}
loading={loadings||false}
allowClear={true}
></Search>)
}

@ -2,7 +2,7 @@
// export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil';
export { getImageUrl as getImageUrl, getUrl as getUrl, getRandomcode as getRandomcode,getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl
export { getImageUrl as getImageUrl, getUrl as getUrl, publicSearchs as publicSearchs,getRandomcode as getRandomcode,getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl
, getUploadActionUrl as getUploadActionUrl,getUploadActionUrltwo as getUploadActionUrltwo ,getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth
, getTaskUrlById as getTaskUrlById, TEST_HOST ,htmlEncode as htmlEncode } from './UrlTool';
export { default as queryString } from './UrlTool2';

@ -230,7 +230,8 @@ class Fileslists extends Component{
filesId:list.id,
name:list.name,
course_is_public:result.data.data.course_is_public,
isSpin:false
isSpin:false,
page:page
})
}
}
@ -423,7 +424,7 @@ class Fileslists extends Component{
onPressEnter = () => {
let {searchValue}=this.state;
let{pagesize,page,tagname,sort,sorttype,coursesecondcategoryid}=this.state;
this.getfileslist(pagesize,page,tagname,searchValue,sort,sorttype,coursesecondcategoryid);
this.getfileslist(pagesize,1,tagname,searchValue,sort,sorttype,coursesecondcategoryid);
}
onInputSearchChange = (e) => {
@ -850,6 +851,7 @@ class Fileslists extends Component{
searchValue={ searchValue }
// searchtype={this.props.isAdmin||this.props.isStudent ?true:false}
onInputSearchChange={this.onInputSearchChange}
allowClearonChange={this.onInputSearchChange}
firstRowRight={
<React.Fragment>
{/*{this.props.isAdmin()?parseInt(this.props.match.params.main_id)===parseInt(this.props.coursesids)?<WordsBtn style="blue" onClick={()=>this.addDir()} className={"mr30 font-16"}>新建目录</WordsBtn>:"":""}*/}

@ -346,6 +346,7 @@ class Boards extends Component{
title={boardName || "帖子列表"}
searchValue={ searchValue }
onInputSearchChange={this.onInputSearchChange}
allowClearonChange={this.onInputSearchChange}
showSearchInput={messages.length >= 10}
searchPlaceholder={ '请输入帖子名称进行搜索' }
firstRowRight={

@ -1,28 +1,17 @@
import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip,Spin, Pagination} from "antd";
import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN';
import {WordsBtn, ConditionToolTip, queryString, getImageUrl, on, off, NoneData, sortDirections} from 'educoder';
import {WordsBtn, ConditionToolTip, queryString, publicSearchs, on, off, NoneData, sortDirections} from 'educoder';
import axios from 'axios';
import Modals from '../../modals/Modals';
import CoursesListType from '../coursesPublic/CoursesListType';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import CheckAllGroup from '../common/button/CheckAllGroup'
import moment from 'moment';
import CheckCodeModal from '../coursesPublic/modal/CheckCodeModal'
import '../css/Courses.css'
import WorkDetailPageHeader from './common/WorkDetailPageHeader'
import '../css/Courses.css';
import PublishRightnow from './PublishRightnow'
import ModulationModal from "../coursesPublic/ModulationModal";
import AccessoryModal from "../coursesPublic/AccessoryModal";
import LeaderIcon from './common/LeaderIcon'
const { Option} = Select;
const CheckboxGroup = Checkbox.Group;
const confirm = Modal.confirm;
let GraduationTasksnewtype=true;
const $ = window.$;
const Search = Input.Search;
const RadioGroup = Radio.Group;
function renderScore(score, content) {
let color = '#747A7F'
@ -414,6 +403,8 @@ class CommonWorkList extends Component{
left_time: {},
category: {},
b_order: 'desc',
searchtypes:false,
loadingstate:false
}
}
onTablePagination = (page) => {
@ -423,11 +414,29 @@ class CommonWorkList extends Component{
}
onSearchValue = (val) => {
if (val === ""||val===undefined) {
this.setState({
search: undefined,
searchtypes:false
})
}else{
this.setState({
searchtypes:true,
loadingstate:true
})
}
this.fetchList()
}
onSearchValueInput = (e) => {
if (e.target.value === ""||e.target.value===undefined) {
this.setState({
search: undefined,
})
} else {
this.setState({search: e.target.value})
}
}
componentDidMount() {
console.log("CommonWorkList 分班list 开始加载");
@ -476,7 +485,8 @@ class CommonWorkList extends Component{
if (response.data) {
this.setState({
...response.data,
isSpin:false
isSpin:false,
loadingstate:false
})
this.props.initWorkDetailCommonState && this.props.initWorkDetailCommonState( Object.assign({...response.data}, {
@ -486,7 +496,8 @@ class CommonWorkList extends Component{
}).catch((error)=>{
console.log(error)
this.setState({
isSpin:false
isSpin:false,
loadingstate:false
})
})
@ -789,13 +800,14 @@ class CommonWorkList extends Component{
{/* value={search} */}
<div className="fr search-new mr8" style={{marginBottom:'1px'}}>
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"
onInput={this.onSearchValueInput}
onSearch={this.onSearchValue}
autoComplete="off"
></Search>
{/*<Search*/}
{/* placeholder="请输入姓名或学号搜索1"*/}
{/* id="subject_search_input"*/}
{/* onInput={this.onSearchValueInput}*/}
{/* onSearch={this.onSearchValue}*/}
{/* autoComplete="off"*/}
{/*></Search>*/}
{publicSearchs("请输入姓名或学号搜索",this.onSearchValue,this.onSearchValueInput,this.onSearchValueInput)}
</div>
</ul> }
@ -843,9 +855,9 @@ class CommonWorkList extends Component{
<div className={"justify break_full_word new_li edu-back-white course_table_wrap"} style={{minHeight:"480px", marginBottom: '30px'}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
}
// .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
// top: 72%;}
// }
.singleLine tr.ant-table-row {
background: #f1f9ff;
}
@ -859,13 +871,16 @@ class CommonWorkList extends Component{
<div id="forum_list" className="forum_table">
<div className="mh650 edu-back-white">
<NoneData></NoneData>
<NoneData
{...this.props}
{...this.state}
></NoneData>
</div>
</div>
</Spin>
:
<React.Fragment>
<Spin tip="正在加载..." spinning={loadingstate}>
<Table
className="stageTable"
dataSource={student_works}
@ -873,8 +888,9 @@ class CommonWorkList extends Component{
showQuickJumper
pagination={false}
onChange={this.table1handleChange}
loading={loadingstate}
// loading={loadingstate}
/>
</Spin>
</React.Fragment>
}

@ -1,28 +1,22 @@
import React,{ Component } from "react";
import { Input,Checkbox,Menu,Pagination,Spin} from "antd";
import CourseLayoutcomponent from '../common/CourseLayoutComponent';
import UseBank from './UseBank'
import '../css/members.css'
import '../css/busyWork.css'
import CoursesListType from '../coursesPublic/CoursesListType'
import CommonWorkItem from './CommonWorkItem'
import PublishRightnow from './PublishRightnow'
import ConnectProject from './ConnectProject'
import { WordsBtn, on, off } from 'educoder'
import Modals from '../../modals/Modals'
import NoneData from "../coursesPublic/NoneData"
import Titlesearchsection from '../common/titleSearch/TitleSearchSection';
import { RouteHOC } from './common'
import axios from 'axios';
import _ from 'lodash'
const Search = Input.Search;
const map={1:"普通作业",2:"",3:"分组作业"}
const COMMON_WORK = 1
// const Search = Input.Search;
// const map={1:"普通作业",2:"",3:"分组作业"}
// const COMMON_WORK = 1
// const COMMON_WORK = 2
class commonWork extends Component{
constructor(props){
@ -47,13 +41,12 @@ class commonWork extends Component{
inputStudent=(e)=>{
this.setState({
search:e.target.value,
page:1
})
}
//搜索查询
searchStudent=()=>{
let {page,search,order}=this.state;
this.getList(page,search,order);
this.getList(1,search,order);
}
openConnectionProject = (work) => {
this.refs['connectProject'].openConnectionProject(work)
@ -134,11 +127,14 @@ class commonWork extends Component{
mainList:result.data,
totalCount:result.data.task_count,
isSpin:false,
page:page,
...result.data
})
}
}).catch((error)=>{
console.log(error);
this.setState({
isSpin:false
})
})
}
//筛选条件
@ -396,7 +392,7 @@ class commonWork extends Component{
// searchtype={this.props.isAdmin||this.props.isStudent ?true:false}
onInputSearchChange={this.inputStudent}
onPressEnter={this.searchStudent}
allowClearonChange={this.inputStudent}
firstRowRight={
<React.Fragment>
{ isAdmin && <WordsBtn style="blue" className="fr" onClick={()=>this.createCommonWork(1)}>新建</WordsBtn>}

@ -1,8 +1,5 @@
import React,{ Component } from "react";
import { Input } from "antd";
const Search = Input.Search;
import {publicSearchs} from 'educoder';
class Titlesearchsection extends Component{
constructor(props){
super(props);
@ -14,7 +11,7 @@ class Titlesearchsection extends Component{
render(){
let { addGroup } = this.state;
const { firstRowRight, secondRowLeft,firstRowMid, secondRowBotton,thirdRow, title, onInputSearchChange
, searchValue, onPressEnter, searchPlaceholder, showSearchInput } = this.props;
, searchValue, onPressEnter, searchPlaceholder, allowClearonChange } = this.props;
return(
<React.Fragment>
<style>{`
@ -79,12 +76,15 @@ class Titlesearchsection extends Component{
{/* (searchValue || showSearchInput) && */}
{ <div className="fr mt16 mb16 searchView" >
<Search
onSearch={onPressEnter}
value={searchValue}
placeholder= { searchPlaceholder || "请输入姓名进行搜索" }
onInput={onInputSearchChange}
></Search>
{publicSearchs(searchPlaceholder || "请输入姓名进行搜索",onPressEnter,onInputSearchChange,allowClearonChange)}
{/*<Search */}
{/* onSearch={onPressEnter}*/}
{/* // value={searchValue}*/}
{/* placeholder= { searchPlaceholder || "请输入姓名进行搜索" }*/}
{/* onInput={onInputSearchChange}*/}
{/* onChange={allowClearonChange}*/}
{/* allowClear={true}*/}
{/*></Search>*/}
</div> }
{secondRowBotton}

@ -6,7 +6,8 @@ class NoneData extends Component{
super(props)
}
render(){
const { style } = this.props;
const { style,searchtypes } = this.props;
return(
<div className="edu-tab-con-box clearfix edu-txt-center" style={ style || { width:"100%" }}>
<style>
@ -23,7 +24,7 @@ class NoneData extends Component{
`}
</style>
<img className="edu-nodata-img mb20" src={getUrl("/images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p>
<p className="edu-nodata-p mb20">{searchtypes===true?"抱歉没有您要搜索的内容,请换个词语试试看":"暂时还没有相关数据哦!"}</p>
</div>
)
}

@ -1,11 +1,10 @@
import React,{ Component } from "react";
import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin } from "antd";
import CourseLayoutcomponent from '../common/CourseLayoutComponent';
import {Checkbox, Pagination,Menu,Spin } from "antd";
import ExerciseListItem from './ExerciseListItem'
import axios from 'axios';
import Modals from '../../modals/Modals';
import '../css/members.css'
import { WordsBtn,on, off, trigger } from 'educoder'
import { WordsBtn,on, publicSearchs } from 'educoder'
import '../css/busyWork.css'
import _ from 'lodash';
import moment from 'moment'
@ -14,8 +13,6 @@ import ImmediatelyPublish from "../poll/pollPublicBtn/ImmediatelyPublish";
import ImmediatelyEnd from "../poll/pollPublicBtn/ImmediatelyEnd";
import NoneData from "../coursesPublic/NoneData";
import HomeworkModal from "../coursesPublic/HomeworkModal";
const Search = Input.Search;
class Exercise extends Component{
constructor(props){
@ -93,17 +90,20 @@ class Exercise extends Component{
exercises:result.data.exercises,
checkAllValue:false,
checkBoxValues:[],
isSpin:false
isSpin:false,
page:page
})
}).catch((error)=>{
console.log(error);
this.setState({
isSpin:false,
})
})
}
inputStudent=(e)=>{
this.setState({
StudentList_value:e.target.value
StudentList_value:e.target.value,
})
}
// 搜索
@ -505,12 +505,13 @@ class Exercise extends Component{
<span>未发布{exercises_counts && exercises_counts.exercises_unpublish_counts}</span>
</p>
<div className="fr mt16 mb16 searchView">
<Search
value={StudentList_value}
placeholder="请输入名称进行搜索"
onInput={this.inputStudent}
onSearch={this.searchInfo}
></Search>
{publicSearchs("请输入名称进行搜索",this.searchInfo,this.inputStudent,this.inputStudent)}
{/*<Search*/}
{/* value={StudentList_value}*/}
{/* placeholder="请输入名称进行搜索"*/}
{/* onInput={this.inputStudent}*/}
{/* onSearch={this.searchInfo}*/}
{/*></Search>*/}
</div>
</div>
<div className="task_menu_ul pl30 pr30">

@ -132,6 +132,7 @@ class Exercisesetting extends Component{
// 已有设置数据的查询
getSettingInfo=()=>{
this.props.Commonheadofthetestpapers()
let Id=this.props.match.params.Id;
let url=`/exercises/${Id}/exercise_setting.json`;
axios.get(url).then((result)=>{

@ -61,7 +61,7 @@ class Testpapersettinghomepage extends Component{
}
//试卷公用头部
Commonheadofthetestpaper=()=>{
console.log("Commonheadofthetestpaper 试卷公用头部");
// console.log("Commonheadofthetestpaper 试卷公用头部");
var exercise_id = this.props.match.params.Id;
var url = `/exercises/${exercise_id}/common_header.json`;
axios.get(url).then((response) => {
@ -475,7 +475,7 @@ class Testpapersettinghomepage extends Component{
}
{
parseInt(tab[0])==3 ? <WrappedExercisesetting Commonheadofthetestpaper={this.state.Commonheadofthetestpaper} {...this.props} {...this.state} triggerRef={this.bindRef}></WrappedExercisesetting>:""
parseInt(tab[0])==3 ? <WrappedExercisesetting Commonheadofthetestpaper={this.state.Commonheadofthetestpaper} {...this.props} {...this.state} triggerRef={this.bindRef} Commonheadofthetestpapers={this.Commonheadofthetestpaper}></WrappedExercisesetting>:""
}
</div>
</div>

@ -1,7 +1,6 @@
import React,{ Component } from "react";
import { Input, Checkbox, Menu,Pagination,Spin} from "antd";
import { Checkbox, Menu,Pagination,Spin} from "antd";
import {Link} from 'react-router-dom';
import CourseLayoutcomponent from '../../common/CourseLayoutComponent';
import Titlesearchsection from '../../common/titleSearch/TitleSearchSection';
import HomeworkModal from "../../coursesPublic/HomeworkModal";
import { WordsBtn } from 'educoder';
@ -10,7 +9,6 @@ import moment from 'moment';
import GraduateTaskItem from './GraduateTaskItem';
import TaskPublishModal from "./TaskPublishModal";
import Modals from '../../../modals/Modals';
import UseBank from "../../busyWork/UseBank";
import '../../css/members.css';
import '../style.css';
import NoneData from "../../coursesPublic/NoneData";
@ -65,7 +63,9 @@ class GraduationTasks extends Component{
})
}
}).catch(function (error) {
console.log(error);
this.setState({
isSpin:false
})
});
}
@ -286,7 +286,7 @@ class GraduationTasks extends Component{
onInputSearchChange = (e) => {
this.setState({
searchValue:e.target.value
searchValue:e.target.value,
})
if (this.timeoutHandler) {
@ -405,7 +405,8 @@ class GraduationTasks extends Component{
let {page,order}=this.state;
this.setState({
search:value
search:value,
isSpin:true
})
this.fetchAll(value,page,order);
@ -662,6 +663,7 @@ class GraduationTasks extends Component{
title="毕设任务"
searchValue={searchValue}
onInputSearchChange={this.onInputSearchChange}
allowClearonChange={this.onInputSearchChange}
firstRowRight={
<React.Fragment>
{/*{this.props.isAdmin() ?<WordsBtn style="blue" className="mr30" onClick={() => this.addDir()}>题库选用</WordsBtn>:""}*/}

@ -1,15 +1,13 @@
import React,{ Component } from "react";
import {Checkbox, Menu, Pagination,Spin} from "antd";
import CourseLayoutcomponent from '../../common/CourseLayoutComponent'
import Titlesearchsection from '../../common/titleSearch/TitleSearchSection'
import DownloadMessageysl from "../../../modals/DownloadMessageysl";
import { WordsBtn } from 'educoder'
import { WordsBtn ,getRandomcode} from 'educoder'
import NoneData from '../../coursesPublic/NoneData'
import Modals from "../../../modals/Modals"
import axios from 'axios'
import UseBank from '../../busyWork/UseBank'
import _ from 'lodash'
@ -85,12 +83,15 @@ class Boards extends Component{
topicList:response.data.graduation_topic,
totalCount:response.data.graduation_topic_count,
course_public:response.data.course_public,
isSpin:false
isSpin:false,
page:page
})
}
})
.catch(function (error) {
console.log(error);
this.setState({
isSpin:false
})
});
}
componentDidMount = () => {
@ -117,10 +118,11 @@ class Boards extends Component{
onInputSearchChange = (e) => {
this.setState({
searchValue:e.target.value
searchValue:e.target.value,
})
}
// 全选or反选
onCheckAll = (e) => {
this.setState({
@ -353,7 +355,7 @@ onBoardsNew=()=>{
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
window.open(getRandomcode("/api"+url), '_blank');
}
}).catch((error) => {
console.log(error)
@ -408,6 +410,7 @@ onBoardsNew=()=>{
title="毕设选题"
searchValue={ searchValue }
onInputSearchChange={this.onInputSearchChange}
allowClearonChange={this.onInputSearchChange}
firstRowRight=
{ isAdmin ?
(<React.Fragment>

@ -136,6 +136,7 @@ function CourseGroupList(props) {
title={"分班列表"}
searchValue={ searchValue }
onInputSearchChange={onInputSearchChange}
allowClearonChange={onInputSearchChange}
showSearchInput={total_count >= 10}
searchPlaceholder={ '请输入分班名称进行搜索' }
firstRowRight={

@ -1,6 +1,6 @@
import React,{ Component } from "react";
import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip ,Spin} from "antd";
import {WordsBtn, on, off, trigger } from 'educoder';
import {Checkbox, Pagination,Menu ,Spin} from "antd";
import {WordsBtn, on, off, publicSearchs } from 'educoder';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import AddcoursesNav from "../coursesPublic/AddcoursesNav";
import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish';
@ -15,8 +15,6 @@ import Modals from '../../modals/Modals';
import axios from 'axios';
import moment from 'moment';
const Search = Input.Search;
class Poll extends Component{
constructor(props){
@ -66,7 +64,7 @@ class Poll extends Component{
inputStudent=(e)=>{
this.setState({
StudentList_value:e.target.value
StudentList_value:e.target.value,
})
}
@ -125,7 +123,8 @@ class Poll extends Component{
course_types:result.data.course_types,
polls_counts:result.data.polls_counts,
isSpin:false,
checkBoxValues: bank_checkValue ? bank_checkValue : []
checkBoxValues: bank_checkValue ? bank_checkValue : [],
page:page
})
}
}).catch((error)=>{
@ -524,12 +523,13 @@ class Poll extends Component{
<span>未发布{polls_counts && polls_counts.polls_unpublish_counts}</span>
</p>
<div className="fr mt16 mb16 searchView">
<Search
value={StudentList_value}
placeholder="请输入名称进行搜索"
onInput={this.inputStudent}
onSearch={this.searchInfo}
></Search>
{publicSearchs("请输入名称进行搜索",this.searchInfo,this.inputStudent,this.inputStudent)}
{/*<Search*/}
{/* value={StudentList_value}*/}
{/* placeholder="请输入名称进行搜索"*/}
{/* onInput={this.inputStudent}*/}
{/* onSearch={this.searchInfo}*/}
{/*></Search>*/}
</div>
</div>
<div className="task_menu_ul pl30 pr30">

@ -1,6 +1,6 @@
import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn, ActionBtn, sortDirections} from 'educoder';
import {WordsBtn, publicSearchs, sortDirections} from 'educoder';
import {
Form,
Select,
@ -65,6 +65,7 @@ class Listofworksstudentone extends Component {
//关卡得分final_score
this.state = {
searchtypes:false,
jobsettingsdata: undefined,
endTime: "2018/11/10 17:10:00",
type: "day",
@ -2588,6 +2589,7 @@ class Listofworksstudentone extends Component {
challenges_count: result.data.challenges_count,
homework_status: result.data.homework_status,
answer_open_evaluation:result.data.answer_open_evaluation,
page:page
});
allow_lates=result.data.allow_late;
answer_open_evaluation=result.data.answer_open_evaluation;
@ -2959,10 +2961,9 @@ class Listofworksstudentone extends Component {
}
//搜索学生 文字输入
inputSearchValuest = (e) => {
// console.log(e.target.value)
if (e.target.value === "") {
if (e.target.value === ""||e.target.value===undefined) {
this.setState({
searchtext: undefined
searchtext: undefined,
})
} else {
this.setState({
@ -2983,6 +2984,7 @@ class Listofworksstudentone extends Component {
loadingstate: true,
page: 1,
limit: 20,
searchtypes:true
})
this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, value, 1, 20, this.state.myorders);
// console.log(value)
@ -3576,12 +3578,18 @@ class Listofworksstudentone extends Component {
</div>:
homework_status && homework_status.length === 0 ?
<div className="edu-back-white">
<NoneData></NoneData>
<NoneData
{...this.state}
{...this.props}
/>
</div>
:
homework_status && homework_status.length > 0 && homework_status[0] === "未发布" ?
<div className="edu-back-white">
<NoneData></NoneData>
<NoneData
{...this.state}
{...this.props}
/>
</div>
:
<div className={"educontent "}>
@ -3664,15 +3672,16 @@ class Listofworksstudentone extends Component {
{/*}*/}
{/*</span>}*/}
<span className="search-newyslw fr ml20">
<Search
placeholder="请输入姓名或学号搜索"
id="subject_search_input"
autoComplete="off"
value={searchtext}
onKeyUp={(e) => this.onSearchKeywordKeyUpt(e)}
onInput={this.inputSearchValuest}
onSearch={this.searchValuest}
></Search>
{/*<Search*/}
{/* placeholder="请输入姓名或学号搜索"*/}
{/* id="subject_search_input"*/}
{/* autoComplete="off"*/}
{/* value={searchtext}*/}
{/* // onKeyUp={(e) => this.onSearchKeywordKeyUpt(e)}*/}
{/* onInput={this.inputSearchValuest}*/}
{/* onSearch={this.searchValuest}*/}
{/*></Search>*/}
{publicSearchs("请输入姓名或学号搜索",this.searchValuest,this.inputSearchValuest,this.inputSearchValuest)}
</span>
</div>
<span className="fl mr10 color-grey-8 ">作品状态</span>
@ -3760,7 +3769,7 @@ class Listofworksstudentone extends Component {
<div className="mh650 edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">暂时还没有相关数据哦</p>
<p className="edu-nodata-p mb30">{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}</p>
</div>
</div>
@ -3769,9 +3778,9 @@ class Listofworksstudentone extends Component {
<div className={"justify break_full_word new_li "} style={{minHeight: "480px"}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
}
// .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
// top: 72%;
// }
.edu-table thead th,.edu-table tbody tr:last-child td{
border-bottom: none!important;
height: 58px;
@ -3787,13 +3796,16 @@ class Listofworksstudentone extends Component {
}
`}</style>
<div className="edu-table edu-back-white ant-tables ysltableo table1">
<Spin tip="正在加载..." spinning={loadingstate}>
{datajs === undefined ? "" : <Table
dataSource={datajs}
columns={columns}
pagination={false}
onChange={this.table1handleChange}
loading={loadingstate}
loading={false}
/>}
</Spin>
</div>
</div>
}
@ -3898,12 +3910,18 @@ class Listofworksstudentone extends Component {
{
homework_status && homework_status.length && homework_status.length === 0 ?
<div className=" clearfix edu-back-white" style={{margin: "auto", minWidth: "1200px"}}>
<NoneData></NoneData>
<NoneData
{...this.state}
{...this.props}
/>
</div>
:
homework_status && homework_status.length > 0 && homework_status && homework_status[0] === "未发布" ?
<div className=" clearfix edu-back-white " style={{margin: "auto", minWidth: "1200px"}}>
<NoneData></NoneData>
<NoneData
{...this.state}
{...this.props}
/>
</div>
:
@ -4029,7 +4047,7 @@ class Listofworksstudentone extends Component {
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">暂时还没有相关数据哦</p>
<p className="edu-nodata-p mb30">{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}</p>
</div>
</div>
@ -4069,12 +4087,18 @@ class Listofworksstudentone extends Component {
{
homework_status && homework_status.length === 0 ?
<div className=" clearfix edu-back-white" style={{margin: "auto", minWidth: "1200px"}}>
<NoneData></NoneData>
<NoneData
{...this.state}
{...this.props}
/>
</div>
:
homework_status && homework_status.length > 0 && homework_status && homework_status[0] === "未发布" ?
<div className=" clearfix edu-back-white" style={{margin: "auto", minWidth: "1200px"}}>
<NoneData></NoneData>
<NoneData
{...this.state}
{...this.props}
/>
</div>
:
<div className={"educontent mb20"}>
@ -4226,9 +4250,9 @@ class Listofworksstudentone extends Component {
<div className={"justify break_full_word new_li"}
style={{minHeight: "480px"}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
}
// .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
// top: 72%;
// }
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
@ -4246,12 +4270,16 @@ class Listofworksstudentone extends Component {
}
`}</style>
<div className="edu-table edu-back-white ysltableowss table4">
{datas === undefined ? "" : <Table
{datas === undefined ? "" :
<Spin tip="正在加载..." spinning={loadingstate}>
<Table
dataSource={datas}
columns={columnsstu}
pagination={false}
loading={loadingstate}
/>}
loading={false}
/>
</Spin>
}
</div>
</div>
{
@ -4270,7 +4298,7 @@ class Listofworksstudentone extends Component {
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">暂时还没有相关数据哦</p>
<p className="edu-nodata-p mb30">{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}</p>
</div>
</div>
</div>

@ -1,6 +1,6 @@
import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn, ActionBtn, sortDirections} from 'educoder';
import {WordsBtn, getRandomcode, sortDirections} from 'educoder';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import OneSelfOrderModal from "../coursesPublic/OneSelfOrderModal";
@ -622,7 +622,7 @@ class ShixunStudentWork extends Component {
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
window.open(getRandomcode("/api"+url), '_blank');
}
}).catch((error) => {
console.log(error)

@ -1,5 +1,5 @@
import React, {Component} from "react";
import {WordsBtn,markdownToHTML,ActionBtn,queryString,downloadFile,getImageUrl} from 'educoder';
import {WordsBtn,markdownToHTML,getRandomcode,queryString,downloadFile,getImageUrl} from 'educoder';
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Spin} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
import axios from 'axios';
@ -76,7 +76,7 @@ class ShixunWorkReport extends Component {
// this.props.slowDownload(url)
//
// this.props.showNotification(`正在下载中`);
window.open("/api"+url+"?disposition=inline", '_blank');
window.open(getRandomcode("/api"+url+"?disposition=inline"), '_blank');
this.setState({ isspinning: false })
}
}).catch((error) => {

@ -1,7 +1,7 @@
import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import {WordsBtn, ActionBtn, handleDateString, getImageUrl} from 'educoder';
import {WordsBtn, getRandomcode, handleDateString, getImageUrl} from 'educoder';
import PollDetailTabForthRules from '../poll/PollDetailTabForthRules';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import {
@ -2263,7 +2263,7 @@ class Trainingjobsetting extends Component {
}
} else {
this.props.showNotification(`正在下载中`);
window.open("/api" + url, '_blank');
window.open(getRandomcode("/api" + url), '_blank');
}
}).catch((error) => {
console.log(error)

@ -1,6 +1,6 @@
import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn, ActionBtn, markdownToHTML} from 'educoder';
import {WordsBtn, getRandomcode, markdownToHTML} from 'educoder';
import {
Form,
Select,
@ -413,7 +413,7 @@ class Workquestionandanswer extends Component {
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
window.open(getRandomcode("/api"+url), '_blank');
}
}).catch((error) => {
console.log(error)

@ -1,12 +1,10 @@
import React,{ Component } from "react";
import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin } from "antd";
import { WordsBtn,on, off, trigger } from 'educoder';
import {BrowserRouter as Router,Route,Switch,Link} from 'react-router-dom';
import { Input,Checkbox, Pagination,Menu,Spin } from "antd";
import { WordsBtn,on, trigger ,publicSearchs} from 'educoder';
import {Link} from 'react-router-dom';
import axios from'axios';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import OneSelfOrderModal from "../coursesPublic/OneSelfOrderModal";
import ShixunModal from "../coursesPublic/ShixunModal";
import PathModal from "../coursesPublic/PathModal";
import NewShixunModel from '../coursesPublic/NewShixunModel';
import AddcoursesNav from "../coursesPublic/AddcoursesNav";
import Modals from '../../modals/Modals';
@ -16,8 +14,6 @@ import '../css/busyWork.css'
import ShixunhomeWorkItem from "./ShixunhomeWorkItem";
import NoneData from "../coursesPublic/NoneData";
const Search = Input.Search;
class ShixunHomework extends Component{
constructor(props){
super(props);
@ -198,16 +194,20 @@ class ShixunHomework extends Component{
if(result.status===200){
this.setState({
datas:result.data,
isSpin:false
isSpin:false,
page:page
})
}
}else{
this.setState({
isSpin:false
isSpin:false,
})
}
}).catch((error)=>{
console.log(error);
this.setState({
isSpin:false
})
})
}
@ -644,19 +644,21 @@ class ShixunHomework extends Component{
}
SearchCoursenames=(e)=>{
this.setState({
Coursename:e.target.value
Coursename:e.target.value,
})
}
SearchCoursename=(value)=>{
let {page,order}=this.state;
this.setState({
Coursename:value
Coursename:value,
isSpin:true,
})
this.homeworkupdatalist(value,page,order);
this.homeworkupdatalist(value,1,order);
}
@ -1030,7 +1032,6 @@ class ShixunHomework extends Component{
}=this.state;
let main_id=this.props.match.params.main_id;
let category_id=this.props.match.params.category_id;
return(
<React.Fragment >
@ -1212,12 +1213,15 @@ class ShixunHomework extends Component{
</Menu>
</div>
<div className="fr mt16 mb16 searchView">
<Search
value={Coursename}
placeholder="请输入名称进行搜索"
onInput={this.SearchCoursenames}
onSearch={value => this.SearchCoursename(value)}
></Search>
{publicSearchs("请输入名称进行搜索",value => this.SearchCoursename(value),this.SearchCoursenames,(e)=>this.SearchCoursenames(e))}
{/*<Search*/}
{/* // value={Coursename}*/}
{/* placeholder="请输入名称进行搜索"*/}
{/* onInput={this.SearchCoursenames}*/}
{/* onSearch={value => this.SearchCoursename(value)}*/}
{/* onChange={(e)=>this.allowClearonChange(e)}*/}
{/* allowClear={true}*/}
{/*></Search>*/}
</div>
</div>
</div>
@ -1380,14 +1384,3 @@ class ShixunHomework extends Component{
}
}
export default ShixunHomework;
// {/*<div className="alltask "*/}
// {/*style={*/}
// {/*{*/}
// {/*display: datas===undefined?'none' :datas.task_count===0? 'block' : 'none'*/}
// {/*}*/}
// {/*}*/}
// {/*>*/}
// {/*<div className="edu-tab-con-box clearfix edu-txt-center">*/}
// {/*<img className="edu-nodata-img mb20" src="/images/educoder/nodata.png" />*/}
// {/*<p className="edu-nodata-p mb20">暂时还没有相关数据哦!</p></div>*/}
// {/*</div>*/}

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import {getRandomcode} from 'educoder';
import axios from 'axios';
import { Select,message,Modal,Input,Spin,Icon,Tooltip } from 'antd';
@ -550,7 +550,7 @@ class CourseSupports extends Component {
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
window.open(getRandomcode("/api"+url), '_blank');
}
}).catch((error) => {
console.log(error)

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import {getRandomcode} from 'educoder';
import { Modal} from 'antd';
import axios from 'axios';
@ -57,7 +57,7 @@ class DownloadMessage extends Component {
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
window.open(getRandomcode("/api"+url), '_blank');
}
}).catch((error) => {
console.log(error)

@ -41,6 +41,7 @@ class MainContent extends Component {
hideCodeEvaluate = () => {
const vncContainer = this.refs['vncContainer']
if (vncContainer) {
// console.log('点击的关闭按钮')
vncContainer.onBottomDrawerClose && vncContainer.onBottomDrawerClose()
}
}
@ -124,7 +125,7 @@ class MainContent extends Component {
</div>
}
></VNCContainer>
<div id="actionView" className="-layout-h -center -bg-grey-90 -grey-20 -bg-darkblack" style={{height:'48px'}}>
<div id="actionView" className="-layout-h -center -bg-grey-90 -grey-20 -bg-darkblack">
<ActionView {...this.props}
onRunCodeTest={onRunCodeTest}
></ActionView>
@ -179,7 +180,9 @@ class MainContent extends Component {
</div>
</div>
<div id="actionView" className="-layout-h -center -bg-grey-90 -grey-20 -bg-darkblack" style={{height:'48px'}}>
<div id="actionView"
style={{ position: 'absolute', width: '100%', bottom: '0', height: '51px'}}
className="-layout-h -center -bg-grey-90 -grey-20 -bg-darkblack">
<ActionView {...this.props} onRunCodeTest={onRunCodeTest}></ActionView>
</div>

@ -39,6 +39,47 @@
user-select: none;
}
.btn_test_case,
.btn_test_case_active{
display: inline-block;
position: absolute;
width: 56px;
height: 28px;
bottom: 23px;
line-height: 28px;
background: rgba(42,58,79,1);
z-index: 10;
left: 50%;
margin-left: -28px;
border-bottom-left-radius: 100px;
border-bottom-right-radius: 100px;
color: #fff;
text-align: center;
cursor: pointer;
opacity: .4;
transition: all .3s;
}
.btn_test_case:hover,
.btn_test_case_active:hover{
opacity: 1;
}
.btn_test_case .btn-arrow{
position: relative;
font-size: 12px;
line-height: 28px;
bottom: 2px;
}
.btn_test_case_active{
bottom: 203px;
z-index: 10000;
}
.btn_test_case_active .btn-arrow{
bottom: 4px;
}
@keyframes mymove
{
from {right:0px;}

@ -204,6 +204,10 @@ class VNCContainer extends Component {
render() {
const { challenge, vnc_url, git_url } = this.props
const _classCtx = this.state.bottomDrawer ? 'btn_test_case_active' : 'btn_test_case';
const _classes = this.state.bottomDrawer
? `iconfont icon-xiajiantou btn-arrow`
: 'iconfont icon-shangjiantou btn-arrow';
const secondDrawerChildren = this.renderSecondDrawerChildren();
return (
<React.Fragment>
@ -352,9 +356,16 @@ class VNCContainer extends Component {
>
{ this.props.codeEvaluate }
</Drawer>
<FloatButton onClick={this.swtichBottomDrawer}
{/* <FloatButton onClick={this.swtichBottomDrawer}
className="codeEvaluateFloatButton"
>测试集</FloatButton>
>测试集</FloatButton> */}
<div
className={_classCtx}
onClick={this.swtichBottomDrawer}
>
{/* <span className="iconfont icon-shangjiantou btn-arrow"></span> */}
<span className={_classes}></span>
</div>
</VNCDisplay>

@ -135,11 +135,13 @@ class VNCDisplay extends Component {
<div className="vncDisply" style={{height: '100%'}}>
<style>{`
.vncDisply #top_bar {
position: absolute;
background-color: #6e84a3;
color: white;
font: bold 12px Helvetica;
padding: 6px 5px 4px 5px;
border-bottom: 1px outset;
width: 100%;
}
.vncDisply #status {
text-align: center;
@ -166,7 +168,7 @@ class VNCDisplay extends Component {
<div id="status">Loading</div>
<div id="sendCtrlAltDelButton">Send CtrlAltDel</div>
</div>
<div id="screen">
<div id="screen" style={{ height: 'calc(100vh - 105px)' }}>
</div>
{this.props.children}

@ -394,19 +394,19 @@ class Question extends Component {
this.setState({
keywords: e.target.value
})
var data = {
discipline_id:this.state.discipline_id,
sub_discipline_id:this.state.sub_discipline_id,
tag_discipline_id:this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: e.target.value,
page: this.state.page,
per_page:10,
};
this.getdata(data);
// var data = {
// discipline_id:this.state.discipline_id,
// sub_discipline_id:this.state.sub_discipline_id,
// tag_discipline_id:this.state.tag_discipline_id,
// public: this.state.defaultActiveKey,
// difficulty: this.state.difficulty,
// item_type: this.state.item_type,
// keywords: e.target.value,
// page: this.state.page,
// per_page:10,
// };
//
// this.getdata(data);
}
setdatafuns = (value) => {

@ -258,8 +258,10 @@
width:70%;
}
.w30s{
width:70%;
width:30%;
}
.w50s{
width: 50%;
}

@ -35,7 +35,7 @@ class Testpaperlibrary extends Component {
booljupyterurls:false,
Contentdata:[],
items_count:0,
defaultActiveKey:"0",
}
}
getContainer = () => {
@ -86,9 +86,28 @@ class Testpaperlibrary extends Component {
this.getdata(data);
}
setdatafunsval = (e) => {
this.setState({
keywords: e.target.value
})
callback=()=>{
}
setdatafuns = (value) => {
this.setState({
keywords: value,
})
}
callback = (key) => {
this.setState({
defaultActiveKey: key,
})
var data={
page:1,
per_page:10,
public:key,
}
this.getdata(data);
}
//搜索框的内容
@ -215,10 +234,19 @@ class Testpaperlibrary extends Component {
></Headplugselection>
{/*头部*/}
<Contentpart
{...this.props}
{...this.state}
setdatafuns={(key)=>this.setdatafuns(key)}
callback={(key)=>this.callback(key)}
setdatafunsval={(key)=>this.setdatafunsval(key)}
setdifficulty={(bool)=>this.setdifficulty(bool)}
>
</Contentpart>
{/*内容*/}
{
items_count&&items_count>10?
<div className="mb30 clearfix educontent mt40 intermediatecenter">

@ -14,8 +14,9 @@ import {
import './../testioncss/testioncss.css';
import NoneDatas from '../component/NoneDatas';
import LoadingSpin from '../../../common/LoadingSpin';
import Contentquestionbank from "./Contentquestionbank";
import LoadingSpin from '../../../common/LoadingSpin';
import Listjihe from "./Listjihe";
const { TabPane } = Tabs;
const Search = Input.Search;
class Contentpart extends Component {
@ -30,6 +31,10 @@ class Contentpart extends Component {
componentDidMount(){
}
//跳转人工组卷
Mantegeneration=()=>{
this.props.history.push('/question');
}
render() {
@ -64,6 +69,9 @@ class Contentpart extends Component {
width: 31px !important;
left: 14px;
}
.ant-tabs-nav{
z-index: 1000;
}
`
}
</style>
@ -78,19 +86,20 @@ class Contentpart extends Component {
position:"absolute",
top: "0px",
paddingLeft: "170px",
width: "100%",
}}>
<style>
{
`
.xaxisreverseorder .ant-input-group-addon{
.sortinxdirection .ant-input-group-addon{
width: 60px !important;
}
.xaxisreverseorder .ant-input-lg {
.sortinxdirection .ant-input-lg {
height: 41px;}
.xaxisreverseorder .ant-popover{
.sortinxdirection .ant-popover{
top: 348px !important;
}
@ -102,17 +111,16 @@ class Contentpart extends Component {
`
}
</style>
<div className="xaxisreverseorder">
{
defaultActiveKey===0||defaultActiveKey==="0"?
<a href={'/question/newitem'}>
<div className="newbutoon">
<p className="newbutoontes" >新增</p>
</div>
</a>
:""
}
<Popover getPopupContainer={trigger => trigger.parentNode} placement="bottom" trigger="hover" content={contents} >
<div className="sortinxdirection">
<Search
style={{ width: "347px",marginRight:"60px",}}
placeholder="请输入题目名称、内容"
enterButton
size="large"
onInput={(e)=>this.props.setdatafunsval(e)}
onSearch={ (value)=>this.props.setdatafuns(value)} />
<Popover placement="bottom" trigger="hover" content={contents} >
<div className=" sortinxdirection mr10">
<div className="subjecttit">
@ -122,21 +130,78 @@ class Contentpart extends Component {
</div>
</Popover>
<Search
style={{ width: "347px",marginRight:"60px",}}
placeholder="请输入题目名称、内容"
enterButton
size="large"
onInput={(e)=>this.props.setdatafunsval(e)}
onSearch={ (value)=>this.props.setdatafuns(value)} />
<div className="xaxisreverseorder" style={{
width:"388px"
}}>
<a href={'/question/newitem'}>
<div className="newbutoonss">
<p className="newbutoontess" >智能组卷</p>
</div>
</a>
<a href={'/question'} >
<div className="newbutoons mr39">
<p className="newbutoontess" >人工组卷</p>
</div>
</a>
</div>
</div>
</div>
</div>
{/*内容*/}
{
this.props.Contentdata.items === undefined ||this.props.Contentdata.items === null||this.props.Contentdata.items.length===0 ?
<div className=" w100s mb10"></div>
:
<div className=" w100s mb10">
{
defaultActiveKey===1||defaultActiveKey==="1"?
<Contentquestionbank {...this.props} {...this.state} selectallquestionsonthispage={()=>this.props.selectallquestionsonthispage()} ></Contentquestionbank>
:""
}
{
defaultActiveKey===0||defaultActiveKey==="0"?
<Contentquestionbank {...this.props} {...this.state} selectallquestionsonthispage={()=>this.props.selectallquestionsonthispage()}></Contentquestionbank>
:""
}
</div>
}
<div className="minheight">
{/*列表集合*/}
<div className=" w100s">
{
this.props.booljupyterurls===true?
<LoadingSpin></LoadingSpin>
:
this.props.Contentdata.exams === undefined ||this.props.Contentdata.exams === null||this.props.Contentdata.exams.length===0?
<NoneDatas></NoneDatas>
: this.props.Contentdata.exams.map((object, index) => {
return (
<Listjihe {...this.state} {...this.props} items={object}>
</Listjihe>
)
})}
</div>
</div>
</div>
</div>
)

@ -0,0 +1,135 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl,markdownToHTML} from 'educoder';
import axios from 'axios';
import {
notification,
Spin,
Table,
Pagination,
Radio
} from "antd";
import './../testioncss/testioncss.css';
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
class Listjihe extends Component {
constructor(props) {
super(props);
this.state = {
page:1,
name:"单选题",
nd:"简单",
chakanjiexibool:false,
}
}
//初始化
componentDidMount(){
}
chakanjiexibool=()=>{
if(this.state.chakanjiexibool===true){
this.setState({
chakanjiexibool:false
})
}else{
this.setState({
chakanjiexibool:true
})
}
}
//选用
Selectingpracticaltraining=(id)=>{
let data={
item_ids:[id]
}
this.props.getitem_baskets(data);
}
//撤销
Selectingpracticaltrainings=(id)=>{
this.props.getitem_basketss(id);
}
render() {
let {page,name,nd,chakanjiexibool}=this.state;
let {defaultActiveKey,items}=this.props;
const names= items&&items.name&&items.name;
const question_counts=items&&items.question_count&&items.question_count;
const total_scores =items&&items.total_score&&items.total_score;
const difficultys=items&&items.difficulty&&items.difficulty===1?"简单":items&&items.difficulty&&items.difficulty===2?"适中":items&&items.difficulty&&items.difficulty===3?"困难":""
const update_times=items&&items.update_time&&items.update_time;
const quotess =items&&items.quotes&&items.quotes;
const authors=items&&items.author&&items.author.name;
return (
<div className={chakanjiexibool===true?"w100s borderwds283 pd20 mb20":"w100s borderwds pd20 mb20 intermediatecenter"}>
<div className="sortinxdirection w100s">
<div className="sjimg borderwd">
</div>
<div className="w100s verticallayout ml37" >
<div className="w100s"> <p className="sjtitle">{names}</p></div>
<div className="w100s sortinxdirection mt9">
<p className="sjtitles">试题数<span >{question_counts}</span></p>
<p className="sjtitles ml48">总分<span >{total_scores}</span></p>
<p className="sjtitles ml48">难度<span >{difficultys}</span></p>
</div>
<div className="w100s sortinxdirection mt11">
<div className="w60s sortinxdirection">
<p className='sjtitlesysl'>
更新时间<span>{update_times}</span>
</p>
<p className='sjtitlesysl ml30'>
使用次数<span>{quotess}</span>
</p>
<p className='sjtitlesysl ml30'>
创建者<span>{authors}</span>
</p>
</div>
<div className="w40s xaxisreverseorder">
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-shanchu1 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>删除</span>
</p>
<a >
<p className="viewparsings xiaoshou mr25" >
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
<p className="viewparsings xiaoshou mr25" >
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>公开</span>
</p>
</div>
</div>
</div>
<div className="sjfqks reversedirection">
<div className="newbutoonss">
<p className="newbutoontess" >发起考试</p>
</div>
</div>
</div>
</div>
)
}
}
export default Listjihe;

@ -249,7 +249,7 @@
}
.w100s{
width:100%;
width:100% !important;
}
.stestcen{
text-align: center;
@ -258,7 +258,13 @@
width:70%;
}
.w30s{
width:70%;
width:30%;
}
.w60s{
width:60%;
}
.w40s{
width:40%;
}
.w50s{
width: 50%;
@ -425,6 +431,35 @@
}
.newbutoons{
width:106px;
height:34px;
background:rgba(76,172,255,1);
border-radius:4px;
line-height: 34px;
color:#ffffff;
}
.newbutoonss{
width:106px;
height:34px;
background:rgba(51,189,140,1);
border-radius:4px;
line-height: 34px;
color:#ffffff;
}
.newbutoontess{
width:100%;
height:34px;
font-size:14px;
color:#ffffff;
line-height:34px;
text-align: center;
}
.newbutoontes{
width:100%;
height:42px;
@ -739,3 +774,50 @@
.lh35{
line-height: 35px;
}
.mr39{
margin-right: 30px;
}
.sjimg{
width: 104px;
}
.sjfqks{
width: 100px;
}
.sjtitle{
width:100%;
height:21px;
font-size:16px;
color:#333333;
line-height:21px;
}
.sjtitles{
width:64px;
height:17px;
font-size:12px;
color:#888888;
line-height:17px;
}
.sjtitles span{
color: #333333 !important;
}
.ml48{
margin-left: 48px;
}
.sjtitlesysl{
height:17px;
font-size:12px;
color:#BBBBBB;
line-height:30px;
}
.mt11{
margin-top: 11px;
}
.ml37{
margin-left: 37px;
}

Loading…
Cancel
Save