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

dev_jupyter
杨树明 5 years ago
commit 7d9ce0f706

@ -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"
@ -150,3 +154,15 @@ export function htmlEncode(str) {
s = s.replace(/\"/g, """);
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,7 @@ class CommonWorkList extends Component{
left_time: {},
category: {},
b_order: 'desc',
searchtypes:false
}
}
onTablePagination = (page) => {
@ -423,11 +413,27 @@ class CommonWorkList extends Component{
}
onSearchValue = (val) => {
if (val === ""||val===undefined) {
this.setState({
search: undefined,
searchtypes:false
})
}else{
this.setState({
searchtypes: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 开始加载");
@ -789,13 +795,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> }
@ -859,7 +866,10 @@ 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>

@ -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">

@ -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,7 +1,6 @@
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";
@ -9,7 +8,6 @@ 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({
@ -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,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>*/}
Loading…
Cancel
Save